From 5ade6f6e4532b65b96d80eabe5d92302f6f817f4 Mon Sep 17 00:00:00 2001 From: CeDo <cedoogle@gmail.com> Date: 星期四, 20 五月 2021 13:50:57 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java | 37 ++++++++++++++++++++++++++++++++++--- 1 files changed, 34 insertions(+), 3 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java index 2bfd474..eab1bfe 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java @@ -1,6 +1,8 @@ package com.panzhihua.service_community.api; import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -13,7 +15,9 @@ import com.panzhihua.common.model.vos.community.questnaire.QuestnaireVO; import com.panzhihua.common.model.vos.community.questnaire.UsersAnswerQuestnaireVO; import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO; +import com.panzhihua.common.model.vos.user.SysUserNoticeVO; import com.panzhihua.common.model.vos.user.UserPhoneVO; +import com.panzhihua.common.service.user.UserService; import com.panzhihua.common.utlis.ClazzUtils; import com.panzhihua.common.utlis.IdCard; import com.panzhihua.common.utlis.IdCardUtil; @@ -29,6 +33,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Comparator; import java.util.Date; @@ -71,7 +76,8 @@ private ComActMessageService comActMessageService; @Resource private ComActQuestnaireService comActQuestnaireService; - + @Resource + private UserService userService; @Resource private EldersAuthService eldersAuthService; @Resource @@ -1560,7 +1566,8 @@ if(theFamily==null){ return R.fail("家庭成员信息错误"); } - if(theFamily.getAge()>=80){ + Integer age = IdCard.IdNOToAge(theFamily.getIdCard()); + if(age>=80){ Long loginUserId = eldersAuthAddByFamilyDTO.getUserId(); EldersAuthDO eldersAuthDO = new EldersAuthDO(); eldersAuthDO.setSumitUserId(eldersAuthAddByFamilyDTO.getSumitUserId()); @@ -1571,7 +1578,9 @@ eldersAuthDO.setVideoUrl(eldersAuthAddByFamilyDTO.getVideoUrl()); eldersAuthDO.setFamilyUserId(eldersAuthAddByFamilyDTO.getFamilyUserId()); //根据身份证查询出籍贯 出生日期 - String domicile = IdCard.domicile(eldersAuthDO.getIdCard()); + //String domicile = IdCard.domicile(eldersAuthDO.getIdCard()); + String domicile = eldersAuthService.queryDomicile(eldersAuthDO.getIdCard()); + Date birthDay = IdCard.birthDay(eldersAuthDO.getIdCard()); eldersAuthDO.setDomicile(domicile); eldersAuthDO.setBirthDay(birthDay); @@ -1593,6 +1602,28 @@ @PostMapping("/eldersauth/addFeedback") R add(@RequestBody EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO){ ClazzUtils.setIfStringIsEmpty(eldersAuthFeedbackAddDTO); + EldersAuthDO eldersAuthDO = eldersAuthService.getBaseMapper().selectById(eldersAuthFeedbackAddDTO.getAuthId()); + if(eldersAuthDO==null){ + return R.fail("认证记录不存在"); + } + R addR = eldersAuthService.addFeedback(eldersAuthFeedbackAddDTO); + if(R.isOk(addR)){ + SysUserNoticeVO sysUserNoticeVO=new SysUserNoticeVO(); + sysUserNoticeVO.setUserId(eldersAuthDO.getSumitUserId()); + sysUserNoticeVO.setType(3); + sysUserNoticeVO.setTitle("高龄认证社区社区反馈"); + sysUserNoticeVO.setBusinessType(13); + sysUserNoticeVO.setBusinessTitle(" "); + sysUserNoticeVO.setBusinessContent("你提交【" +eldersAuthDO.getAuthUserName() + "】的高龄认证,社区进行了反馈"); + sysUserNoticeVO.setBusinessId(eldersAuthDO.getId()); + sysUserNoticeVO.setStatus(0); + sysUserNoticeVO.setBusinessStatus(2); + R r1 = userService.addNotice(sysUserNoticeVO); + if (R.isOk(r1)) { + log.info("新增用户报名党建活动通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); + } + } + return eldersAuthService.addFeedback(eldersAuthFeedbackAddDTO); } -- Gitblit v1.7.1