luofl
2025-02-23 0facef68a06fb36cc1ac12730b076cead36348f9
Merge remote-tracking branch 'origin/master'
7个文件已修改
65个文件已添加
2627 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/api/LoginApi.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/service/LoginService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/service/impl/LoginServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/R.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sangeshenbian/SystemUserVo.java 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/auth/TokenService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/sangeshenbian/SystemUserService.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/BannerController.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/DepartmentController.java 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MessageNotificationController.java 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/ProblemTypeController.java 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemMenuController.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemRoleController.java 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java 235 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/WorkOrderItemConfigController.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/BannerMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/DepartmentMapper.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/MessageNotificationMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/ProblemTypeMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/SystemMenuMapper.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/SystemRoleMapper.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/SystemRoleMenuMapper.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/SystemUserMapper.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/WorkOrderItemConfigMapper.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/Banner.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/Department.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/MessageNotification.java 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/ProblemType.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/SystemMenu.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/SystemRole.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/SystemRoleMenu.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/SystemUser.java 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/WorkOrderItemConfig.java 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IBannerService.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IDepartmentService.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IMessageNotificationService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IProblemTypeService.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/ISystemMenuService.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/ISystemRoleMenuService.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/ISystemRoleService.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/ISystemUserService.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IWorkOrderItemConfigService.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/BannerServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/DepartmentServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/MessageNotificationServiceImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ProblemTypeServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemMenuServiceImpl.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemRoleMenuServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemRoleServiceImpl.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemUserServiceImpl.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/WorkOrderItemConfigServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/AddSystemRole.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/EditSystemRole.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/LoginVo.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MessageNotificationList.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/SystemRoleInfo.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/SystemRoleList.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/SystemRoleListVo.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/SystemUserList.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/SystemUserListVo.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/TokenVo.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/BannerMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/DepartmentMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/MessageNotificationMapper.xml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ProblemTypeMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/SystemMenuMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/SystemRoleMapper.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/SystemRoleMenuMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/SystemUserMapper.xml 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/WorkOrderItemConfigMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/api/LoginApi.java
@@ -318,4 +318,18 @@
        LoginReturnVO loginReturnVO = loginService.loginBatteryUser(account, password,appid);
        return R.ok(loginReturnVO);
    }
    /**
     * 三个身边后台用户登录
     * @return 登录结果
     */
    @OperLog(operModul = "三个身边后台用户登录 ")
    @PostMapping("/loginThreeAround")
    public R<LoginReturnVO> loginThreeAround(@RequestParam("userId") Integer userId) {
        LoginReturnVO loginReturnVO = loginService.loginThreeAround(userId);
        return R.ok(loginReturnVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/service/LoginService.java
@@ -157,4 +157,9 @@
     * @return 登录结果
     */
    LoginReturnVO loginBatteryUser(String account, String password,String appid);
    /**
     * 三个身边后台用户登录
     */
    LoginReturnVO loginThreeAround(Integer userId);
}
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/service/impl/LoginServiceImpl.java
@@ -380,4 +380,22 @@
        loginReturnVO.setRefreshToken(refeshToken);
        return loginReturnVO;
    }
    /**
     * 三个身边后台用户登录
     */
    @Override
    public LoginReturnVO loginThreeAround(Integer userId) {
        LoginUserInfoVO loginUser = new LoginUserInfoVO();
        loginUser.setUserId(userId.longValue());
        loginUser.setType(21);
        String token = JWTTokenUtil.generateToken(loginUser);
        String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser);
        LoginReturnVO loginReturnVO = new LoginReturnVO();
        loginReturnVO.setToken(token);
        loginReturnVO.setRefreshToken(refeshToken);
        return loginReturnVO;
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java
@@ -4,6 +4,7 @@
import javax.servlet.http.HttpServletResponse;
import com.panzhihua.common.model.vos.community.ComActVO;
import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo;
import com.panzhihua.common.utlis.StringUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.web.context.request.RequestContextHolder;
@@ -201,4 +202,23 @@
        return loginUserInfoVO;
    }
    /**
     * 获取三个身边管理后台登录用户信息
     * @return
     */
    @SneakyThrows
    public SystemUserVo getLoginUserInfoSanGeShenBian() {
        HttpServletRequest request = this.getRequest();
        String userInfo = request.getHeader(TokenConstant.TOKEN_USERINFO);
        boolean empty = ObjectUtils.isEmpty(userInfo);
        if (empty) {
            return null;
        }
        byte[] bytes = AES.parseHexStr2Byte(userInfo);
        byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY);
        userInfo = new String(decrypt);
        SystemUserVo loginUserInfoVO = JSONObject.parseObject(userInfo, SystemUserVo.class);
        return loginUserInfoVO;
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/R.java
@@ -3,6 +3,7 @@
import java.io.Serializable;
import java.lang.reflect.Field;
import io.swagger.annotations.ApiModel;
import org.springframework.util.ObjectUtils;
import com.panzhihua.common.constants.Constants;
@@ -15,6 +16,7 @@
 * @author HUANGHONGFA
 */
