mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 22:57:17 +08:00 
			
		
		
		
	fix: 修复合并冲突后的若干错误
1.完善 @Serial 2.完善 javax => jakarta 3.修复 canAccess() 使用错误 4.兼容 JustAuth Spring Boot Starter 5.CI 脚本更新 JDK 8 => 17
This commit is contained in:
		| @@ -16,10 +16,11 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.auth.model.req; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|  | ||||
| import javax.validation.constraints.NotBlank; | ||||
| import javax.validation.constraints.Pattern; | ||||
| import jakarta.validation.constraints.NotBlank; | ||||
| import jakarta.validation.constraints.Pattern; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| @@ -39,6 +40,7 @@ import top.charles7c.cnadmin.common.constant.RegexConsts; | ||||
| @Schema(description = "邮箱登录信息") | ||||
| public class EmailLoginReq implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,10 +16,11 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.auth.model.req; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|  | ||||
| import javax.validation.constraints.NotBlank; | ||||
| import javax.validation.constraints.Pattern; | ||||
| import jakarta.validation.constraints.NotBlank; | ||||
| import jakarta.validation.constraints.Pattern; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| @@ -39,6 +40,7 @@ import top.charles7c.cnadmin.common.constant.RegexConsts; | ||||
| @Schema(description = "手机号登录信息") | ||||
| public class PhoneLoginReq implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.auth.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|  | ||||
| import lombok.Builder; | ||||
| @@ -34,6 +35,7 @@ import io.swagger.v3.oas.annotations.media.Schema; | ||||
| @Schema(description = "令牌信息") | ||||
| public class LoginResp implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.entity; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.time.LocalDateTime; | ||||
|  | ||||
| import lombok.Data; | ||||
| @@ -34,6 +35,7 @@ import top.charles7c.cnadmin.common.base.BaseDO; | ||||
| @TableName("sys_announcement") | ||||
| public class AnnouncementDO extends BaseDO { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,8 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.entity; | ||||
|  | ||||
| import java.io.Serial; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| import com.baomidou.mybatisplus.annotation.TableName; | ||||
| @@ -32,6 +34,7 @@ import top.charles7c.cnadmin.common.base.BaseDO; | ||||
| @TableName("sys_dict") | ||||
| public class DictDO extends BaseDO { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,8 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.entity; | ||||
|  | ||||
| import java.io.Serial; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| import com.baomidou.mybatisplus.annotation.TableName; | ||||
| @@ -32,6 +34,7 @@ import top.charles7c.cnadmin.common.base.BaseDO; | ||||
| @TableName("sys_dict_item") | ||||
| public class DictItemDO extends BaseDO { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.entity; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
| import java.time.LocalDateTime; | ||||
|  | ||||
| @@ -38,6 +39,7 @@ import top.charles7c.cnadmin.common.enums.MessageTypeEnum; | ||||
| @TableName("sys_message") | ||||
| public class MessageDO implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.entity; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
| import java.time.LocalDateTime; | ||||
|  | ||||
| @@ -36,6 +37,7 @@ import com.baomidou.mybatisplus.annotation.TableName; | ||||
| @TableName("sys_option") | ||||
| public class OptionDO implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.entity; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
| import java.time.LocalDateTime; | ||||
|  | ||||
| @@ -35,6 +36,7 @@ import com.baomidou.mybatisplus.annotation.TableName; | ||||
| @TableName("sys_user_social") | ||||
| public class UserSocialDO implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.query; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|  | ||||
| import lombok.Data; | ||||
| @@ -35,6 +36,7 @@ import top.charles7c.cnadmin.common.enums.QueryTypeEnum; | ||||
| @Schema(description = "公告查询条件") | ||||
| public class AnnouncementQuery implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.query; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|  | ||||
| import lombok.Data; | ||||
| @@ -34,6 +35,7 @@ import top.charles7c.cnadmin.common.annotation.Query; | ||||
| @Schema(description = "字典项查询条件") | ||||
| public class DictItemQuery implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.query; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|  | ||||
| import lombok.Data; | ||||
| @@ -34,6 +35,7 @@ import top.charles7c.cnadmin.common.annotation.Query; | ||||
| @Schema(description = "字典查询条件") | ||||
| public class DictQuery implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,10 +16,11 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.query; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
| import java.util.List; | ||||
|  | ||||
| import javax.validation.constraints.NotEmpty; | ||||
| import jakarta.validation.constraints.NotEmpty; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| @@ -38,6 +39,7 @@ import top.charles7c.cnadmin.common.enums.QueryTypeEnum; | ||||
| @Schema(description = "参数查询条件") | ||||
| public class OptionQuery implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,9 +16,10 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.req; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.time.LocalDateTime; | ||||
|  | ||||
| import javax.validation.constraints.*; | ||||
| import jakarta.validation.constraints.*; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| @@ -38,6 +39,7 @@ import top.charles7c.cnadmin.common.base.BaseReq; | ||||
| @Schema(description = "创建或修改公告信息") | ||||
| public class AnnouncementReq extends BaseReq { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,7 +16,9 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.req; | ||||
|  | ||||
| import javax.validation.constraints.*; | ||||
| import java.io.Serial; | ||||
|  | ||||
| import jakarta.validation.constraints.*; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| @@ -36,6 +38,7 @@ import top.charles7c.cnadmin.common.base.BaseReq; | ||||
| @Schema(description = "创建或修改字典项信息") | ||||
| public class DictItemReq extends BaseReq { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,7 +16,9 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.req; | ||||
|  | ||||
| import javax.validation.constraints.*; | ||||
| import java.io.Serial; | ||||
|  | ||||
| import jakarta.validation.constraints.*; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| @@ -37,6 +39,7 @@ import top.charles7c.cnadmin.common.constant.RegexConsts; | ||||
| @Schema(description = "创建或修改字典信息") | ||||
| public class DictReq extends BaseReq { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,8 +16,10 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.req; | ||||
|  | ||||
| import javax.validation.constraints.NotBlank; | ||||
| import javax.validation.constraints.NotNull; | ||||
| import java.io.Serial; | ||||
|  | ||||
| import jakarta.validation.constraints.NotBlank; | ||||
| import jakarta.validation.constraints.NotNull; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| @@ -38,6 +40,7 @@ import top.charles7c.cnadmin.common.enums.MessageTypeEnum; | ||||
| @Schema(description = "创建消息信息") | ||||
| public class MessageReq extends BaseReq { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,7 +16,9 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.req; | ||||
|  | ||||
| import javax.validation.constraints.NotBlank; | ||||
| import java.io.Serial; | ||||
|  | ||||
| import jakarta.validation.constraints.NotBlank; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| @@ -36,6 +38,7 @@ import top.charles7c.cnadmin.common.base.BaseReq; | ||||
| @Schema(description = "修改参数信息") | ||||
| public class OptionReq extends BaseReq { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,10 +16,11 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.req; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
| import java.util.List; | ||||
|  | ||||
| import javax.validation.constraints.NotEmpty; | ||||
| import jakarta.validation.constraints.NotEmpty; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| @@ -35,6 +36,7 @@ import io.swagger.v3.oas.annotations.media.Schema; | ||||
| @Schema(description = "参数重置信息") | ||||
| public class OptionResetValueReq implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,10 +16,11 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.req; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|  | ||||
| import javax.validation.constraints.NotBlank; | ||||
| import javax.validation.constraints.Pattern; | ||||
| import jakarta.validation.constraints.NotBlank; | ||||
| import jakarta.validation.constraints.Pattern; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| @@ -39,6 +40,7 @@ import top.charles7c.cnadmin.common.constant.RegexConsts; | ||||
| @Schema(description = "用户手机号修改信息") | ||||
| public class UserPhoneUpdateReq implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.time.LocalDateTime; | ||||
|  | ||||
| import lombok.Data; | ||||
| @@ -38,6 +39,7 @@ import top.charles7c.cnadmin.common.base.BaseDetailResp; | ||||
| @Schema(description = "公告详情信息") | ||||
| public class AnnouncementDetailResp extends BaseDetailResp { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.time.LocalDateTime; | ||||
|  | ||||
| import lombok.Data; | ||||
| @@ -35,6 +36,7 @@ import top.charles7c.cnadmin.system.enums.AnnouncementStatusEnum; | ||||
| @Schema(description = "公告信息") | ||||
| public class AnnouncementResp extends BaseResp { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|  | ||||
| import lombok.Data; | ||||
| @@ -32,6 +33,7 @@ import io.swagger.v3.oas.annotations.media.Schema; | ||||
| @Schema(description = "仪表盘-公告信息") | ||||
| public class DashboardAnnouncementResp implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,8 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| @@ -32,6 +34,7 @@ import top.charles7c.cnadmin.common.base.BaseDetailResp; | ||||
| @Schema(description = "字典详情信息") | ||||
| public class DictDetailResp extends BaseDetailResp { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,8 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| @@ -36,6 +38,7 @@ import top.charles7c.cnadmin.common.base.BaseDetailResp; | ||||
| @Schema(description = "字典项详情信息") | ||||
| public class DictItemDetailResp extends BaseDetailResp { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,8 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| @@ -32,6 +34,7 @@ import top.charles7c.cnadmin.common.base.BaseResp; | ||||
| @Schema(description = "字典项信息") | ||||
| public class DictItemResp extends BaseResp { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,8 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| @@ -32,6 +34,7 @@ import top.charles7c.cnadmin.common.base.BaseResp; | ||||
| @Schema(description = "字典信息") | ||||
| public class DictResp extends BaseResp { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
| import java.time.LocalDateTime; | ||||
|  | ||||
| @@ -37,6 +38,7 @@ import top.charles7c.cnadmin.common.enums.MessageTypeEnum; | ||||
| @Schema(description = "消息信息") | ||||
| public class MessageResp implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|  | ||||
| import lombok.Data; | ||||
| @@ -34,6 +35,7 @@ import top.charles7c.cnadmin.common.enums.MessageTypeEnum; | ||||
| @Schema(description = "各类型未读消息信息") | ||||
| public class MessageTypeUnreadResp implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
| import java.util.List; | ||||
|  | ||||
| @@ -36,6 +37,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; | ||||
| @JsonInclude(JsonInclude.Include.NON_EMPTY) | ||||
| public class MessageUnreadResp implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|  | ||||
| import lombok.Data; | ||||
| @@ -36,6 +37,7 @@ import cn.hutool.core.util.StrUtil; | ||||
| @Schema(description = "参数信息") | ||||
| public class OptionResp implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| package top.charles7c.cnadmin.system.model.resp; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|  | ||||
| import lombok.Data; | ||||
| @@ -32,6 +33,7 @@ import io.swagger.v3.oas.annotations.media.Schema; | ||||
| @Schema(description = "第三方账号绑定信息") | ||||
| public class UserSocialBindResp implements Serializable { | ||||
|  | ||||
|     @Serial | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -20,7 +20,7 @@ import java.util.ArrayList; | ||||
| import java.util.List; | ||||
| import java.util.Optional; | ||||
|  | ||||
| import javax.servlet.http.HttpServletResponse; | ||||
| import jakarta.servlet.http.HttpServletResponse; | ||||
|  | ||||
| import lombok.RequiredArgsConstructor; | ||||
|  | ||||
|   | ||||
| @@ -153,7 +153,6 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, UserDO, UserRes | ||||
|     public void fillDetail(Object detailObj) { | ||||
|         super.fillDetail(detailObj); | ||||
|         if (detailObj instanceof UserDetailResp detail) { | ||||
|             UserDetailResp detail = (UserDetailResp)detailObj; | ||||
|             detail.setDeptName(ExceptionUtils.exToNull(() -> deptService.get(detail.getDeptId()).getName())); | ||||
|             List<Long> roleIdList = userRoleService.listRoleIdByUserId(detail.getId()); | ||||
|             detail.setRoleIds(roleIdList); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user