refactor(system): 调整用户相关类到 user 包下

This commit is contained in:
2025-03-19 22:34:08 +08:00
parent 1ce636feec
commit b879f02c68
23 changed files with 35 additions and 33 deletions

View File

@@ -30,7 +30,7 @@ import top.continew.admin.common.context.UserContextHolder;
import top.continew.admin.common.context.UserExtraContext;
import top.continew.admin.common.enums.DisEnableStatusEnum;
import top.continew.admin.system.model.entity.DeptDO;
import top.continew.admin.system.model.entity.UserDO;
import top.continew.admin.system.model.entity.user.UserDO;
import top.continew.admin.system.model.resp.ClientResp;
import top.continew.admin.system.service.DeptService;
import top.continew.admin.system.service.OptionService;

View File

@@ -30,7 +30,7 @@ import top.continew.admin.common.constant.CacheConstants;
import top.continew.admin.common.constant.SysConstants;
import top.continew.admin.common.util.SecureUtils;
import top.continew.admin.system.enums.PasswordPolicyEnum;
import top.continew.admin.system.model.entity.UserDO;
import top.continew.admin.system.model.entity.user.UserDO;
import top.continew.admin.system.model.resp.ClientResp;
import top.continew.starter.cache.redisson.util.RedisUtils;
import top.continew.starter.core.util.ExceptionUtils;

View File

@@ -23,7 +23,7 @@ import top.continew.admin.auth.enums.AuthTypeEnum;
import top.continew.admin.auth.model.req.EmailLoginReq;
import top.continew.admin.auth.model.resp.LoginResp;
import top.continew.admin.common.constant.CacheConstants;
import top.continew.admin.system.model.entity.UserDO;
import top.continew.admin.system.model.entity.user.UserDO;
import top.continew.admin.system.model.resp.ClientResp;
import top.continew.starter.cache.redisson.util.RedisUtils;
import top.continew.starter.core.validation.ValidationUtils;

View File

@@ -23,7 +23,7 @@ import top.continew.admin.auth.enums.AuthTypeEnum;
import top.continew.admin.auth.model.req.PhoneLoginReq;
import top.continew.admin.auth.model.resp.LoginResp;
import top.continew.admin.common.constant.CacheConstants;
import top.continew.admin.system.model.entity.UserDO;
import top.continew.admin.system.model.entity.user.UserDO;
import top.continew.admin.system.model.resp.ClientResp;
import top.continew.starter.cache.redisson.util.RedisUtils;
import top.continew.starter.core.validation.ValidationUtils;

View File

@@ -42,8 +42,8 @@ import top.continew.admin.common.enums.GenderEnum;
import top.continew.admin.system.enums.MessageTemplateEnum;
import top.continew.admin.system.enums.MessageTypeEnum;
import top.continew.admin.system.model.entity.RoleDO;
import top.continew.admin.system.model.entity.UserDO;
import top.continew.admin.system.model.entity.UserSocialDO;
import top.continew.admin.system.model.entity.user.UserDO;
import top.continew.admin.system.model.entity.user.UserSocialDO;
import top.continew.admin.system.model.req.MessageReq;
import top.continew.admin.system.model.resp.ClientResp;
import top.continew.admin.system.service.MessageService;

View File

@@ -26,7 +26,7 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor;
import top.continew.admin.common.constant.RegexConstants;
import top.continew.admin.common.constant.SysConstants;
import top.continew.admin.system.model.entity.UserDO;
import top.continew.admin.system.model.entity.user.UserDO;
import top.continew.admin.system.service.OptionService;
import top.continew.admin.system.service.UserPasswordHistoryService;
import top.continew.starter.core.validation.ValidationUtils;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.admin.system.mapper;
package top.continew.admin.system.mapper.user;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -22,7 +22,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import top.continew.admin.common.config.mybatis.DataPermissionMapper;
import top.continew.admin.system.model.entity.UserDO;
import top.continew.admin.system.model.entity.user.UserDO;
import top.continew.admin.system.model.resp.user.UserDetailResp;
import top.continew.starter.extension.datapermission.annotation.DataPermission;
import top.continew.starter.security.crypto.annotation.FieldEncrypt;

View File