@Data
@ApiModel
public class R<T> implements Serializable {
    /**
     * 成功
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sangeshenbian/SystemUserVo.java
New file
@@ -0,0 +1,141 @@
package com.panzhihua.common.model.vos.sangeshenbian;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.Set;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 0:28
 */
@Data
public class SystemUserVo {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "数据ID")
    private Integer id;
    /**
     * 姓名
     */
    @TableField("name")
    @ApiModelProperty(value = "姓名", required = true)
    private String name;
    /**
     * 手机号
     */
    @TableField("phone")
    @ApiModelProperty(value = "手机号", required = true)
    private String phone;
    /**
     * 密码
     */
    @TableField("password")
    @ApiModelProperty(value = "密码", required = true)
    private String password;
    /**
     * 一级单位id
     */
    @TableField("one_department_id")
    @ApiModelProperty(value = "一级单位id", required = true)
    private Integer oneDepartmentId;
    /**
     * 二级单位id
     */
    @TableField("two_department_id")
    @ApiModelProperty(value = "二级单位id")
    private Integer twoDepartmentId;
    /**
     * 三级单位id
     */
    @TableField("three_department_id")
    @ApiModelProperty(value = "三级单位id")
    private Integer threeDepartmentId;
    /**
     * 四级单位id
     */
    @TableField("four_department_id")
    @ApiModelProperty(value = "四级单位id")
    private Integer fourDepartmentId;
    /**
     * 是否是管理员(0=否,1=是)
     */
    @TableField("is_admin")
    @ApiModelProperty(value = "是否是管理员(0=否,1=是)", required = true)
    private Integer isAdmin;
    /**
     * 职位id
     */
    @TableField("system_post_id")
    @ApiModelProperty(value = "职位id", required = true)
    private Integer systemPostId;
    /**
     * 角色id
     */
    @TableField("system_role_id")
    @ApiModelProperty(value = "角色id", required = true)
    private Integer systemRoleId;
    /**
     * 账号层级(1=市级账号,2=区县账号,3=街道账号,4=社区账号)
     */
    @TableField("account_level")
    @ApiModelProperty(value = "账号层级(1=市级账号,2=区县账号,3=街道账号,4=社区账号)", required = true)
    private Integer accountLevel;
    /**
     * 所属区县
     */
    @TableField("districts")
    @ApiModelProperty(value = "所属区县")
    private String districts;
    /**
     * 区县编号
     */
    @TableField("districts_code")
    @ApiModelProperty(value = "区县编号")
    private String districtsCode;
    /**
     * 街道
     */
    @TableField("street")
    @ApiModelProperty(value = "街道")
    private String street;
    /**
     * 街道编号
     */
    @TableField("street_code")
    @ApiModelProperty(value = "街道编号")
    private String streetCode;
    /**
     * 社区
     */
    @TableField("community")
    @ApiModelProperty(value = "社区")
    private String community;
    /**
     * 社区编号
     */
    @TableField("community_code")
    @ApiModelProperty(value = "社区编号")
    private String communityCode;
    /**
     * 状态(1=正常,2=冻结,3=删除)
     */
    @TableField("status")
    private Integer status;
    /**
     * 添加时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    @ApiModelProperty("权限集合")
    private Set<String> permissions;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/auth/TokenService.java
@@ -1,5 +1,6 @@
package com.panzhihua.common.service.auth;
import com.panzhihua.common.model.vos.LoginReturnVO;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@@ -183,4 +184,12 @@
     */
    @PostMapping("/loginBatteryUser")
    R loginBatteryUser(@RequestParam("account") String account, @RequestParam("password") String password,@RequestParam("appid")String appid);
    /**
     * 三个身边后台用户登录
     * @return 登录结果
     */
    @PostMapping("/loginThreeAround")
    R<LoginReturnVO> loginThreeAround(@RequestParam("userId") Integer userId);
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/sangeshenbian/SystemUserService.java
New file
@@ -0,0 +1,26 @@
package com.panzhihua.common.service.sangeshenbian;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 0:14
 */
@FeignClient(name = "huacheng-sangeshenbian")
public interface SystemUserService {
    /**
     *
     * @param id
     *            用户的ID
     * @return 用户所有角色
     */
    @PostMapping("/sangeshenbian/sangeshenbian/getUserById")
    R<SystemUserVo> getUserById(@RequestParam("id") String id);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/BannerController.java
New file
@@ -0,0 +1,107 @@
package com.panzhihua.sangeshenbian.api;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.interfaces.OperLog;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.sangeshenbian.model.Banner;
import com.panzhihua.sangeshenbian.model.ProblemType;
import com.panzhihua.sangeshenbian.model.SystemUser;
import com.panzhihua.sangeshenbian.service.IBannerService;
import com.panzhihua.sangeshenbian.service.ISystemUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.time.LocalDateTime;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:46
 */
@Api
@RestController
@RequestMapping("/sangeshenbian/banner")
public class BannerController extends BaseController {
    @Resource
    private IBannerService bannerService;
    @Resource
    private ISystemUserService systemUserService;
    @GetMapping("/list")
    @ApiOperation(value = "获取banner列表", tags = {"三个身边后台-banner管理"})
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取banner列表")
    public R<IPage<Banner>> list(String name, Integer pageNum, Integer pageSize){
        Integer id = this.getLoginUserInfoSanGeShenBian().getId();
        SystemUser systemUser = systemUserService.getById(id);
        if(systemUser.getAccountLevel() != 1){
            return R.ok();
        }
        IPage<Banner> list = bannerService.list(name, pageNum, pageSize);
        return R.ok(list);
    }
    @PostMapping("/add")
    @ApiOperation(value = "添加banner", tags = {"三个身边后台-banner管理"})
    @OperLog(operModul = "三个身边后台",operType = 1, businessType = "添加banner")
    public R<Banner> add(@RequestBody Banner banner){
        Integer id = this.getLoginUserInfoSanGeShenBian().getId();
        SystemUser systemUser = systemUserService.getById(id);
        if(systemUser.getAccountLevel() != 1){
            return R.fail("添加失败");
        }
        banner.setDel(0);
        banner.setCreateTime(LocalDateTime.now());
        bannerService.save(banner);
        return R.ok(banner);
    }
    @PostMapping("/edit")
    @ApiOperation(value = "编辑banner", tags = {"三个身边后台-banner管理"})
    @OperLog(operModul = "三个身边后台",operType = 2, businessType = "编辑banner")
    public R<Banner> edit(@RequestBody Banner banner){
        Integer id = this.getLoginUserInfoSanGeShenBian().getId();
        SystemUser systemUser = systemUserService.getById(id);
        if(systemUser.getAccountLevel() != 1){
            return R.fail("编辑失败");
        }
        bannerService.updateById(banner);
        return R.ok(banner);
    }
    @DeleteMapping("/delete/{id}")
    @ApiOperation(value = "删除banner", tags = {"三个身边后台-banner管理"})
    @OperLog(operModul = "三个身边后台",operType = 3, businessType = "删除banner")
    public R delete(@PathVariable("id") Integer id){
        Integer id1 = this.getLoginUserInfoSanGeShenBian().getId();
        SystemUser systemUser = systemUserService.getById(id1);
        if(systemUser.getAccountLevel() != 1){
            return R.fail("删除失败");
        }
        Banner banner = new Banner();
        banner.setId(id);
        banner.setDel(1);
        bannerService.updateById(banner);
        return R.ok();
    }
    @GetMapping("/getBannerInfo/{id}")
    @ApiOperation(value = "获取banner信息", tags = {"三个身边后台-banner管理"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "bannerID", required = true, dataType = "Integer")
    })
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取banner信息")
    public R<Banner> getBannerInfo(@PathVariable("id") Integer id){
        Banner banner = bannerService.getById(id);
        return R.ok(banner);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/DepartmentController.java
New file
@@ -0,0 +1,128 @@
package com.panzhihua.sangeshenbian.api;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.panzhihua.common.interfaces.OperLog;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.sangeshenbian.model.Department;
import com.panzhihua.sangeshenbian.model.SystemUser;
import com.panzhihua.sangeshenbian.service.IDepartmentService;
import com.panzhihua.sangeshenbian.service.ISystemUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:44
 */
@Api
@RestController
@RequestMapping("/sangeshenbian/department")
public class DepartmentController {
    @Resource
    private IDepartmentService departmentService;
    @Resource
    private ISystemUserService systemUserService;
    @GetMapping("/list")
    @ApiOperation(value = "获取单位列表", tags = {"三个身边后台-用户管理"})
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取单位列表")
    public R<List<Department>> list(){
        List<Department> list = departmentService.list();
        List<Department> departmentList1 = list.stream().filter(s -> s.getPid() == 0).collect(Collectors.toList());
        for (Department department : departmentList1) {
            List<Department> departmentList2 = list.stream().filter(s -> s.getPid().equals(department.getId())).collect(Collectors.toList());
            for (Department department1 : departmentList2) {
                List<Department> departmentList3 = list.stream().filter(s -> s.getPid().equals(department1.getId())).collect(Collectors.toList());
                for (Department department2 : departmentList3) {
                    List<Department> departmentList4 = list.stream().filter(s -> s.getPid().equals(department2.getId())).collect(Collectors.toList());
                    department2.setChild(departmentList4);
                }
                department1.setChild(departmentList3);
            }
            department.setChild(departmentList2);
        }
        return R.ok(departmentList1);
    }
    @PostMapping("/add")
    @ApiOperation(value = "添加单位信息", tags = {"三个身边后台-用户管理"})
    @OperLog(operModul = "三个身边后台",operType = 1, businessType = "添加单位信息")
    public R add(@RequestBody Department department){
        if(null == department.getPid()){
            department.setPid(0);
        }
        int count = departmentService.count(new LambdaQueryWrapper<Department>().eq(Department::getPid, department.getPid()).eq(Department::getName, department.getName()));
        if(0 < count){
            return R.fail("单位名称重复。");
        }
        Department department1 = departmentService.getById(department.getPid());
        if(null != department1 && 4 == department1.getTier()){
            return R.fail("层级超过4级,保存失败。");
        }
        department.setTier(null == department1 ? 1 : department1.getTier() + 1);
        departmentService.save(department);
        return R.ok();
    }
    @PostMapping("/edit")
    @ApiOperation(value = "编辑单位信息", tags = {"三个身边后台-用户管理"})
    @OperLog(operModul = "三个身边后台",operType = 2, businessType = "编辑单位信息")
    public R edit(@RequestBody Department department){
        if(null == department.getPid()){
            department.setPid(0);
        }
        int count = departmentService.count(new LambdaQueryWrapper<Department>().eq(Department::getPid, department.getPid())
                .eq(Department::getName, department.getName()).ne(Department::getId, department.getId()));
        if(0 < count){
            return R.fail("单位名称重复。");
        }
        Department department1 = departmentService.getById(department.getPid());
        if(null != department1 && 4 == department1.getTier()){
            return R.fail("层级超过4级,保存失败。");
        }
        department.setTier(null == department1 ? 1 : department1.getTier() + 1);
        departmentService.updateById(department);
        return R.ok();
    }
    @DeleteMapping("/delete/{id}")
    @ApiOperation(value = "删除单位信息", tags = {"三个身边后台-用户管理"})
    @OperLog(operModul = "三个身边后台",operType = 3, businessType = "删除单位信息")
    public R delete(@PathVariable("id") Integer id){
        int count = systemUserService.count(new LambdaQueryWrapper<SystemUser>().eq(SystemUser::getOneDepartmentId, id).or().eq(SystemUser::getTwoDepartmentId, id)
                .or().eq(SystemUser::getThreeDepartmentId, id).or().eq(SystemUser::getFourDepartmentId, id).ne(SystemUser::getStatus, 3));
        if(0 < count){
            return R.fail("该单位已被使用,删除失败。");
        }
        departmentService.removeById(id);
        return R.ok();
    }
    @GetMapping("/getDepartmentList/{tier}")
    @ApiOperation(value = "根据单位层级查询单位数据", tags = {"三个身边后台-用户管理"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "tier", value = "单位层级", required = true, dataType = "Integer")
    })
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "根据单位层级查询单位数据")
    public R<List<Department>> getDepartmentList(@PathVariable("tier") Integer tier){
        List<Department> list = departmentService.list(new LambdaQueryWrapper<Department>().eq(Department::getTier, tier));
        return R.ok(list);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MessageNotificationController.java
New file
@@ -0,0 +1,66 @@
package com.panzhihua.sangeshenbian.api;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.interfaces.OperLog;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.sangeshenbian.model.MessageNotification;
import com.panzhihua.sangeshenbian.service.IMessageNotificationService;
import com.panzhihua.sangeshenbian.service.ISystemUserService;
import com.panzhihua.sangeshenbian.warpper.MessageNotificationList;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 3:05
 */
@Api
@RestController
@RequestMapping("/sangeshenbian/messageNotification")
public class MessageNotificationController extends BaseController {
    @Resource
    private IMessageNotificationService messageNotificationService;
    @Resource
    private ISystemUserService systemUserService;
    @GetMapping("/list")
    @ApiOperation(value = "获取消息通知列表", tags = {"三个身边后台-消息通知"})
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取消息通知列表")
    public R<IPage<MessageNotification>> list(MessageNotificationList query) {
        IPage<MessageNotification> page = messageNotificationService.list(query);
        return R.ok(page);
    }
    @PutMapping("/read/{id}")
    @ApiOperation(value = "标记为已读", tags = {"三个身边后台-消息通知"})
    @OperLog(operModul = "三个身边后台",operType = 2, businessType = "标记为已读")
    public R read(@PathVariable("id") Integer id) {
        MessageNotification messageNotification = messageNotificationService.getById(id);
        if(messageNotification.getReadStatus()==1){
            return R.fail("不能重复操作");
        }
        messageNotification.setReadStatus(1);
        messageNotificationService.updateById(messageNotification);
        return R.ok();
    }
    @GetMapping("/unreadCount")
    @ApiOperation(value = "获取未读数量", tags = {"三个身边后台-消息通知"})
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取未读数量")
    public R unreadCount() {
        Integer count = messageNotificationService.lambdaQuery()
                .eq(MessageNotification::getReadStatus, 0)
                .eq(MessageNotification::getUndertakerUserId, getUserId())
                .count();
        return R.ok(count);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/ProblemTypeController.java
New file
@@ -0,0 +1,118 @@
package com.panzhihua.sangeshenbian.api;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.interfaces.OperLog;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.sangeshenbian.model.ProblemType;
import com.panzhihua.sangeshenbian.model.SystemUser;
import com.panzhihua.sangeshenbian.service.IProblemTypeService;
import com.panzhihua.sangeshenbian.service.ISystemUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:27
 */
@Api
@RestController
@RequestMapping("/sangeshenbian/problemType")
public class ProblemTypeController extends BaseController {
    @Resource
    private IProblemTypeService problemTypeService;
    @Resource
    private ISystemUserService systemUserService;
    @GetMapping("/list")
    @ApiOperation(value = "获取问题类型列表", tags = {"三个身边后台-问题类型管理"})
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取问题类型列表")
    public R<IPage<ProblemType>> list(String name, Integer pageNum, Integer pageSize){
        Integer id = this.getLoginUserInfoSanGeShenBian().getId();
        SystemUser systemUser = systemUserService.getById(id);
        if(systemUser.getAccountLevel() != 1){
            return R.ok();
        }
        IPage<ProblemType> list = problemTypeService.list(name, pageNum, pageSize);
        return R.ok(list);
    }
    @PostMapping("/add")
    @ApiOperation(value = "添加问题类型", tags = {"三个身边后台-问题类型管理"})
    @OperLog(operModul = "三个身边后台",operType = 1, businessType = "添加问题类型")
    public R add(@RequestBody ProblemType problemType){
        Integer id = this.getLoginUserInfoSanGeShenBian().getId();
        SystemUser systemUser = systemUserService.getById(id);
        if(systemUser.getAccountLevel() != 1){
            return R.fail("添加失败");
        }
        int count = problemTypeService.count(new LambdaQueryWrapper<ProblemType>().eq(ProblemType::getName, problemType.getName()).eq(ProblemType::getDel, 0));
        if(0 < count){
            return R.fail("该问题类型已存在");
        }
        problemType.setDel(0);
        problemType.setCreateTime(LocalDateTime.now());
        problemTypeService.save(problemType);
        return R.ok();
    }
    @PostMapping("/edit")
    @ApiOperation(value = "编辑问题类型", tags = {"三个身边后台-问题类型管理"})
    @OperLog(operModul = "三个身边后台",operType = 2, businessType = "编辑问题类型")
    public R edit(@RequestBody ProblemType problemType){
        Integer id = this.getLoginUserInfoSanGeShenBian().getId();
        SystemUser systemUser = systemUserService.getById(id);
        if(systemUser.getAccountLevel() != 1){
            return R.fail("编辑失败");
        }
        int count = problemTypeService.count(new LambdaQueryWrapper<ProblemType>().eq(ProblemType::getName, problemType.getName()).eq(ProblemType::getDel, 0).ne(ProblemType::getId, problemType.getId()));
        if(0 < count){
            return R.fail("该问题类型已存在");
        }
        problemTypeService.updateById(problemType);
        return R.ok();
    }
    @DeleteMapping("/delete/{id}")
    @ApiOperation(value = "删除问题类型", tags = {"三个身边后台-问题类型管理"})
    @OperLog(operModul = "三个身边后台",operType = 3, businessType = "删除问题类型")
    public R delete(@PathVariable("id") Integer id){
        Integer userid = this.getLoginUserInfoSanGeShenBian().getId();
        SystemUser systemUser = systemUserService.getById(userid);
        if(systemUser.getAccountLevel() != 1){
            return R.fail("删除失败");
        }
        ProblemType problemType = new ProblemType();
        problemType.setId(id);
        problemType.setDel(1);
        problemTypeService.updateById(problemType);
        return R.ok();
    }
    @GetMapping("/getProblemTypeInfo/{id}")
    @ApiOperation(value = "获取问题类型信息", tags = {"三个身边后台-问题类型管理"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "问题类型ID", required = true, dataType = "Integer")
    })
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取问题类型信息")
    public R<ProblemType> getProblemTypeInfo(@PathVariable("id") Integer id){
        ProblemType problemType = problemTypeService.getById(id);
        return R.ok(problemType);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemMenuController.java
New file
@@ -0,0 +1,35 @@
package com.panzhihua.sangeshenbian.api;
import com.panzhihua.common.interfaces.OperLog;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.sangeshenbian.model.SystemMenu;
import com.panzhihua.sangeshenbian.service.ISystemMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 1:22
 */
@Api
@RestController
@RequestMapping("/sangeshenbian/systemMenu")
public class SystemMenuController {
    @Resource
    private ISystemMenuService systemMenuService;
    @GetMapping("/getSystemMenuList")
    @ApiOperation(value = "获取菜单列表", tags = {"三个身边后台-角色管理"})
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取菜单列表")
    public R<List<SystemMenu>> getSystemMenuList(){
        return R.ok(systemMenuService.getSystemMenuList());
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemRoleController.java
New file
@@ -0,0 +1,132 @@
package com.panzhihua.sangeshenbian.api;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.interfaces.OperLog;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.sangeshenbian.model.SystemRole;
import com.panzhihua.sangeshenbian.model.SystemRoleMenu;
import com.panzhihua.sangeshenbian.service.ISystemRoleMenuService;
import com.panzhihua.sangeshenbian.service.ISystemRoleService;
import com.panzhihua.sangeshenbian.warpper.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 16:41
 */
@Api
@RestController
@RequestMapping("/sangeshenbian/systemRole")
public class SystemRoleController extends BaseController {
    @Resource
    private ISystemRoleService systemRoleService;
    @Resource
    private ISystemRoleMenuService systemRoleMenuService;
    @GetMapping("/list")
    @ApiOperation(value = "获取列表数据", tags = {"三个身边后台-角色管理"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "获取角色列表数据")
    public R<IPage<SystemRoleListVo>> list(SystemRoleList systemRoleList){
        IPage<SystemRoleListVo> list = systemRoleService.list(systemRoleList);
        return R.ok(list);
    }
    @PostMapping("/add")
    @ApiOperation(value = "添加角色", tags = {"三个身边后台-角色管理"})
    @OperLog(operModul = "三个身边后台",operType = 1,businessType = "添加角色")
    public R add(@RequestBody AddSystemRole addSystemRole){
        int count = systemRoleService.count(new LambdaQueryWrapper<SystemRole>().eq(SystemRole::getDel, 0).eq(SystemRole::getName, addSystemRole.getName()));
        if(0 < count){
            return R.fail("该角色名称已存在");
        }
        SystemRole systemRole = new SystemRole();
        systemRole.setName(addSystemRole.getName());
        systemRole.setDel(0);
        systemRole.setCreateTime(LocalDateTime.now());
        systemRoleService.save(systemRole);
        //添加角色菜单权限
        List<Integer> systemMenuIds = addSystemRole.getSystemMenuIds();
        for (Integer systemMenuId : systemMenuIds) {
            SystemRoleMenu systemRoleMenu = new SystemRoleMenu();
            systemRoleMenu.setSystemRoleId(systemRole.getId());
            systemRoleMenu.setSystemMenuId(systemMenuId);
            systemRoleMenuService.save(systemRoleMenu);
        }
        return R.ok();
    }
    @PostMapping("/edit")
    @ApiOperation(value = "编辑角色", tags = {"三个身边后台-角色管理"})
    @OperLog(operModul = "三个身边后台",operType = 2,businessType = "编辑角色")
    public R edit(@RequestBody EditSystemRole editSystemRole){
        int count = systemRoleService.count(new LambdaQueryWrapper<SystemRole>().eq(SystemRole::getDel, 0)
                .eq(SystemRole::getName, editSystemRole.getName()).ne(SystemRole::getId, editSystemRole.getId()));
        if(0 < count){
            return R.fail("该角色名称已存在");
        }
        SystemRole systemRole = systemRoleService.getById(editSystemRole.getId());
        if(null == systemRole){
            return R.fail("无效的角色数据");
        }
        systemRole.setName(editSystemRole.getName());
        systemRoleService.updateById(systemRole);
        //添加角色菜单权限
        systemRoleMenuService.remove(new LambdaQueryWrapper<SystemRoleMenu>().eq(SystemRoleMenu::getSystemRoleId, editSystemRole.getId()));
        List<Integer> systemMenuIds = editSystemRole.getSystemMenuIds();
        for (Integer systemMenuId : systemMenuIds) {
            SystemRoleMenu systemRoleMenu = new SystemRoleMenu();
            systemRoleMenu.setSystemRoleId(systemRole.getId());
            systemRoleMenu.setSystemMenuId(systemMenuId);
            systemRoleMenuService.save(systemRoleMenu);
        }
        return R.ok();
    }
    @DeleteMapping("/delete/{id}")
    @ApiOperation(value = "删除角色", tags = {"三个身边后台-角色管理"})
    @OperLog(operModul = "三个身边后台",operType = 3,businessType = "删除角色")
    public R delete(@PathVariable("id") Integer id){
        SystemRole systemRole = systemRoleService.getById(id);
        systemRole.setDel(1);
        systemRoleService.updateById(systemRole);
        //删除角色菜单权限
        systemRoleMenuService.remove(new LambdaQueryWrapper<SystemRoleMenu>().eq(SystemRoleMenu::getSystemRoleId, id));
        return R.ok();
    }
    @GetMapping("/getSystemRoleInfo/{id}")
    @ApiOperation(value = "获取角色详情", tags = {"三个身边后台-角色管理"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "获取角色详情")
    public R<SystemRoleInfo> getSystemRoleInfo(@PathVariable("id") Integer id){
        SystemRole systemRole = systemRoleService.getById(id);
        if(null == systemRole){
            return R.fail("无效的角色数据");
        }
        List<SystemRoleMenu> list = systemRoleMenuService.list(new LambdaQueryWrapper<SystemRoleMenu>().eq(SystemRoleMenu::getSystemRoleId, id));
        SystemRoleInfo systemRoleInfo = new SystemRoleInfo();
        systemRoleInfo.setId(systemRole.getId());
        systemRoleInfo.setName(systemRoleInfo.getName());
        systemRoleInfo.setSystemMenuIds(list.stream().map(SystemRoleMenu::getSystemMenuId).collect(Collectors.toList()));
        return R.ok(systemRoleInfo);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java
New file
@@ -0,0 +1,235 @@
package com.panzhihua.sangeshenbian.api;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.panzhihua.common.constants.SecurityConstants;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.interfaces.OperLog;
import com.panzhihua.common.model.dtos.PageBaseDTO;
import com.panzhihua.common.model.vos.LoginReturnVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo;
import com.panzhihua.common.service.auth.TokenService;
import com.panzhihua.sangeshenbian.model.SystemMenu;
import com.panzhihua.sangeshenbian.model.SystemRoleMenu;
import com.panzhihua.sangeshenbian.model.SystemUser;
import com.panzhihua.sangeshenbian.service.ISystemMenuService;
import com.panzhihua.sangeshenbian.service.ISystemRoleMenuService;
import com.panzhihua.sangeshenbian.service.ISystemUserService;
import com.panzhihua.sangeshenbian.warpper.LoginVo;
import com.panzhihua.sangeshenbian.warpper.SystemUserList;
import com.panzhihua.sangeshenbian.warpper.SystemUserListVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
 * @author zhibing.pu
 * @Date 2025/2/18 22:30
 */
@Api
@RestController
@RequestMapping("/sangeshenbian/systemUser")
public class SystemUserController extends BaseController {
    @Resource
    private ISystemUserService systemUserService;
    @Resource
    private RedisTemplate redisTemplate;
    @Resource
    private TokenService tokenService;
    private final Integer max_err = 5;
    @Resource
    private ISystemRoleMenuService systemRoleMenuService;
    @Resource
    private ISystemMenuService systemMenuService;
    @PostMapping("/login")
    @ApiOperation(value = "登录", tags = {"三个身边后台-登录"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "登录")
    public R<LoginReturnVO> login(@RequestBody LoginVo vo){
        String key = "login:" + vo.getPhone();
        Integer size = (Integer) redisTemplate.opsForValue().get(key);
        if(null != size && max_err.equals(size)){
            return R.fail("连续登录失败,请稍后重试。");
        }
        if(null == size){
            size = 0;
        }
        SystemUser systemUser = systemUserService.getOne(new LambdaQueryWrapper<SystemUser>()
                .eq(SystemUser::getPhone, vo.getPhone()).ne(SystemUser::getStatus, 3));
        if(null == systemUser){
            size++;
            redisTemplate.opsForValue().set(key, size, 5, TimeUnit.MINUTES);
            return R.fail("登录失败,手机号/密码错误。");
        }
        if(!vo.getPassword().equals(systemUser.getPassword())){
            size++;
            redisTemplate.opsForValue().set(key, size, 5, TimeUnit.MINUTES);
            return R.fail("登录失败,手机号/密码错误。");
        }
        if(2 == systemUser.getStatus()){
            return R.fail("当前账号已冻结。");
        }
        //创建token
        R<LoginReturnVO> reult = tokenService.loginThreeAround(systemUser.getId());
        redisTemplate.delete(key);
        return reult;
    }
    @PostMapping("logout")
    @ApiOperation(value = "退出登录", tags = {"三个身边后台-登录"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "退出登录")
    public R login() {
        String token = this.getToken();
        if (ObjectUtils.isEmpty(token)) {
            return R.ok();
        }
        return tokenService.logout(token);
    }
    @GetMapping("/list")
    @ApiOperation(value = "获取列表数据", tags = {"三个身边管理后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "获取人员管理列表数据")
    public R<IPage<SystemUserListVo>> list(SystemUserList query){
        Integer id = this.getLoginUserInfoSanGeShenBian().getId();
        SystemUser user = systemUserService.getById(id);
        IPage<SystemUserListVo> list = systemUserService.list(user.getAccountLevel(), query);
        return R.ok(list);
    }
    @PostMapping("/add")
    @ApiOperation(value = "添加人员", tags = {"三个身边管理后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 1,businessType = "添加人员")
    public R add(@RequestBody SystemUser systemUser){
        Integer id = this.getLoginUserInfoSanGeShenBian().getId();
        SystemUser user = systemUserService.getById(id);
        if(2 == user.getAccountLevel() && 1 == systemUser.getAccountLevel()){
            return R.fail("不能添加市级账号");
        }
        if(3 == user.getAccountLevel() && 3 < systemUser.getAccountLevel()){
            return R.fail("不能添加区县和市级账号");
        }
        if(4 == user.getAccountLevel() && 4 < systemUser.getAccountLevel()){
            return R.fail("不能添加街道、区县和市级账号");
        }
        int count = systemUserService.count(new LambdaQueryWrapper<SystemUser>().eq(SystemUser::getPhone, systemUser.getPhone()).ne(SystemUser::getStatus, 3));
        if(0 < count){
            return R.fail("手机号重复。");
        }
        systemUser.setStatus(1);
        systemUser.setCreateTime(LocalDateTime.now());
        systemUserService.save(systemUser);
        return R.ok();
    }
    @PostMapping("/edit")
    @ApiOperation(value = "编辑人员", tags = {"三个身边后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 2,businessType = "编辑人员")
    public R edit(@RequestBody SystemUser systemUser){
        int count = systemUserService.count(new LambdaQueryWrapper<SystemUser>().eq(SystemUser::getPhone, systemUser.getPhone())
                .ne(SystemUser::getStatus, 3).ne(SystemUser::getId, systemUser.getId()));
        if(0 < count){
            return R.fail("手机号重复。");
        }
        systemUser.setStatus(1);
        systemUser.setCreateTime(LocalDateTime.now());
        systemUserService.updateById(systemUser);
        return R.ok();
    }
    @DeleteMapping("/delete/{id}")
    @ApiOperation(value = "删除人员", tags = {"三个身边后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 3,businessType = "删除人员")
    public R delete(@PathVariable("id") Integer id){
        SystemUser systemUser = systemUserService.getById(id);
        systemUser.setStatus(3);
        systemUserService.updateById(systemUser);
        return R.ok();
    }
    @GetMapping("/getSystemUserInfo/{id}")
    @ApiOperation(value = "查询人员详情", tags = {"三个身边后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "查询人员详情")
    public R<SystemUser> getSystemUserInfo(@PathVariable("id") Integer id){
        SystemUser systemUser = systemUserService.getById(id);
        return R.ok(systemUser);
    }
    @PutMapping("/freeze/{id}")
    @ApiOperation(value = "冻结账号", tags = {"三个身边后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "冻结账号")
    public R freeze(@PathVariable("id") Integer id){
        SystemUser systemUser = systemUserService.getById(id);
        if(2 == systemUser.getStatus()){
            return R.fail("不能重复操作");
        }
        systemUser.setStatus(2);
        systemUserService.updateById(systemUser);
        return R.ok();
    }
    @PutMapping("/unfreeze/{id}")
    @ApiOperation(value = "解冻账号", tags = {"三个身边后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "解冻账号")
    public R unfreeze(@PathVariable("id") Integer id){
        SystemUser systemUser = systemUserService.getById(id);
        if(1 == systemUser.getStatus()){
            return R.fail("不能重复操作");
        }
        systemUser.setStatus(1);
        systemUserService.updateById(systemUser);
        return R.ok();
    }
    /**
     * 根据用户id获取信息
     * @param id
     * @return
     */
    @PostMapping("/getUserById")
    public R<SystemUserVo> getUserById(@RequestParam("id") String id){
        SystemUser systemUser = systemUserService.getById(id);
        SystemUserVo systemUserVo = new SystemUserVo();
        List<SystemRoleMenu> list = systemRoleMenuService.list(new LambdaQueryWrapper<SystemRoleMenu>().eq(SystemRoleMenu::getSystemRoleId, systemUser.getSystemRoleId()));
        List<Integer> collect = list.stream().map(SystemRoleMenu::getSystemMenuId).collect(Collectors.toList());
        Set<String> collect1 = new HashSet<>();
        if(collect.size() > 0){
            List<SystemMenu> systemMenus = systemMenuService.listByIds(collect);
            collect1 = systemMenus.stream().map(SystemMenu::getUrl).collect(Collectors.toSet());
        }
        systemUserVo.setPermissions(collect1);
        BeanUtils.copyProperties(systemUser, systemUserVo);
        return R.ok(systemUserVo);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/WorkOrderItemConfigController.java
New file
@@ -0,0 +1,42 @@
package com.panzhihua.sangeshenbian.api;
import com.panzhihua.common.interfaces.OperLog;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.sangeshenbian.model.WorkOrderItemConfig;
import com.panzhihua.sangeshenbian.service.IWorkOrderItemConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:09
 */
@Api
@RestController
@RequestMapping("/sangeshenbian/workOrderItemConfig")
public class WorkOrderItemConfigController {
    @Resource
    private IWorkOrderItemConfigService workOrderItemConfigService;
    @GetMapping("/getWorkOrderItemConfigInfo")
    @ApiOperation(value = "获取工单事项配置", tags = {"三个身边后台-工单事项配置"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "获取工单事项配置")
    public R<WorkOrderItemConfig> getWorkOrderItemConfigInfo(){
        WorkOrderItemConfig one = workOrderItemConfigService.getOne(null);
        return R.ok(one);
    }
    @PostMapping("/addWorkOrderItemConfig")
    @ApiOperation(value = "保存工单事项配置", tags = {"三个身边后台-工单事项配置"})
    @OperLog(operModul = "三个身边后台",operType = 1,businessType = "保存工单事项配置")
    public R<WorkOrderItemConfig> add(@RequestBody WorkOrderItemConfig workOrderItemConfig){
        workOrderItemConfigService.saveOrUpdate(workOrderItemConfig);
        return R.ok();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/BannerMapper.java
New file
@@ -0,0 +1,17 @@
package com.panzhihua.sangeshenbian.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.sangeshenbian.model.Banner;
import org.apache.ibatis.annotations.Param;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:44
 */
public interface BannerMapper extends BaseMapper<Banner> {
    IPage<Banner> list(Page page, @Param("name") String name);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/DepartmentMapper.java
New file
@@ -0,0 +1,11 @@
package com.panzhihua.sangeshenbian.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.panzhihua.sangeshenbian.model.Department;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:42
 */
public interface DepartmentMapper extends BaseMapper<Department> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/MessageNotificationMapper.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.sangeshenbian.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.sangeshenbian.model.MessageNotification;
import com.panzhihua.sangeshenbian.warpper.MessageNotificationList;
import org.apache.ibatis.annotations.Param;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 3:03
 */
public interface MessageNotificationMapper extends BaseMapper<MessageNotification> {
    IPage<MessageNotification> list(Page page, @Param("query") MessageNotificationList query);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/ProblemTypeMapper.java
New file
@@ -0,0 +1,17 @@
package com.panzhihua.sangeshenbian.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.sangeshenbian.model.ProblemType;
import org.apache.ibatis.annotations.Param;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:25
 */
public interface ProblemTypeMapper extends BaseMapper<ProblemType> {
    IPage<ProblemType> list(Page page, @Param("name") String name);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/SystemMenuMapper.java
New file
@@ -0,0 +1,11 @@
package com.panzhihua.sangeshenbian.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.panzhihua.sangeshenbian.model.SystemMenu;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 1:02
 */
public interface SystemMenuMapper extends BaseMapper<SystemMenu> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/SystemRoleMapper.java
New file
@@ -0,0 +1,25 @@
package com.panzhihua.sangeshenbian.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.sangeshenbian.model.SystemRole;
import com.panzhihua.sangeshenbian.warpper.SystemRoleListVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 16:40
 */
public interface SystemRoleMapper extends BaseMapper<SystemRole> {
    /**
     * 获取列表数据
     * @param name
     * @return
     */
    IPage<SystemRoleListVo> list(Page page, @Param("name") String name);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/SystemRoleMenuMapper.java
New file
@@ -0,0 +1,11 @@
package com.panzhihua.sangeshenbian.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.panzhihua.sangeshenbian.model.SystemRoleMenu;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:24
 */
public interface SystemRoleMenuMapper extends BaseMapper<SystemRoleMenu> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/SystemUserMapper.java
New file
@@ -0,0 +1,27 @@
package com.panzhihua.sangeshenbian.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.sangeshenbian.model.SystemUser;
import com.panzhihua.sangeshenbian.warpper.SystemUserList;
import com.panzhihua.sangeshenbian.warpper.SystemUserListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/18 22:29
 */
@Mapper
public interface SystemUserMapper extends BaseMapper<SystemUser> {
    /**
     * 获取列表数据
     * @param query
     * @return
     */
    IPage<SystemUserListVo> list(Page page, @Param("accountLevel") Integer accountLevel, @Param("query") SystemUserList query);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/WorkOrderItemConfigMapper.java
New file
@@ -0,0 +1,11 @@
package com.panzhihua.sangeshenbian.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.panzhihua.sangeshenbian.model.WorkOrderItemConfig;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:06
 */
public interface WorkOrderItemConfigMapper extends BaseMapper<WorkOrderItemConfig> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/Banner.java
New file
@@ -0,0 +1,49 @@
package com.panzhihua.sangeshenbian.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:42
 */
@Data
@ApiModel
@TableName("sgsb_banner")
public class Banner {
    /**
     * 数据ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("数据ID")
    private Integer id;
    /**
     * 名称
     */
    @TableField("name")
    @ApiModelProperty("名称")
    private String name;
    /**
     * 地址
     */
    @TableField("url")
    @ApiModelProperty("地址")
    private String url;
    /**
     * 删除标识(0=否,1=是)
     */
    @TableField("del")
    private Integer del;
    /**
     * 添加时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/Department.java
New file
@@ -0,0 +1,50 @@
package com.panzhihua.sangeshenbian.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:40
 */
@Data
@ApiModel
@TableName("sgsb_department")
public class Department {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("数据ID")
    private Integer id;
    /**
     * 上级id
     */
    @TableField("pid")
    @ApiModelProperty("上级id")
    private Integer pid;
    /**
     * 单位名称
     */
    @TableField("name")
    @ApiModelProperty("单位名称")
    private String name;
    /**
     * 层级,最多4层
     */
    @TableField("tier")
    @ApiModelProperty("层级,最多4层")
    private Integer tier;
    @TableField(exist = false)
    @ApiModelProperty("下级单位")
    private List<Department> child;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/MessageNotification.java
New file
@@ -0,0 +1,87 @@
package com.panzhihua.sangeshenbian.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:57
 */
@Data
@ApiModel
@TableName("sgsb_message_notification")
public class MessageNotification {
    /**
     * 数据ID
     */
    @ApiModelProperty("数据ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 标题
     */
    @TableField("title")
    @ApiModelProperty("标题")
    private String title;
    /**
     * 承办者用户id
     */
    @TableField("undertaker_user_id")
    @ApiModelProperty("承办者用户id")
    private Integer undertakerUserId;
    /**
     * 承办者
     */
    @TableField(exist = false)
    @ApiModelProperty("承办者")
    private String undertakerUser;
    /**
     * 联系电话
     */
    @TableField("phone")
    @ApiModelProperty("联系电话")
    private String phone;
    /**
     * 所在单位
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "所在单位")
    private String department;
    /**
     * 所属职位
     */
    @TableField(exist = false)
    @ApiModelProperty("所属职位")
    private String position;
    /**
     * 需求应处理时间
     */
    @TableField("response_time")
    @ApiModelProperty("需求应处理时间")
    private LocalDateTime responseTime;
    /**
     * 提示类型(1=临期提醒,2=超时提醒)
     */
    @TableField("prompt_type")
    @ApiModelProperty("提示类型(1=临期提醒,2=超时提醒)")
    private Integer promptType;
    /**
     * 阅读状态(0=否,1=是)
     */
    @TableField("read_status")
    @ApiModelProperty("阅读状态(0=否,1=是)")
    private Integer readStatus;
    /**
     * 创建时间
     */
    @TableField("create_time")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/ProblemType.java
New file
@@ -0,0 +1,40 @@
package com.panzhihua.sangeshenbian.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.time.LocalDateTime;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:24
 */
@Data
@ApiModel
@TableName("sgsb_problem_type")
public class ProblemType {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 名称
     */
    @TableField("name")
    private String name;
    /**
     * 删除标识(0=否,1=是)
     */
    @TableField("del")
    private Integer del;
    /**
     * 添加时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/SystemMenu.java
New file
@@ -0,0 +1,50 @@
package com.panzhihua.sangeshenbian.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 0:54
 */
@Data
@ApiModel
@TableName("sgsb_system_menu")
public class SystemMenu {
    /** 菜单ID */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("菜单ID")
    private Integer id;
    /** 菜单名称 */
    @TableField("name")
    @ApiModelProperty("菜单名称")
    private String name;
    /** 父菜单ID */
    @TableField("parent_id")
    private Long parentId;
    /** 显示顺序 */
    @TableField("order_num")
    private String orderNum;
    /** 菜单URL */
    @TableField("url")
    @ApiModelProperty("菜单URL")
    private String url;
    /** 子菜单 */
    @TableField(exist = false)
    @ApiModelProperty("子菜单")
    private List<SystemMenu> children = new ArrayList<SystemMenu>();
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/SystemRole.java
New file
@@ -0,0 +1,38 @@
package com.panzhihua.sangeshenbian.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDateTime;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 16:35
 */
@Data
@TableName("sgsb_system_role")
public class SystemRole {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 角色名称
     */
    @TableField("name")
    private String name;
    /**
     * 删除标识(0=否,1=是)
     */
    @TableField("del")
    private Integer del;
    /**
     * 添加时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/SystemRoleMenu.java
New file
@@ -0,0 +1,24 @@
package com.panzhihua.sangeshenbian.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:21
 */
@Data
@TableName("sgsb_system_role_menu")
public class SystemRoleMenu {
    /**
     * 角色id
     */
    @TableField("system_role_id")
    private Integer systemRoleId;
    /**
     * 菜单id
     */
    @TableField("system_menu_id")
    private Integer systemMenuId;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/SystemUser.java
New file
@@ -0,0 +1,140 @@
package com.panzhihua.sangeshenbian.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
/**
 * 系统用户
 * @author zhibing.pu
 * @Date 2025/2/18 22:18
 */
@Data
@ApiModel
@TableName("sgsb_system_user")
public class SystemUser {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "数据ID")
    private Integer id;
    /**
     * 姓名
     */
    @TableField("name")
    @ApiModelProperty(value = "姓名", required = true)
    private String name;
    /**
     * 手机号
     */
    @TableField("phone")
    @ApiModelProperty(value = "手机号", required = true)
    private String phone;
    /**
     * 密码
     */
    @TableField("password")
    @ApiModelProperty(value = "密码", required = true)
    private String password;
    /**
     * 一级单位id
     */
    @TableField("one_department_id")
    @ApiModelProperty(value = "一级单位id", required = true)
    private Integer oneDepartmentId;
    /**
     * 二级单位id
     */
    @TableField("two_department_id")
    @ApiModelProperty(value = "二级单位id")
    private Integer twoDepartmentId;
    /**
     * 三级单位id
     */
    @TableField("three_department_id")
    @ApiModelProperty(value = "三级单位id")
    private Integer threeDepartmentId;
    /**
     * 四级单位id
     */
    @TableField("four_department_id")
    @ApiModelProperty(value = "四级单位id")
    private Integer fourDepartmentId;
    /**
     * 是否是管理员(0=否,1=是)
     */
    @TableField("is_admin")
    @ApiModelProperty(value = "是否是管理员(0=否,1=是)", required = true)
    private Integer isAdmin;
    /**
     * 职位id
     */
    @TableField("system_post_id")
    @ApiModelProperty(value = "职位id", required = true)
    private Integer systemPostId;
    /**
     * 角色id
     */
    @TableField("system_role_id")
    @ApiModelProperty(value = "角色id", required = true)
    private Integer systemRoleId;
    /**
     * 账号层级(1=市级账号,2=区县账号,3=街道账号,4=社区账号)
     */
    @TableField("account_level")
    @ApiModelProperty(value = "账号层级(1=市级账号,2=区县账号,3=街道账号,4=社区账号)", required = true)
    private Integer accountLevel;
    /**
     * 所属区县
     */
    @TableField("districts")
    @ApiModelProperty(value = "所属区县")
    private String districts;
    /**
     * 区县编号
     */
    @TableField("districts_code")
    @ApiModelProperty(value = "区县编号")
    private String districtsCode;
    /**
     * 街道
     */
    @TableField("street")
    @ApiModelProperty(value = "街道")
    private String street;
    /**
     * 街道编号
     */
    @TableField("street_code")
    @ApiModelProperty(value = "街道编号")
    private String streetCode;
    /**
     * 社区
     */
    @TableField("community")
    @ApiModelProperty(value = "社区")
    private String community;
    /**
     * 社区编号
     */
    @TableField("community_code")
    @ApiModelProperty(value = "社区编号")
    private String communityCode;
    /**
     * 状态(1=正常,2=冻结,3=删除)
     */
    @TableField("status")
    private Integer status;
    /**
     * 添加时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/WorkOrderItemConfig.java
New file
@@ -0,0 +1,88 @@
package com.panzhihua.sangeshenbian.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:04
 */
@Data
@TableName("sgsb_work_order_item_config")
public class WorkOrderItemConfig {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 市级账号诉求处理时间
     */
    @TableField("city_handling_time")
    @ApiModelProperty(value = "市级账号诉求处理时间", required = true)
    private Integer cityHandlingTime;
    /**
     * 区县级账号诉求处理时间
     */
    @TableField("district_handling_time")
    @ApiModelProperty(value = "区县级账号诉求处理时间", required = true)
    private Integer districtHandlingTime;
    /**
     * 街道级账号诉求处理时间
     */
    @TableField("street_handling_time")
    @ApiModelProperty(value = "街道级账号诉求处理时间", required = true)
    private Integer streetHandlingTime;
    /**
     * 社区级账号诉求处理时间
     */
    @TableField("community_handling_time")
    @ApiModelProperty(value = "社区级账号诉求处理时间", required = true)
    private Integer communityHandlingTime;
    /**
     * 党员级账号诉求处理时间
     */
    @TableField("party_member_handling_time")
    @ApiModelProperty(value = "党员级账号诉求处理时间", required = true)
    private Integer partyMemberHandlingTime;
    /**
     * 市级账号临期提醒
     */
    @TableField("city_deadline_reminder")
    @ApiModelProperty(value = "市级账号临期提醒", required = true)
    private Integer cityDeadlineReminder;
    /**
     * 区县级账号临期提醒
     */
    @TableField("district_deadline_reminder")
    @ApiModelProperty(value = "区县级账号临期提醒", required = true)
    private Integer districtDeadlineReminder;
    /**
     * 街道级账号临期提醒
     */
    @TableField("street_deadline_reminder")
    @ApiModelProperty(value = "街道级账号临期提醒", required = true)
    private Integer streetDeadlineReminder;
    /**
     * 社区级账号临期提醒
     */
    @TableField("community_deadline_reminder")
    @ApiModelProperty(value = "社区级账号临期提醒", required = true)
    private Integer communityDeadlineReminder;
    /**
     * 党员级账号临期提醒
     */
    @TableField("party_member_deadline_reminder")
    @ApiModelProperty(value = "党员级账号临期提醒", required = true)
    private Integer partyMemberDeadlineReminder;
    /**
     * 诉求处理时间
     */
    @TableField("demand_processing_time")
    @ApiModelProperty(value = "诉求处理时间", required = true)
    private Integer demandProcessingTime;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IBannerService.java
New file
@@ -0,0 +1,15 @@
package com.panzhihua.sangeshenbian.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.Banner;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:45
 */
public interface IBannerService extends IService<Banner> {
    IPage<Banner> list(String name, Integer pageNum, Integer pageSize);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IDepartmentService.java
New file
@@ -0,0 +1,11 @@
package com.panzhihua.sangeshenbian.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.Department;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:43
 */
public interface IDepartmentService extends IService<Department> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IMessageNotificationService.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.sangeshenbian.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.MessageNotification;
import com.panzhihua.sangeshenbian.warpper.MessageNotificationList;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 3:04
 */
public interface IMessageNotificationService extends IService<MessageNotification> {
    IPage<MessageNotification> list(MessageNotificationList query);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IProblemTypeService.java
New file
@@ -0,0 +1,15 @@
package com.panzhihua.sangeshenbian.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.ProblemType;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:26
 */
public interface IProblemTypeService extends IService<ProblemType> {
    IPage<ProblemType> list(String name, Integer pageNum, Integer pageSize);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/ISystemMenuService.java
New file
@@ -0,0 +1,19 @@
package com.panzhihua.sangeshenbian.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.SystemMenu;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 1:03
 */
public interface ISystemMenuService extends IService<SystemMenu> {
    /**
     * 获取获取系统菜单列表
     * @return
     */
    List<SystemMenu> getSystemMenuList();
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/ISystemRoleMenuService.java
New file
@@ -0,0 +1,11 @@
package com.panzhihua.sangeshenbian.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.SystemRoleMenu;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:25
 */
public interface ISystemRoleMenuService extends IService<SystemRoleMenu> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/ISystemRoleService.java
New file
@@ -0,0 +1,23 @@
package com.panzhihua.sangeshenbian.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.SystemRole;
import com.panzhihua.sangeshenbian.warpper.SystemRoleList;
import com.panzhihua.sangeshenbian.warpper.SystemRoleListVo;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 16:40
 */
public interface ISystemRoleService extends IService<SystemRole> {
    /**
     * 获取列表数据
     * @param systemRoleList
     * @return
     */
    IPage<SystemRoleListVo> list(SystemRoleList systemRoleList);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/ISystemUserService.java
New file
@@ -0,0 +1,23 @@
package com.panzhihua.sangeshenbian.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.SystemUser;
import com.panzhihua.sangeshenbian.warpper.SystemUserList;
import com.panzhihua.sangeshenbian.warpper.SystemUserListVo;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/18 22:30
 */
public interface ISystemUserService extends IService<SystemUser> {
    /**
     * 获取列表数据
     * @param query
     * @return
     */
    IPage<SystemUserListVo> list(Integer accountLevel, SystemUserList query);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IWorkOrderItemConfigService.java
New file
@@ -0,0 +1,11 @@
package com.panzhihua.sangeshenbian.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.WorkOrderItemConfig;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:07
 */
public interface IWorkOrderItemConfigService extends IService<WorkOrderItemConfig> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/BannerServiceImpl.java
New file
@@ -0,0 +1,26 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.sangeshenbian.dao.BannerMapper;
import com.panzhihua.sangeshenbian.model.Banner;
import com.panzhihua.sangeshenbian.service.IBannerService;
import org.springframework.stereotype.Service;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:45
 */
@Service
public class BannerServiceImpl extends ServiceImpl<BannerMapper, Banner> implements IBannerService {
    @Override
    public IPage<Banner> list(String name, Integer pageNum, Integer pageSize) {
        Page page = new Page<>();
        page.setCurrent(pageNum);
        page.setSize(pageSize);
        IPage<Banner> list = this.baseMapper.list(page, name);
        return list;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/DepartmentServiceImpl.java
New file
@@ -0,0 +1,15 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.sangeshenbian.dao.DepartmentMapper;
import com.panzhihua.sangeshenbian.model.Department;
import com.panzhihua.sangeshenbian.service.IDepartmentService;
import org.springframework.stereotype.Service;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:43
 */
@Service
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department> implements IDepartmentService {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/MessageNotificationServiceImpl.java
New file
@@ -0,0 +1,28 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.sangeshenbian.dao.MessageNotificationMapper;
import com.panzhihua.sangeshenbian.model.MessageNotification;
import com.panzhihua.sangeshenbian.service.IMessageNotificationService;
import com.panzhihua.sangeshenbian.warpper.MessageNotificationList;
import org.springframework.stereotype.Service;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 3:04
 */
@Service
public class MessageNotificationServiceImpl extends ServiceImpl<MessageNotificationMapper, MessageNotification> implements IMessageNotificationService {
    @Override
    public IPage<MessageNotification> list(MessageNotificationList query) {
        Page page = new Page<>();
        page.setCurrent(query.getPageNum());
        page.setSize(query.getPageSize());
        IPage<MessageNotification> list = this.baseMapper.list(page, query);
        return list;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ProblemTypeServiceImpl.java
New file
@@ -0,0 +1,26 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.sangeshenbian.dao.ProblemTypeMapper;
import com.panzhihua.sangeshenbian.model.ProblemType;
import com.panzhihua.sangeshenbian.service.IProblemTypeService;
import org.springframework.stereotype.Service;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:27
 */
@Service
public class ProblemTypeServiceImpl extends ServiceImpl<ProblemTypeMapper, ProblemType> implements IProblemTypeService {
    @Override
    public IPage<ProblemType> list(String name, Integer pageNum, Integer pageSize) {
        Page page = new Page<>();
        page.setCurrent(pageNum);
        page.setSize(pageSize);
        IPage<ProblemType> list = this.baseMapper.list(page, name);
        return list;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemMenuServiceImpl.java
New file
@@ -0,0 +1,41 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.sangeshenbian.dao.SystemMenuMapper;
import com.panzhihua.sangeshenbian.model.SystemMenu;
import com.panzhihua.sangeshenbian.service.ISystemMenuService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 1:03
 */
@Service
public class SystemMenuServiceImpl extends ServiceImpl<SystemMenuMapper, SystemMenu> implements ISystemMenuService {
    @Override
    public List<SystemMenu> getSystemMenuList() {
        List<SystemMenu> list = this.list();
        List<SystemMenu> collect = list.stream().filter(s->s.getParentId() == 0).collect(Collectors.toList());
        for (SystemMenu systemMenu : collect) {
            build(systemMenu, list);
        }
        return list;
    }
    public void build(SystemMenu systemMenu, List<SystemMenu> list) {
        List<SystemMenu> collect = list.stream().filter(s->s.getParentId().equals(systemMenu.getParentId())).collect(Collectors.toList());
        if(collect.size() == 0){
            return;
        }
        systemMenu.setChildren(collect);
        for (SystemMenu menu : collect) {
            build(menu, list);
        }
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemRoleMenuServiceImpl.java
New file
@@ -0,0 +1,15 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.sangeshenbian.dao.SystemRoleMenuMapper;
import com.panzhihua.sangeshenbian.model.SystemRoleMenu;
import com.panzhihua.sangeshenbian.service.ISystemRoleMenuService;
import org.springframework.stereotype.Service;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:26
 */
@Service
public class SystemRoleMenuServiceImpl extends ServiceImpl<SystemRoleMenuMapper, SystemRoleMenu> implements ISystemRoleMenuService {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemRoleServiceImpl.java
New file
@@ -0,0 +1,35 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.sangeshenbian.dao.SystemRoleMapper;
import com.panzhihua.sangeshenbian.model.SystemRole;
import com.panzhihua.sangeshenbian.service.ISystemRoleService;
import com.panzhihua.sangeshenbian.warpper.SystemRoleList;
import com.panzhihua.sangeshenbian.warpper.SystemRoleListVo;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 16:41
 */
@Service
public class SystemRoleServiceImpl extends ServiceImpl<SystemRoleMapper, SystemRole> implements ISystemRoleService {
    /**
     * 获取列表数据
     * @param query
     * @return
     */
    @Override
    public IPage<SystemRoleListVo> list(SystemRoleList query) {
        Page page = new Page<>();
        page.setCurrent(query.getPageNum());
        page.setSize(query.getPageSize());
        return this.baseMapper.list(page, query.getName());
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemUserServiceImpl.java
New file
@@ -0,0 +1,35 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.sangeshenbian.dao.SystemUserMapper;
import com.panzhihua.sangeshenbian.model.SystemUser;
import com.panzhihua.sangeshenbian.service.ISystemUserService;
import com.panzhihua.sangeshenbian.warpper.SystemUserList;
import com.panzhihua.sangeshenbian.warpper.SystemUserListVo;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/18 22:30
 */
@Service
public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemUser> implements ISystemUserService {
    /**
     * 获取列表数据
     * @param query
     * @return
     */
    @Override
    public IPage<SystemUserListVo> list(Integer accountLevel, SystemUserList query) {
        Page page = new Page<>();
        page.setCurrent(query.getPageNum());
        page.setSize(query.getPageSize());
        IPage<SystemUserListVo> list = this.baseMapper.list(page, accountLevel, query);
        return list;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/WorkOrderItemConfigServiceImpl.java
New file
@@ -0,0 +1,15 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.sangeshenbian.dao.WorkOrderItemConfigMapper;
import com.panzhihua.sangeshenbian.model.WorkOrderItemConfig;
import com.panzhihua.sangeshenbian.service.IWorkOrderItemConfigService;
import org.springframework.stereotype.Service;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 2:08
 */
@Service
public class WorkOrderItemConfigServiceImpl extends ServiceImpl<WorkOrderItemConfigMapper, WorkOrderItemConfig> implements IWorkOrderItemConfigService {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/AddSystemRole.java
New file
@@ -0,0 +1,20 @@
package com.panzhihua.sangeshenbian.warpper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:11
 */
@Data
@ApiModel
public class AddSystemRole {
    @ApiModelProperty(value = "角色名称", required = true)
    private String name;
    @ApiModelProperty(value = "权限id集合", required = true)
    private List<Integer> systemMenuIds;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/EditSystemRole.java
New file
@@ -0,0 +1,22 @@
package com.panzhihua.sangeshenbian.warpper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:11
 */
@Data
@ApiModel
public class EditSystemRole {
    @ApiModelProperty(value = "角色ID", required = true)
    private Integer id;
    @ApiModelProperty(value = "角色名称", required = true)
    private String name;
    @ApiModelProperty(value = "权限id集合", required = true)
    private List<Integer> systemMenuIds;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/LoginVo.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.sangeshenbian.warpper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zhibing.pu
 * @Date 2025/2/18 22:33
 */
@Data
@ApiModel
public class LoginVo {
    @ApiModelProperty(value = "登录账号", required = true)
    private String phone;
    @ApiModelProperty(value = "登录密码", required = true)
    private String password;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MessageNotificationList.java
New file
@@ -0,0 +1,28 @@
package com.panzhihua.sangeshenbian.warpper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zhibing.pu
 * @Date 2025/2/23 3:10
 */
@ApiModel
@Data
public class MessageNotificationList {
    @ApiModelProperty("标题")
    private String title;
    @ApiModelProperty("承办人")
    private String undertaker;
    @ApiModelProperty("电话")
    private String phone;
    @ApiModelProperty("所属单位id")
    private Integer departmentId;
    @ApiModelProperty("职位id")
    private Integer positionId;
    @ApiModelProperty("页码")
    private Integer pageNum;
    @ApiModelProperty("每页数")
    private Integer pageSize;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/SystemRoleInfo.java
New file
@@ -0,0 +1,22 @@
package com.panzhihua.sangeshenbian.warpper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:36
 */
@Data
@ApiModel
public class SystemRoleInfo {
    @ApiModelProperty("角色ID")
    private Integer id;
    @ApiModelProperty("角色名称")
    private String name;
    @ApiModelProperty("菜单id集合")
    private List<Integer> systemMenuIds;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/SystemRoleList.java
New file
@@ -0,0 +1,20 @@
package com.panzhihua.sangeshenbian.warpper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 16:58
 */
@Data
@ApiModel
public class SystemRoleList {
    @ApiModelProperty(value = "角色名称")
    private String name;
    @ApiModelProperty(value = "页码", required = true)
    private Integer pageNum;
    @ApiModelProperty(value = "每页数量", required = true)
    private Integer pageSize;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/SystemRoleListVo.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.sangeshenbian.warpper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 16:50
 */
@Data
@ApiModel
public class SystemRoleListVo {
    @ApiModelProperty("数据ID")
    private Integer id;
    @ApiModelProperty("角色名称")
    private String name;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/SystemUserList.java
New file
@@ -0,0 +1,28 @@
package com.panzhihua.sangeshenbian.warpper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zhibing.pu
 * @Date 2025/2/20 11:01
 */
@Data
@ApiModel
public class SystemUserList {
    @ApiModelProperty(value = "姓名")
    private String name;
    @ApiModelProperty(value = "联系方式")
    private String phone;
    @ApiModelProperty(value = "所在单位")
    private Integer departmentId;
    @ApiModelProperty(value = "所属角色")
    private Integer systemRoleId;
    @ApiModelProperty(value = "账号层级(1=市级账号,2=区县账号,3=街道账号,4=社区账号)")
    private Integer accountLevel;
    @ApiModelProperty(value = "页码", required = true)
    private Integer pageNum;
    @ApiModelProperty(value = "每页数量", required = true)
    private Integer pageSize;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/SystemUserListVo.java
New file
@@ -0,0 +1,30 @@
package com.panzhihua.sangeshenbian.warpper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zhibing.pu
 * @Date 2025/2/20 11:05
 */
@Data
@ApiModel
public class SystemUserListVo {
    @ApiModelProperty("数据ID")
    private Integer id;
    @ApiModelProperty("姓名")
    private String name;
    @ApiModelProperty("联系方式")
    private String phone;
    @ApiModelProperty("所属单位")
    private String departmentName;
    @ApiModelProperty("所属职位")
    private String systemPostName;
    @ApiModelProperty("所属角色")
    private String systemRoleName;
    @ApiModelProperty(value = "账号层级(1=市级账号,2=区县账号,3=街道账号,4=社区账号)")
    private Integer accountLevel;
    @ApiModelProperty("账号状态(1=使用中,2=已冻结)")
    private Integer status;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/TokenVo.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.sangeshenbian.warpper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zhibing.pu
 * @Date 2025/2/18 23:32
 */
@ApiModel
@Data
public class TokenVo {
    @ApiModelProperty("token")
    private String token;
    @ApiModelProperty("有效期(毫秒)")
    private Long expireTime;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/BannerMapper.xml
New file
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.sangeshenbian.dao.BannerMapper">
    <select id="list" resultType="com.panzhihua.sangeshenbian.model.Banner">
        select * from banner where del = 0
        <if test="name != null and name != ''">
            and name like concat('%',#{name},'%')
        </if>
        order by create_time desc
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/DepartmentMapper.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.sangeshenbian.dao.DepartmentMapper">
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/MessageNotificationMapper.xml
New file
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.sangeshenbian.dao.MessageNotificationMapper">
    <select id="list" resultType="com.panzhihua.sangeshenbian.model.MessageNotification">
        select
            a.id,
            a.title,
            b.name as undertakerUser,
            a.phone,
            d.name as department,
            e.name as `position`,
            DATE_FORMAT(a.response_time, '%Y-%m-%d')as responseTime,
            if(a.prompt_type = 1, '临期提醒', '超时提醒') as promptType,
            if(a.read_status = 0, '未读', '已读') as readStatus
        from sgsb_message_notification a
        left join sys_user b on (a.undertaker_user_id = b.id)
        left join sgsb_system_user c on (a.phone = c.phone)
        left join sgsb_department d on (c.department_id = d.id)
        left join sgsb_position e on (c.position_id = e.id)
        where 1=1
        <if test="query.title != null and query.title != ''">
            and a.title like concat('%', #{query.title}, '%')
        </if>
        <if test="query.undertakerUser != null and query.undertakerUser != ''">
            and b.name like concat('%', #{query.undertakerUser}, '%')
        </if>
        <if test="query.phone != null and query.phone != ''">
            and a.phone like concat('%', #{query.phone}, '%')
        </if>
        <if test="query.departmentId != null">
            and c.department_id = #{query.department}
        </if>
        <if test="query.positionId != null">
            and c.position_id = #{query.position}
        </if>
        order by a.read_status asc, a.create_time desc
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ProblemTypeMapper.xml
New file
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.sangeshenbian.dao.ProblemTypeMapper">
    <select id="list" resultType="com.panzhihua.sangeshenbian.model.ProblemType">
        select * from sgsb_problem_type where del = 0
        <if test="name != null and name != ''">
            and name like concat('%', #{name}, '%')
        </if>
        order by create_time desc
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/SystemMenuMapper.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.sangeshenbian.dao.SystemMenuMapper">
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/SystemRoleMapper.xml
New file
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.sangeshenbian.dao.SystemRoleMapper">
    <select id="list" resultType="com.panzhihua.sangeshenbian.warpper.SystemRoleListVo">
        select id, name from sgsb_system_role where del = 0
        <if test="null != name and '' != name">
            and name like CONCAT('%', #{name}, '%')
        </if>
        order by create_time desc
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/SystemRoleMenuMapper.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.sangeshenbian.dao.SystemRoleMenuMapper">
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/SystemUserMapper.xml
New file
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.sangeshenbian.dao.SystemUserMapper">
    <select id="list" resultType="com.panzhihua.sangeshenbian.warpper.SystemUserListVo">
        select
            a.id,
            a.name,
            a.phone,
            IF(a.four_department_id is not null, e.`name`, IF(a.three_department_id is not null, d.`name`, IF(a.two_department_id is not null, c.`name`, b.`name`))) as departmentName,
            f.`name` as systemPostName,
            g.`name` as systemRoleName,
            a.account_level as accountLevel,
            a.`status`
        from sgsb_system_user a
        left join sgsb_department b on (a.one_department_id = b.id)
        left join sgsb_department c on (a.two_department_id = c.id)
        left join sgsb_department d on (a.three_department_id = d.id)
        left join sgsb_department e on (a.four_department_id = e.id)
        left join sgsb_system_post f on (a.system_post_id = f.id)
        left join sgsb_system_role g on (a.system_role_id = g.id)
        where a.`status` != 3
        <if test="1 != accountLevel or 5 != accountLevel">
            and a.account_level &lt;= #{accountLevel}
        </if>
        <if test="5 == accountLevel">
            and a.id = 0
        </if>
        <if test="null != query.name and '' != query.name">
            and a.name like CONCAT('%', #{query.name}, '%')
        </if>
        <if test="null != query.phone and '' != query.phone">
            and a.phone like CONCAT('%', #{query.phone}, '%')
        </if>
        <if test="null != query.departmentId">
            and (a.one_department_id = #{query.departmentId} or a.two_department_id = #{query.departmentId} or a.three_department_id = #{query.departmentId} or a.four_department_id = #{query.departmentId})
        </if>
        <if test="null != query.systemRoleId">
            and a.system_role_id = #{query.systemRoleId}
        </if>
        <if test="null != query.accountLevel">
            and a.account_level = #{query.accountLevel}
        </if>
        order by a.create_time desc
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/WorkOrderItemConfigMapper.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.sangeshenbian.dao.WorkOrderItemConfigMapper">
</mapper>
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java
@@ -9,7 +9,9 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo;
import com.panzhihua.common.model.vos.user.SysAppConfigVO;
import com.panzhihua.common.service.sangeshenbian.SystemUserService;
import com.panzhihua.common.utlis.*;
import org.springframework.context.ApplicationContext;
import org.springframework.data.redis.core.StringRedisTemplate;
@@ -40,6 +42,7 @@
public class JWTAuthenticationTokenFilter implements Filter {
    private StringRedisTemplate stringRedisTemplate;
    private UserService userService;
    private SystemUserService systemUserService;
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
@@ -65,6 +68,7 @@
        stringRedisTemplate = ctx.getBean(StringRedisTemplate.class);
        ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
        userService = ctx.getBean(UserService.class);
        systemUserService = ctx.getBean(SystemUserService.class);
        String requestURI = request.getRequestURI();
        boolean login = requestURI.contains("login");
        boolean union = requestURI.contains("huacheng-union-applets");
@@ -187,6 +191,47 @@
                        }
                        valueOperations.set(roleAppletKey, JSONArray.toJSONString(authorities), 24, TimeUnit.HOURS);
                    }
                } else if(21 == type){
                    //三个身边
                    String key = SecurityConstants.ROLE_USER + "sangeshenbian:" + userId;
                    Boolean aBoolean = stringRedisTemplate.hasKey(key);
                    R<SystemUserVo> r = systemUserService.getUserById(userId);
                    if (aBoolean) {
                        String roles = valueOperations.get(key);
                        authorities = JSONArray.parseArray(roles, SimpleGrantedAuthority.class);
                    } else {
                        SystemUserVo data = r.getData();
                        if (!ObjectUtils.isEmpty(data)) {
                            authorities.add(new SimpleGrantedAuthority(data.getSystemRoleId().toString()));
                            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 + "sangeshenbian:" + 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 {
                        if (!R.isOk(r)) {
                            ResultUtil.responseJson(response, R.fail(HttpStatus.ERROR, "登录用户信息查询失败"));
                            return;
                        }
                        SystemUserVo 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 {
                    String key = SecurityConstants.ROLE_USER + userId;
                    Boolean aBoolean = stringRedisTemplate.hasKey(key);
@@ -204,7 +249,7 @@
                            valueOperations.set(key, JSONArray.toJSONString(authorities), 24, TimeUnit.HOURS);
                        }
                    }
                }
                UsernamePasswordAuthenticationToken authentication =
                        new UsernamePasswordAuthenticationToken(userId, userId, authorities);// 主要使用权限 账户 密码 不重要
                SecurityContextHolder.getContext().setAuthentication(authentication);
@@ -230,6 +275,8 @@
                    String hexStr = AES.parseByte2HexStr(encrypt);
                    safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_USERINFO, hexStr);
                }
                }
            } else {
                // 小程序无需登录也可访问地址列表
                List<String> noLoginUrl = new ArrayList<>();