Skip to content

Commit

Permalink
增加接口,支持查询指定项目,指定平台下,所有的用例作者列表集合
Browse files Browse the repository at this point in the history
  • Loading branch information
caofengbin committed Dec 20, 2023
1 parent 8a3c513 commit 4002924
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,19 @@ public RespModel<String> copyTestById(@RequestParam(name = "id") Integer id) {
testCasesService.copyTestById(id);
return new RespModel<>(RespEnum.COPY_OK);
}

@WebAspect
@Operation(summary = "查询用例所有的作者列表", description = "查找对应项目id下对应平台的所有作者列表")
@Parameters(value = {
@Parameter(name = "projectId", description = "项目id"),
@Parameter(name = "platform", description = "平台类型"),
})
@GetMapping("/listAllCaseAuthor")
public RespModel<List<String>> findAllCaseAuthor(@RequestParam(name = "projectId") int projectId,
@RequestParam(name = "platform") int platform) {
return new RespModel<>(
RespEnum.SEARCH_OK,
testCasesService.findAllCaseAuthor(projectId, platform)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ public interface TestCasesMapper extends BaseMapper<TestCases> {
"where tstc.test_suites_id = #{suiteId} " +
"order by tstc.sort asc")
List<TestCases> listByTestSuitesId(@Param("suiteId") int suiteId);

@Select("select DISTINCT designer from test_cases WHERE project_id= #{projectId} and platform= #{platform}")
List<String> listAllTestCaseAuthor(@Param("projectId") int projectId, @Param("platform") int platform);
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,13 @@ CommentPage<TestCasesDTO> findAll(int projectId, int platform, String name, List
boolean copyTestById(int id);

Boolean updateTestCaseModuleByModuleId(Integer module);

/**
* 查询指定项目,指定平台下,所有的用例作者列表集合
*
* @param projectId 项目id
* @param platform 平台
* @return 用例作者列表集合
*/
List<String> findAllCaseAuthor(int projectId, int platform);
}
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,10 @@ public Boolean updateTestCaseModuleByModuleId(Integer module) {
}
return true;
}

@Override
public List<String> findAllCaseAuthor(int projectId, int platform) {
return testCasesMapper.listAllTestCaseAuthor(projectId, platform);
}
}

0 comments on commit 4002924

Please sign in to comment.