From a7d2d03fe177a58c22e960e9c87b32f7b05be74f Mon Sep 17 00:00:00 2001 From: CeDo <cedoo@qq.com> Date: 星期六, 01 五月 2021 22:57:48 +0800 Subject: [PATCH] add:添加小程序实名认证接口过滤(部分) --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java index 440f86e..7fc7c6d 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java @@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject; import com.panzhihua.applets.weixin.CheckService; import com.panzhihua.applets.model.dtos.ComPbMemberCertificationDTO; +import com.panzhihua.common.constants.SecurityConstants; +import com.panzhihua.common.constants.UserConstants; import com.panzhihua.common.model.dtos.user.SysUserEditTipsDTO; import com.panzhihua.common.model.dtos.user.SysUserFeedbackDTO; import com.panzhihua.common.model.vos.community.*; @@ -21,6 +23,7 @@ import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; +import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.util.ObjectUtils; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -51,6 +54,8 @@ private PartyBuildingService partyBuildingService; @Resource private CheckService checkService; + @Resource + private StringRedisTemplate stringRedisTemplate; @ApiOperation(value = "当前登录用户信息", response = LoginUserInfoVO.class) @GetMapping("info") @@ -118,6 +123,11 @@ if (R.isOk(r1)) { log.info("新增实名认证未通过通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); } + //清空缓存 + String userRoleKey = UserConstants.LOGIN_USER_INFO + this.getLoginUserInfo().getUserId(); + String userAppletRoleKey = SecurityConstants.ROLE_APPLETS_USER + this.getLoginUserInfo().getUserId(); + stringRedisTemplate.delete(userRoleKey); + stringRedisTemplate.delete(userAppletRoleKey); } else { //未通过发通知 /** @@ -195,7 +205,7 @@ @ApiOperation(value = "家庭成员列表") @GetMapping("listfamily") - public R listFamily(@RequestParam(value = "pageNum") Long pageNum, @RequestParam("pageNum") Long pageSize) { + public R listFamily(@RequestParam(value = "pageNum") Long pageNum, @RequestParam("pageSize") Long pageSize) { Long userId = this.getUserId(); return userService.listFamily(userId, pageNum, pageSize); } @@ -353,6 +363,8 @@ PartyBuildingMemberVO partyBuildingMemberVO = new PartyBuildingMemberVO(); BeanUtils.copyProperties(comPbMemberCertificationDTO, partyBuildingMemberVO); + partyBuildingMemberVO.setAuditResult(0); + partyBuildingMemberVO.setCommunityId(communityId); //用户实名认证信息判断 String idCard = loginUserInfo.getIdCard(); -- Gitblit v1.7.1