Commit 252040b2 by “Kongxiangkun”

投票明细增加分页

parent 1947ab67
...@@ -79,7 +79,7 @@ public class DownloadResearchAnalyze extends AbstractDefaultTask<String, Map<Str ...@@ -79,7 +79,7 @@ public class DownloadResearchAnalyze extends AbstractDefaultTask<String, Map<Str
List<ViewAnswerVo> viewAnswerVos = new ArrayList<ViewAnswerVo>(); List<ViewAnswerVo> viewAnswerVos = new ArrayList<ViewAnswerVo>();
List<ViewAnswerVo> viewAnswerVos1; List<ViewAnswerVo> viewAnswerVos1;
List<TrResearchQuestionOptionVo> trResearchQuestionOptions = researchQuestionOptionClient.listOption(research.getId()); List<TrResearchQuestionOptionVo> trResearchQuestionOptions = researchQuestionOptionClient.listOption(research.getId());
List<TrResearchQuestionVo> trResearchQuestions = researchQuestionClient.listAll(research.getId(), null, null); List<TrResearchQuestionVo> trResearchQuestions = researchQuestionClient.listAll(research.getId());
if (trResearchQuestions == null) { if (trResearchQuestions == null) {
trResearchQuestions = new ArrayList<TrResearchQuestionVo>(); trResearchQuestions = new ArrayList<TrResearchQuestionVo>();
} }
......
...@@ -162,7 +162,7 @@ public class ExportResearch { ...@@ -162,7 +162,7 @@ public class ExportResearch {
map.put("startDate", startDate); map.put("startDate", startDate);
map.put("endDate", endDate); map.put("endDate", endDate);
map.put("taskName", taskName); map.put("taskName", taskName);
List<TrResearchQuestionVo> trResearchQuestions = researchQuestionClient.listAll(researchId, null, null); List<TrResearchQuestionVo> trResearchQuestions = researchQuestionClient.listAll(researchId);
if (trResearchQuestions == null) { if (trResearchQuestions == null) {
trResearchQuestions = new ArrayList<TrResearchQuestionVo>(); trResearchQuestions = new ArrayList<TrResearchQuestionVo>();
} }
......
...@@ -314,7 +314,7 @@ public class ResearchController { ...@@ -314,7 +314,7 @@ public class ResearchController {
Long id = idVo.getId(); Long id = idVo.getId();
// 判断当前调研下是否有添加问题 // 判断当前调研下是否有添加问题
List<TrResearchQuestionVo> researchQuestionVoList = researchQuestionClient.listAll(id, null, null); List<TrResearchQuestionVo> researchQuestionVoList = researchQuestionClient.listAll(id);
if (CollectionUtils.isEmpty(researchQuestionVoList)) { if (CollectionUtils.isEmpty(researchQuestionVoList)) {
return Response.fail(ReturnCode.BIZ_FAIL.getCode(), "当前投票没有添加问题,禁止上架!"); return Response.fail(ReturnCode.BIZ_FAIL.getCode(), "当前投票没有添加问题,禁止上架!");
} }
......
...@@ -125,7 +125,7 @@ public class ResearchQuestionsController { ...@@ -125,7 +125,7 @@ public class ResearchQuestionsController {
if (state != 2) { if (state != 2) {
return Response.ok(1); return Response.ok(1);
} }
return Response.ok(researchQuestionClient.listAll(researchId, null, null)); return Response.ok(researchQuestionClient.listAll(researchId));
} catch (Exception e) { } catch (Exception e) {
LOGGER.error("", e); LOGGER.error("", e);
return Response.fail(ReturnCode.SERVICE_UNAVAILABLE.getCode(),ReturnCode.SERVICE_UNAVAILABLE.getMsg()); return Response.fail(ReturnCode.SERVICE_UNAVAILABLE.getCode(),ReturnCode.SERVICE_UNAVAILABLE.getMsg());
...@@ -135,12 +135,10 @@ public class ResearchQuestionsController { ...@@ -135,12 +135,10 @@ public class ResearchQuestionsController {
@GetMapping("/list/all") @GetMapping("/list/all")
@ApiOperation(value = "调研问题列表pc端", notes = "所有问题", response = TrResearchQuestionVo.class) @ApiOperation(value = "调研问题列表pc端", notes = "所有问题", response = TrResearchQuestionVo.class)
public Response<TrResearchQuestionVo> listAll( public Response<TrResearchQuestionVo> listAll(
@ApiParam(name = "pageNo", value = "当前页") @RequestParam(name = "pageNo", required = false) Integer pageNo,
@ApiParam(name = "pageSize", value = "每页的个数") @RequestParam(name = "pageSize", required = false) Integer pageSize,
@ApiParam(name = "researchId", value = "调研id", required = true) @RequestParam(name = "researchId") Long researchId @ApiParam(name = "researchId", value = "调研id", required = true) @RequestParam(name = "researchId") Long researchId
) { ) {
try { try {
return Response.ok(researchQuestionClient.listAll(researchId, pageSize, pageNo)); return Response.ok(researchQuestionClient.listAll(researchId));
} catch (Exception e) { } catch (Exception e) {
LOGGER.error("", e); LOGGER.error("", e);
return Response.fail(Constants.RESEARCH_MSG_BIZ_ERROR); return Response.fail(Constants.RESEARCH_MSG_BIZ_ERROR);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment