|
@@ -38,48 +38,74 @@ public class CrowTestSquareController extends BaseSearchController {
|
|
@Autowired
|
|
@Autowired
|
|
private CrowdTestSquareService crowdTestSquareService;
|
|
private CrowdTestSquareService crowdTestSquareService;
|
|
|
|
|
|
- @Value("${square.task.count}")
|
|
|
|
- private int taskCount;
|
|
|
|
|
|
+ @Value("${square.count.index.project}")
|
|
|
|
+ private int indexProjectCount;
|
|
|
|
|
|
- @Value("${square.project.count}")
|
|
|
|
- private int projectCount;
|
|
|
|
|
|
+ @Value("${square.count.index.task}")
|
|
|
|
+ private int indexTaskCount;
|
|
|
|
|
|
- @Value("${square.index.count}")
|
|
|
|
- private int indexCount;
|
|
|
|
|
|
+ @Value("${square.count.card.project}")
|
|
|
|
+ private int cardProjectCount;
|
|
|
|
+
|
|
|
|
+ @Value("${square.count.card.task}")
|
|
|
|
+ private int cardTaskCount;
|
|
|
|
+
|
|
|
|
+ @Value("${square.count.show.project}")
|
|
|
|
+ private int showProjectCount;
|
|
|
|
+
|
|
|
|
+ @Value("${square.count.show.task}")
|
|
|
|
+ private int showTaskCount;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 获取众测广场首页所有的数据,包装到CrowdTestSquareIndexDTO里面*
|
|
|
|
|
|
+ * 获取众测广场首页任务和项目最多各indexCount个(6个),按照创建时间排序*
|
|
*
|
|
*
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
public ResponseVO getAll() {
|
|
public ResponseVO getAll() {
|
|
CrowdTestSquareIndexDTO crowdTestSquareIndexDTO = new CrowdTestSquareIndexDTO();
|
|
CrowdTestSquareIndexDTO crowdTestSquareIndexDTO = new CrowdTestSquareIndexDTO();
|
|
- crowdTestSquareIndexDTO.setCrowdTestProjectVOs(crowdProjectService.findIndexProjectLimitCount(indexCount));//众测项目
|
|
|
|
- crowdTestSquareIndexDTO.setCrowdTestTaskVOS(crowdTaskService.findIndexTaskLimitCount(indexCount));//众测任务
|
|
|
|
-// crowdTestSquareIndexDTO.setHotCrowdTaskVOs(crowdTaskService.findMoreHotTasksList("", taskCount));//热门任务
|
|
|
|
-// crowdTestSquareIndexDTO.setHotCrowdTestProjectVOs(crowdProjectService.findHotProjectCardLimitCount());//热门项目
|
|
|
|
|
|
+ crowdTestSquareIndexDTO.setCrowdTestProjectVOs(crowdProjectService.findIndexProjectLimitCount(indexProjectCount));//众测项目
|
|
|
|
+ crowdTestSquareIndexDTO.setCrowdTestTaskVOS(crowdTaskService.findWaitingAcceptByNameLike(indexTaskCount, "", ""));//众测任务
|
|
|
|
+ return new ResponseVO(ServerCode.SUCCESS, crowdTestSquareIndexDTO);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 搜索框模糊分页查询接口
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("search/list")
|
|
|
|
+ public ResponseVO findSquareTaskOrProjectByName(@RequestBody SearchConditionVO searchConditionVO) {
|
|
|
|
+ return crowdTestSquareService.findSquareTaskOrProjectByName(searchConditionVO);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 根据测试类型筛选测试任务
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/task/{testTypeCode}")
|
|
|
|
+ public ResponseVO getAll(@PathVariable("testTypeCode") String testTypeCode) {
|
|
|
|
+ CrowdTestSquareIndexDTO crowdTestSquareIndexDTO = new CrowdTestSquareIndexDTO();
|
|
|
|
+ crowdTestSquareIndexDTO.setCrowdTestTaskVOS(crowdTaskService.findWaitingAcceptByNameLike(showTaskCount,"", testTypeCode));//众测任务
|
|
return new ResponseVO(ServerCode.SUCCESS, crowdTestSquareIndexDTO);
|
|
return new ResponseVO(ServerCode.SUCCESS, crowdTestSquareIndexDTO);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 获取热门测试任务、热门测试项目
|
|
|
|
|
|
+ * 获取热门测试任务、热门测试项目卡片,按照接包人数、创建时间排序
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@GetMapping("/hotTaskAndProject")
|
|
@GetMapping("/hotTaskAndProject")
|
|
public ResponseVO getHotTaskAndProject() {
|
|
public ResponseVO getHotTaskAndProject() {
|
|
CrowdTestSquareIndexDTO crowdTestSquareIndexDTO = new CrowdTestSquareIndexDTO();
|
|
CrowdTestSquareIndexDTO crowdTestSquareIndexDTO = new CrowdTestSquareIndexDTO();
|
|
- crowdTestSquareIndexDTO.setHotCrowdTestProjectVOs(crowdProjectService.findHotProjectCardLimitCount(projectCount));//热门项目
|
|
|
|
- crowdTestSquareIndexDTO.setHotCrowdTaskVOs(crowdTaskService.findMoreHotTasksList("", taskCount));//热门任务
|
|
|
|
|
|
+ crowdTestSquareIndexDTO.setHotCrowdTestProjectVOs(crowdProjectService.findHotProjectCardLimitCount(cardProjectCount));//热门项目
|
|
|
|
+ crowdTestSquareIndexDTO.setHotCrowdTaskVOs(crowdTaskService.findMoreHotTasksList("", cardTaskCount, ""));//热门任务
|
|
return new ResponseVO(ServerCode.SUCCESS, crowdTestSquareIndexDTO);
|
|
return new ResponseVO(ServerCode.SUCCESS, crowdTestSquareIndexDTO);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 更多热门项目列表
|
|
|
|
|
|
+ * 更多热门项目列表,按照接包人数、状态、创建时间排序
|
|
* @param searchConditionVO
|
|
* @param searchConditionVO
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
-
|
|
|
|
@PostMapping("/hotProject/list")
|
|
@PostMapping("/hotProject/list")
|
|
public ResponseVO findMoreHotProjectLists(@RequestBody SearchConditionVO searchConditionVO) {
|
|
public ResponseVO findMoreHotProjectLists(@RequestBody SearchConditionVO searchConditionVO) {
|
|
Pageable pageable = this.getPageable(searchConditionVO);
|
|
Pageable pageable = this.getPageable(searchConditionVO);
|
|
@@ -89,40 +115,18 @@ public class CrowTestSquareController extends BaseSearchController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 更多热门任务列表
|
|
|
|
|
|
+ * 更多热门任务列表,按照接包人数、状态、创建时间排序
|
|
* @param searchConditionVO
|
|
* @param searchConditionVO
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
-
|
|
|
|
@PostMapping("/hotTasks/list")
|
|
@PostMapping("/hotTasks/list")
|
|
public ResponseVO findMoreHotTasksList(@RequestBody SearchConditionVO searchConditionVO) {
|
|
public ResponseVO findMoreHotTasksList(@RequestBody SearchConditionVO searchConditionVO) {
|
|
Pageable pageable = this.getPageable(searchConditionVO);
|
|
Pageable pageable = this.getPageable(searchConditionVO);
|
|
- List<CrowdTaskVO> crowdTestProjectVOList = crowdTaskService.findMoreHotTasksList(searchConditionVO.getKeyword(), 0);
|
|
|
|
|
|
+ List<CrowdTaskVO> crowdTestProjectVOList = crowdTaskService.findMoreHotTasksList(searchConditionVO.getKeyword(), 0, "");
|
|
Page<CrowdTaskVO> taskVOPage = DataUtils.listToPage(crowdTestProjectVOList, pageable);
|
|
Page<CrowdTaskVO> taskVOPage = DataUtils.listToPage(crowdTestProjectVOList, pageable);
|
|
return new ResponseVO(ServerCode.SUCCESS, taskVOPage);
|
|
return new ResponseVO(ServerCode.SUCCESS, taskVOPage);
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * 根据测试类型筛选测试任务
|
|
|
|
- *
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @GetMapping("/task/{testTypeCode}")
|
|
|
|
- public ResponseVO getAll(@PathVariable("testTypeCode") String testTypeCode) {
|
|
|
|
- CrowdTestSquareIndexDTO crowdTestSquareIndexDTO = new CrowdTestSquareIndexDTO();
|
|
|
|
- List<CrowdTaskVO> crowdTestTasks = crowdTaskService.findAllByTestTypeCode(testTypeCode);
|
|
|
|
- crowdTestSquareIndexDTO.setCrowdTestTaskVOS(crowdTestTasks);//众测任务
|
|
|
|
- return new ResponseVO(ServerCode.SUCCESS, crowdTestSquareIndexDTO);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 搜索框模糊分页查询接口
|
|
|
|
- */
|
|
|
|
- @PostMapping("search/list")
|
|
|
|
- public ResponseVO findByNameLike(@RequestBody SearchConditionVO searchConditionVO) {
|
|
|
|
- return crowdTestSquareService.findByNameLike(searchConditionVO);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
public Page<?> search(String searchCondition) {
|
|
public Page<?> search(String searchCondition) {
|
|
return null;
|
|
return null;
|