guoyuqi 2022-08-18 17:53:55 +08:00 committed by xiaomeinvG
parent f0973026ec
commit 5a560037b7
2 changed files with 21 additions and 10 deletions

View File

@ -652,8 +652,10 @@
<select id="moduleCount" resultType="java.lang.Integer">
SELECT count(api_test_case.id) FROM api_test_case
left join project on api_test_case.project_id = project.id
inner join project on api_test_case.project_id = project.id
inner JOIN api_definition a ON api_test_case.api_definition_id = a.id
<include refid="criCondition"/>
and a.latest is not null
</select>
<select id="getRequest" resultType="io.metersphere.api.dto.definition.ApiTestCaseInfo">

View File

@ -13,7 +13,9 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
@ -44,6 +46,7 @@ public class WorkstationService {
operatorValue.put("operator", "current user");
operatorValue.put("value", "current user");
combine.put("creator", operatorValue);
Map<String, List<String>> filter = new HashMap<>(2);
testPlanRequest.setCombine(combine);
apiTestCaseRequest.setCombine(combine);
ApiScenarioRequest apiScenarioRequest = new ApiScenarioRequest();
@ -52,6 +55,12 @@ public class WorkstationService {
QueryTestCaseRequest testCaseRequest = new QueryTestCaseRequest();
testCaseRequest.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
testCaseRequest.setCombine(combine);
List<String> status = new ArrayList<>();
status.add("Prepare");
status.add("Pass");
status.add("UnPass");
filter.put("reviewStatus", status);
testCaseRequest.setFilters(filter);
//query db
int apiScenarioCaseCount = extApiScenarioMapper.listModule(apiScenarioRequest);
int apiTestCaseCount = extApiTestCaseMapper.moduleCount(apiTestCaseRequest);