fix(用例管理): 用例前后置列表返回num

This commit is contained in:
WangXu10 2024-02-05 13:43:56 +08:00 committed by 刘瑞斌
parent 4872c1827f
commit 8a5f6ceac1
2 changed files with 9 additions and 5 deletions

View File

@ -30,4 +30,7 @@ public class FunctionalCaseRelationshipDTO implements Serializable {
@Schema(description = "创建人名称")
private String userName;
@Schema(description = "num")
private String num;
}

View File

@ -22,21 +22,22 @@
fc.NAME name,
fc.version_id versionId,
pv.`name` versionName,
u.`name` userName
u.`name` userName,
fc.num
FROM
functional_case_relationship_edge fcre
<if test="request.type != null and request.type != ''">
<choose>
<when test="request.type == 'PRE'">
INNER JOIN functional_case fc ON fcre.target_id = fc.id
LEFT JOIN functional_case fc ON fcre.target_id = fc.id
</when>
<when test="request.type == 'POST'">
INNER JOIN functional_case fc ON fcre.source_id = fc.id
LEFT JOIN functional_case fc ON fcre.source_id = fc.id
</when>
</choose>
</if>
INNER JOIN `user` u ON fc.create_user = u.id
INNER JOIN project_version pv ON pv.id = fc.version_id
LEFT JOIN `user` u ON fc.create_user = u.id
LEFT JOIN project_version pv ON pv.id = fc.version_id
WHERE
fc.deleted = false
<if test="request.type != null and request.type != ''">