springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -630,13 +630,13 @@ record1.setComplaintId(complaint.getId()); record1.setLatestFlag(true); record1.setAuditType(2); record1.setAuditStatus(2); record1.setAuditStatus(0); record1.setCreateBy(loginUserInfoVO.getUserId()); record1.setCreateTime(new Date(System.currentTimeMillis())); record1.setUpdateBy(loginUserInfoVO.getUserId()); record1.setUpdateTime(new Date(System.currentTimeMillis())); record1.setReporter(loginUserInfoVO.getNickName()); record1.setReportType(systemUser.getAccountLevel()); record1.setReportType(Objects.isNull(systemUser) ? 5 : systemUser.getAccountLevel()); record1.setSuperiorId(currentId); record1.setSort(count + 1); complaintAuditRecordService.save(record1); @@ -645,7 +645,7 @@ record2.setComplaintId(complaint.getId()); record2.setLatestFlag(true); record2.setAuditType(2); record2.setAuditStatus(2); record2.setAuditStatus(0); record2.setCreateBy(loginUserInfoVO.getUserId()); record2.setCreateTime(new Date(System.currentTimeMillis())); record2.setUpdateBy(loginUserInfoVO.getUserId()); @@ -743,7 +743,8 @@ // 使用基本类型比较并补充默认分支 List<DispatchVO> dispatchVOList = new ArrayList<>(); if (accountLevel == ReportTypeEnum.STREET.getCode()) { List<ComAct> list = comActService.list(); String streetId = adminUser.getStreetId(); List<ComAct> list = comActService.list(new LambdaQueryWrapper<ComAct>().eq(ComAct::getStreetId, streetId).eq(ComAct::getState, 0)); for (ComAct comAct : list) { DispatchVO dispatchVO = new DispatchVO(); dispatchVO.setId(comAct.getCommunityId().toString()); @@ -751,7 +752,8 @@ dispatchVOList.add(dispatchVO); } } else if (accountLevel == ReportTypeEnum.DISTRICT.getCode()) { List<ComStreet> list = comStreetService.list(); String districtsCode = adminUser.getDistrictsCode(); List<ComStreet> list = comStreetService.list(new LambdaQueryWrapper<ComStreet>().eq(ComStreet::getAreaCode, districtsCode)); for (ComStreet street : list) { DispatchVO dispatchVO = new DispatchVO(); dispatchVO.setId(street.getStreetId().toString()); springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/BannerMapper.xml
@@ -5,7 +5,7 @@ <mapper namespace="com.panzhihua.sangeshenbian.dao.BannerMapper"> <select id="list" resultType="com.panzhihua.sangeshenbian.model.entity.Banner"> select * from banner where del = 0 select * from sgsb_banner where del = 0 <if test="name != null and name != ''"> and name like concat('%',#{name},'%') </if> springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/SystemUserMapper.xml
@@ -55,7 +55,7 @@ <select id="getStreet" resultType="map"> select street_id as id, name as name from com_street where area_code = #{pcode} select street_id as id, name as name from com_street where area_code = #{areaCode} </select> springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/SwaggerConfig.java
@@ -29,7 +29,7 @@ private String[] ids = new String[] {"huacheng-appletsbackstage", "huacheng-applets", "huacheng-communitybackstage", "huacheng-shopbackstage", "huacheng-gridbackstage", "huacheng-gridapp","huacheng-union-applets"}; "huacheng-gridbackstage", "huacheng-gridapp","huacheng-union-applets","huacheng-sangeshenbian"}; public SwaggerConfig(RouteLocator routeLocator) { this.routeLocator = routeLocator; springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java
@@ -212,7 +212,7 @@ String hexStr = AES.parseByte2HexStr(encrypt); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_USERINFO, hexStr); } } else if(21 == type){ }else if(21 == type){ //三个身边 String key = SecurityConstants.ROLE_USER + "sangeshenbian:" + userId; Boolean aBoolean = stringRedisTemplate.hasKey(key); @@ -253,7 +253,7 @@ safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_USERINFO, hexStr); } }else { } else { String key = SecurityConstants.ROLE_USER + userId; Boolean aBoolean = stringRedisTemplate.hasKey(key); if (aBoolean) { @@ -270,32 +270,34 @@ valueOperations.set(key, JSONArray.toJSONString(authorities), 24, TimeUnit.HOURS); } } } UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(userId, userId, authorities);// 主要使用权限 账户 密码 不重要 SecurityContextHolder.getContext().setAuthentication(authentication); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_LOGOUT, tokenHeader); // 登录用户的所有信息 String userKey = UserConstants.LOGIN_USER_INFO + userId; Boolean hasKeyLoginUserInfo = stringRedisTemplate.hasKey(userKey); if (hasKeyLoginUserInfo) { String userInfo = valueOperations.get(userKey); byte[] encrypt = AES.encrypt(userInfo, Constants.AES_KEY); String hexStr = AES.parseByte2HexStr(encrypt); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_USERINFO, hexStr); } else { R<LoginUserInfoVO> r = userService.getUserInfoByUserId(userId); if (!R.isOk(r)) { ResultUtil.responseJson(response, R.fail(HttpStatus.ERROR, "登录用户信息查询失败")); return; UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(userId, userId, authorities);// 主要使用权限 账户 密码 不重要 SecurityContextHolder.getContext().setAuthentication(authentication); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_LOGOUT, tokenHeader); // 登录用户的所有信息 String userKey = UserConstants.LOGIN_USER_INFO + userId; Boolean hasKeyLoginUserInfo = stringRedisTemplate.hasKey(userKey); if (hasKeyLoginUserInfo) { String userInfo = valueOperations.get(userKey); byte[] encrypt = AES.encrypt(userInfo, Constants.AES_KEY); String hexStr = AES.parseByte2HexStr(encrypt); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_USERINFO, hexStr); } else { R<LoginUserInfoVO> r = userService.getUserInfoByUserId(userId); if (!R.isOk(r)) { ResultUtil.responseJson(response, R.fail(HttpStatus.ERROR, "登录用户信息查询失败")); return; } LoginUserInfoVO data = r.getData(); String userInfo = JSONObject.toJSONString(data); valueOperations.set(userKey, userInfo, 24, TimeUnit.HOURS); byte[] encrypt = AES.encrypt(userInfo, Constants.AES_KEY); String hexStr = AES.parseByte2HexStr(encrypt); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_USERINFO, hexStr); } LoginUserInfoVO data = r.getData(); String userInfo = JSONObject.toJSONString(data); valueOperations.set(userKey, userInfo, 24, TimeUnit.HOURS); byte[] encrypt = AES.encrypt(userInfo, Constants.AES_KEY); String hexStr = AES.parseByte2HexStr(encrypt); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_USERINFO, hexStr); } } else { // 小程序无需登录也可访问地址列表 List<String> noLoginUrl = new ArrayList<>();