refactor(工作台): 我创建的数据问题
--user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001015938 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001015941
This commit is contained in:
parent
f0973026ec
commit
5a560037b7
|
@ -652,8 +652,10 @@
|
||||||
|
|
||||||
<select id="moduleCount" resultType="java.lang.Integer">
|
<select id="moduleCount" resultType="java.lang.Integer">
|
||||||
SELECT count(api_test_case.id) FROM api_test_case
|
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"/>
|
<include refid="criCondition"/>
|
||||||
|
and a.latest is not null
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRequest" resultType="io.metersphere.api.dto.definition.ApiTestCaseInfo">
|
<select id="getRequest" resultType="io.metersphere.api.dto.definition.ApiTestCaseInfo">
|
||||||
|
|
|
@ -13,7 +13,9 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@ -44,6 +46,7 @@ public class WorkstationService {
|
||||||
operatorValue.put("operator", "current user");
|
operatorValue.put("operator", "current user");
|
||||||
operatorValue.put("value", "current user");
|
operatorValue.put("value", "current user");
|
||||||
combine.put("creator", operatorValue);
|
combine.put("creator", operatorValue);
|
||||||
|
Map<String, List<String>> filter = new HashMap<>(2);
|
||||||
testPlanRequest.setCombine(combine);
|
testPlanRequest.setCombine(combine);
|
||||||
apiTestCaseRequest.setCombine(combine);
|
apiTestCaseRequest.setCombine(combine);
|
||||||
ApiScenarioRequest apiScenarioRequest = new ApiScenarioRequest();
|
ApiScenarioRequest apiScenarioRequest = new ApiScenarioRequest();
|
||||||
|
@ -52,6 +55,12 @@ public class WorkstationService {
|
||||||
QueryTestCaseRequest testCaseRequest = new QueryTestCaseRequest();
|
QueryTestCaseRequest testCaseRequest = new QueryTestCaseRequest();
|
||||||
testCaseRequest.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
|
testCaseRequest.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
|
||||||
testCaseRequest.setCombine(combine);
|
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
|
//query db
|
||||||
int apiScenarioCaseCount = extApiScenarioMapper.listModule(apiScenarioRequest);
|
int apiScenarioCaseCount = extApiScenarioMapper.listModule(apiScenarioRequest);
|
||||||
int apiTestCaseCount = extApiTestCaseMapper.moduleCount(apiTestCaseRequest);
|
int apiTestCaseCount = extApiTestCaseMapper.moduleCount(apiTestCaseRequest);
|
||||||
|
|
Loading…
Reference in New Issue