refactor(接口测试): 同步问题页面问题优化以及sql优化

--user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001015926
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001015929
This commit is contained in:
guoyuqi 2022-08-17 18:29:24 +08:00 committed by 刘瑞斌
parent 6916b2d8c5
commit 88bd0090fe
3 changed files with 4 additions and 8 deletions

View File

@ -1317,10 +1317,6 @@ public class ApiTestCaseService {
ApiScenarioReferenceIdExample apiScenarioReferenceIdExample = new ApiScenarioReferenceIdExample(); ApiScenarioReferenceIdExample apiScenarioReferenceIdExample = new ApiScenarioReferenceIdExample();
apiScenarioReferenceIdExample.createCriteria().andDataTypeEqualTo(ReportTriggerMode.CASE.name()).andReferenceTypeEqualTo(MsTestElementConstants.REF.name()).andReferenceIdEqualTo(testId); apiScenarioReferenceIdExample.createCriteria().andDataTypeEqualTo(ReportTriggerMode.CASE.name()).andReferenceTypeEqualTo(MsTestElementConstants.REF.name()).andReferenceIdEqualTo(testId);
List<ApiScenarioReferenceId> apiScenarioReferenceIds = apiScenarioReferenceIdMapper.selectByExample(apiScenarioReferenceIdExample); List<ApiScenarioReferenceId> apiScenarioReferenceIds = apiScenarioReferenceIdMapper.selectByExample(apiScenarioReferenceIdExample);
if (CollectionUtils.isEmpty(apiScenarioReferenceIds)) {
return 0;
} else {
return apiScenarioReferenceIds.size(); return apiScenarioReferenceIds.size();
} }
} }
}

View File

@ -510,7 +510,7 @@
</foreach>) </foreach>)
</if> </if>
<if test="request.toBeUpdated !=null and request.toBeUpdated == true and request.statusList.size() == 0"> <if test="request.toBeUpdated !=null and request.toBeUpdated == true and request.statusList.size() == 0">
and ( t1.to_be_updated = #{request.toBeUpdated} and t1.to_be_updated = #{request.toBeUpdated}
</if> </if>
<if test="request.toBeUpdated !=null and request.toBeUpdated == true and request.toBeUpdateTime !=null and request.statusList.size() > 0"> <if test="request.toBeUpdated !=null and request.toBeUpdated == true and request.toBeUpdateTime !=null and request.statusList.size() > 0">
and (t1.to_be_update_time >= #{request.toBeUpdateTime} or t1.status in and (t1.to_be_update_time >= #{request.toBeUpdateTime} or t1.status in
@ -519,7 +519,7 @@
</foreach>) </foreach>)
</if> </if>
<if test="request.toBeUpdated !=null and request.toBeUpdated == true and request.toBeUpdateTime !=null and request.statusList.size() == 0"> <if test="request.toBeUpdated !=null and request.toBeUpdated == true and request.toBeUpdateTime !=null and request.statusList.size() == 0">
and (t1.to_be_update_time >= #{request.toBeUpdateTime} and t1.to_be_update_time >= #{request.toBeUpdateTime}
</if> </if>
<include refid="queryVersionCondition"> <include refid="queryVersionCondition">
<property name="versionTable" value="t1"/> <property name="versionTable" value="t1"/>

View File

@ -29,5 +29,5 @@ public class ProjectConfig {
private String triggerUpdate; private String triggerUpdate;
private Boolean openUpdateTime = false; private Boolean openUpdateTime = false;
private String openUpdateRuleTime; private String openUpdateRuleTime;
private Boolean openUpdateRule = null; private Boolean openUpdateRule;
} }