From ae30ebfc3e4a38aed0d91a42da4a1544dbd87ba3 Mon Sep 17 00:00:00 2001
From: CeDo <cedoogle@gmail.com>
Date: 星期四, 15 四月 2021 12:10:06 +0800
Subject: [PATCH] 社会调查问卷添加默认参数

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireServiceImpl.java |    6 ++++++
 springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityQuestnaireApi.java                                   |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityQuestnaireApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityQuestnaireApi.java
index b9fd4f4..4338e92 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityQuestnaireApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityQuestnaireApi.java
@@ -42,6 +42,7 @@
         pageQuestnaireDTO.setForParty(1 == isPartymember);
         pageQuestnaireDTO.setForVolunteer(1 == isVolunteer);
         pageQuestnaireDTO.setUserId(loginUserInfo.getUserId());
+        System.out.println("分页查询登录用户调查问卷: " + pageQuestnaireDTO.toString());
         return communityService.pageQuestnaire(pageQuestnaireDTO, loginUserInfo.getCommunityId());
     }
 
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireServiceImpl.java
index 4a02d5d..e82ea64 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireServiceImpl.java
@@ -350,6 +350,12 @@
 
     @Override
     public R pageQuestnaireAnswer(PageQuestnaireAnswerDTO pageQuestnaireAnswerDTO) {
+        if(pageQuestnaireAnswerDTO.getPageNum()==null||pageQuestnaireAnswerDTO.getPageNum().longValue()==0){
+            pageQuestnaireAnswerDTO.setPageNum(1l);
+        }
+        if(pageQuestnaireAnswerDTO.getPageSize()==null||pageQuestnaireAnswerDTO.getPageSize().longValue()==0){
+            pageQuestnaireAnswerDTO.setPageSize(10l);
+        }
         Page userPage = new Page(pageQuestnaireAnswerDTO.getPageNum(), pageQuestnaireAnswerDTO.getPageSize());
         IPage<ComActQuestnaireAnswerContentVO> doPager = questnaireAnswerContentDAO.selectAnswersByPage(userPage, pageQuestnaireAnswerDTO);
         return R.ok(doPager);

--
Gitblit v1.7.1