@@ -14,10 +14,10 @@
* limitations under the License.
*/
package top.continew.admin.system.mapper;
package top.continew.admin.system.mapper.user;
import org.apache.ibatis.annotations.Param;
import top.continew.admin.system.model.entity.UserPasswordHistoryDO;
import top.continew.admin.system.model.entity.user.UserPasswordHistoryDO;
import top.continew.starter.data.mp.base.BaseMapper;
/**

View File

@@ -14,10 +14,10 @@
* limitations under the License.
*/
package top.continew.admin.system.mapper;
package top.continew.admin.system.mapper.user;
import org.apache.ibatis.annotations.Param;
import top.continew.admin.system.model.entity.UserSocialDO;
import top.continew.admin.system.model.entity.user.UserSocialDO;
import top.continew.starter.data.mp.base.BaseMapper;
/**

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.admin.system.model.entity;
package top.continew.admin.system.model.entity.user;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.admin.system.model.entity;
package top.continew.admin.system.model.entity.user;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.admin.system.model.entity;
package top.continew.admin.system.model.entity.user;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

View File

@@ -18,10 +18,7 @@ package top.continew.admin.system.model.req.user;
import cn.hutool.core.lang.RegexPool;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.*;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import top.continew.admin.common.constant.RegexConstants;
@@ -75,6 +72,7 @@ public class UserReq implements Serializable {
@Schema(description = "邮箱", example = "123456789@qq.com")
@Pattern(regexp = "^$|" + RegexPool.EMAIL, message = "邮箱格式错误")
@Length(max = 255, message = "邮箱长度不能超过 {max} 个字符")
@Email
private String email;
/**

View File

@@ -18,7 +18,7 @@ package top.continew.admin.system.service;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;
import top.continew.admin.system.model.entity.UserDO;
import top.continew.admin.system.model.entity.user.UserDO;
import top.continew.admin.system.model.query.UserQuery;
import top.continew.admin.system.model.req.user.*;
import top.continew.admin.system.model.resp.user.UserDetailResp;

View File

@@ -17,7 +17,7 @@
package top.continew.admin.system.service;
import me.zhyd.oauth.model.AuthUser;
import top.continew.admin.system.model.entity.UserSocialDO;
import top.continew.admin.system.model.entity.user.UserSocialDO;
import java.util.List;

View File

@@ -22,8 +22,8 @@ import lombok.RequiredArgsConstructor;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import top.continew.admin.system.mapper.UserPasswordHistoryMapper;
import top.continew.admin.system.model.entity.UserPasswordHistoryDO;
import top.continew.admin.system.mapper.user.UserPasswordHistoryMapper;
import top.continew.admin.system.model.entity.user.UserPasswordHistoryDO;
import top.continew.admin.system.service.UserPasswordHistoryService;
import java.util.List;

View File

@@ -64,10 +64,10 @@ import top.continew.admin.common.enums.GenderEnum;
import top.continew.admin.common.service.CommonUserService;
import top.continew.admin.common.util.SecureUtils;
import top.continew.admin.system.enums.OptionCategoryEnum;
import top.continew.admin.system.mapper.UserMapper;
import top.continew.admin.system.mapper.user.UserMapper;
import top.continew.admin.system.model.entity.DeptDO;
import top.continew.admin.system.model.entity.RoleDO;
import top.continew.admin.system.model.entity.UserDO;
import top.continew.admin.system.model.entity.user.UserDO;
import top.continew.admin.system.model.entity.UserRoleDO;
import top.continew.admin.system.model.query.UserQuery;
import top.continew.admin.system.model.req.user.*;

View File

@@ -21,8 +21,8 @@ import lombok.RequiredArgsConstructor;
import me.zhyd.oauth.model.AuthUser;
import org.springframework.stereotype.Service;
import top.continew.admin.system.enums.SocialSourceEnum;
import top.continew.admin.system.mapper.UserSocialMapper;
import top.continew.admin.system.model.entity.UserSocialDO;
import top.continew.admin.system.mapper.user.UserSocialMapper;
import top.continew.admin.system.model.entity.user.UserSocialDO;
import top.continew.admin.system.service.UserSocialService;
import top.continew.starter.core.validation.CheckUtils;

View File

@@ -1,6 +1,6 @@
<?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="top.continew.admin.system.mapper.UserMapper">
<mapper namespace="top.continew.admin.system.mapper.user.UserMapper">
<sql id="selectUser">
SELECT

View File

@@ -1,6 +1,6 @@
<?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="top.continew.admin.system.mapper.UserPasswordHistoryMapper">
<mapper namespace="top.continew.admin.system.mapper.user.UserPasswordHistoryMapper">
<delete id="deleteExpired">
DELETE t1 FROM sys_user_password_history AS t1
LEFT JOIN (

View File

@@ -1,8 +1,8 @@
<?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="top.continew.admin.system.mapper.UserSocialMapper">
<mapper namespace="top.continew.admin.system.mapper.user.UserSocialMapper">
<select id="selectBySourceAndOpenId"
resultType="top.continew.admin.system.model.entity.UserSocialDO">
resultType="top.continew.admin.system.model.entity.user.UserSocialDO">
SELECT t1.*
FROM sys_user_social AS t1
LEFT JOIN sys_user AS t2 ON t2.id = t1.user_id