CeDo
2021-05-20 5ade6f6e4532b65b96d80eabe5d92302f6f817f4
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
@@ -1596,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);
    }