Commit 252040b2 by “Kongxiangkun”

投票明细增加分页

parent 1947ab67
......@@ -79,7 +79,7 @@ public class DownloadResearchAnalyze extends AbstractDefaultTask<String, Map<Str
List<ViewAnswerVo> viewAnswerVos = new ArrayList<ViewAnswerVo>();
List<ViewAnswerVo> viewAnswerVos1;
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) {
trResearchQuestions = new ArrayList<TrResearchQuestionVo>();
}
......
......@@ -162,7 +162,7 @@ public class ExportResearch {
map.put("startDate", startDate);
map.put("endDate", endDate);
map.put("taskName", taskName);
List<TrResearchQuestionVo> trResearchQuestions = researchQuestionClient.listAll(researchId, null, null);
List<TrResearchQuestionVo> trResearchQuestions = researchQuestionClient.listAll(researchId);
if (trResearchQuestions == null) {
trResearchQuestions = new ArrayList<TrResearchQuestionVo>();
}
......
......@@ -314,7 +314,7 @@ public class ResearchController {
Long id = idVo.getId();
// 判断当前调研下是否有添加问题
List<TrResearchQuestionVo> researchQuestionVoList = researchQuestionClient.listAll(id, null, null);
List<TrResearchQuestionVo> researchQuestionVoList = researchQuestionClient.listAll(id);
if (CollectionUtils.isEmpty(researchQuestionVoList)) {
return Response.fail(ReturnCode.BIZ_FAIL.getCode(), "当前投票没有添加问题,禁止上架!");
}
......
......@@ -125,7 +125,7 @@ public class ResearchQuestionsController {
if (state != 2) {
return Response.ok(1);
}
return Response.ok(researchQuestionClient.listAll(researchId, null, null));
return Response.ok(researchQuestionClient.listAll(researchId));
} catch (Exception e) {
LOGGER.error("", e);
return Response.fail(ReturnCode.SERVICE_UNAVAILABLE.getCode(),ReturnCode.SERVICE_UNAVAILABLE.getMsg());
......@@ -135,12 +135,10 @@ public class ResearchQuestionsController {
@GetMapping("/list/all")
@ApiOperation(value = "调研问题列表pc端", notes = "所有问题", response = TrResearchQuestionVo.class)
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
) {
try {
return Response.ok(researchQuestionClient.listAll(researchId, pageSize, pageNo));
return Response.ok(researchQuestionClient.listAll(researchId));
} catch (Exception e) {
LOGGER.error("", e);
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