mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 10:57:13 +08:00 
			
		
		
		
	fix: 修复部分因字段加密导致的错误
This commit is contained in:
		| @@ -21,6 +21,7 @@ import org.apache.ibatis.annotations.Select; | ||||
|  | ||||
| import top.charles7c.continew.admin.common.config.mybatis.DataPermissionMapper; | ||||
| import top.charles7c.continew.admin.system.model.entity.UserDO; | ||||
| import top.charles7c.continew.starter.security.crypto.annotation.FieldEncrypt; | ||||
|  | ||||
| /** | ||||
|  * 用户 Mapper | ||||
| @@ -46,7 +47,7 @@ public interface UserMapper extends DataPermissionMapper<UserDO> { | ||||
|      * @return 用户信息 | ||||
|      */ | ||||
|     @Select("SELECT * FROM `sys_user` WHERE `phone` = #{phone}") | ||||
|     UserDO selectByPhone(@Param("phone") String phone); | ||||
|     UserDO selectByPhone(@FieldEncrypt @Param("phone") String phone); | ||||
|  | ||||
|     /** | ||||
|      * 根据邮箱查询 | ||||
| @@ -55,7 +56,7 @@ public interface UserMapper extends DataPermissionMapper<UserDO> { | ||||
|      * @return 用户信息 | ||||
|      */ | ||||
|     @Select("SELECT * FROM `sys_user` WHERE `email` = #{email}") | ||||
|     UserDO selectByEmail(@Param("email") String email); | ||||
|     UserDO selectByEmail(@FieldEncrypt @Param("email") String email); | ||||
|  | ||||
|     /** | ||||
|      * 根据 ID 查询昵称 | ||||
|   | ||||
| @@ -23,7 +23,6 @@ import top.charles7c.continew.admin.common.enums.DisEnableStatusEnum; | ||||
| import top.charles7c.continew.admin.common.enums.GenderEnum; | ||||
| import top.charles7c.continew.starter.extension.crud.model.entity.BaseDO; | ||||
| import top.charles7c.continew.starter.security.crypto.annotation.FieldEncrypt; | ||||
| import top.charles7c.continew.starter.security.crypto.enums.Algorithm; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.time.LocalDateTime; | ||||
| @@ -65,13 +64,13 @@ public class UserDO extends BaseDO { | ||||
|     /** | ||||
|      * 邮箱 | ||||
|      */ | ||||
|     @FieldEncrypt(Algorithm.AES) | ||||
|     @FieldEncrypt | ||||
|     private String email; | ||||
|  | ||||
|     /** | ||||
|      * 手机号码 | ||||
|      */ | ||||
|     @FieldEncrypt(Algorithm.AES) | ||||
|     @FieldEncrypt | ||||
|     private String phone; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -45,7 +45,7 @@ public class UserQuery implements Serializable { | ||||
|      * 用户名 | ||||
|      */ | ||||
|     @Schema(description = "用户名", example = "zhangsan") | ||||
|     @Query(columns = {"username", "nickname", "email", "phone"}, type = QueryType.LIKE) | ||||
|     @Query(columns = {"username", "nickname"}, type = QueryType.LIKE) | ||||
|     private String username; | ||||
|  | ||||
|     /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user