父子编排列表调整
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import com.test.common.annotation.Excel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用例步骤对象 test_case_step
|
||||
@@ -132,4 +134,7 @@ public class TestCaseStep extends BaseEntity {
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 循环或轮询的子步骤列表 */
|
||||
private List<TestCaseStep> childrenList;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,19 @@ public class TestCaseStepServiceImpl implements ITestCaseStepService {
|
||||
*/
|
||||
@Override
|
||||
public List<TestCaseStep> selectTestCaseStepList(TestCaseStep testCaseStep) {
|
||||
return testCaseStepMapper.selectTestCaseStepList(testCaseStep);
|
||||
testCaseStep.setDelFlag("0");
|
||||
List<TestCaseStep> caseStepParentList = testCaseStepMapper.selectTestCaseStepList(testCaseStep);
|
||||
for (TestCaseStep testCaseStepParent : caseStepParentList) {
|
||||
if (testCaseStepParent.getType() > 2) {
|
||||
// 加载子步骤
|
||||
TestCaseStep testCaseStepChild = new TestCaseStep();
|
||||
testCaseStepChild.setDelFlag("0");
|
||||
testCaseStepChild.setParentId(testCaseStepParent.getId());
|
||||
List<TestCaseStep> caseStepChildrenList = testCaseStepMapper.selectTestCaseStepList(testCaseStepChild);
|
||||
testCaseStepParent.setChildrenList(caseStepChildrenList);
|
||||
}
|
||||
}
|
||||
return caseStepParentList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
<include refid="selectTestCaseStepVo"/>
|
||||
<where>
|
||||
<if test="parentId != null ">and parent_id = #{parentId}</if>
|
||||
<if test="parentId == null ">and parent_id is null</if>
|
||||
<if test="caseId != null ">and case_id = #{caseId}</if>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="stepNum != null ">and step_num = #{stepNum}</if>
|
||||
@@ -98,6 +99,7 @@
|
||||
<if test="postScript != null and postScript != ''">and post_script = #{postScript}</if>
|
||||
<if test="assignment != null and assignment != ''">and assignment = #{assignment}</if>
|
||||
<if test="assertion != null and assertion != ''">and assertion = #{assertion}</if>
|
||||
<if test="delFlag != null">and del_flag = #{delFlag}</if>
|
||||
</where>
|
||||
ORDER BY step_num
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user