From 5034599c61ec0705c68e348513738ac95745d09d Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期四, 19 八月 2021 16:52:30 +0800 Subject: [PATCH] 小程序新增参数 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireServiceImpl.java | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) 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 78e8f17..6a452ed 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 @@ -533,6 +533,24 @@ return R.fail("您已填写该问卷,不可重复提交"); } + //查询填报人员信息 + R<LoginUserInfoVO> userResult = userService.getUserInfoByUserId(userId + ""); + if(!R.isOk(userResult)){ + log.error("填写问卷调查失败,未查询到用户信息"); + return R.fail("填写失败"); + } + LoginUserInfoVO userInfo = userResult.getData(); + if(questnaireDO.getForParty().equals(ComActQuestnaireDO.isOk.yes)){ + if(!userInfo.getIsPartymember().equals(1)){ + return R.fail("您还未进行党员认证,无法填报"); + } + } + if(questnaireDO.getForVolunteer().equals(ComActQuestnaireDO.isOk.yes)){ + if(!userInfo.getIsVolunteer().equals(1)){ + return R.fail("您还未进行志愿者认证,无法填报"); + } + } + List<ComActQuestnaireAnswerContentDO> answerContentList = new ArrayList<>(); //解析用户上传json数据 -- Gitblit v1.7.1