mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-03-19 20:15:37 +08:00
update 优化统一用户昵称
This commit is contained in:
@@ -52,7 +52,7 @@ public interface CacheNames {
|
|||||||
String SYS_USER_NAME = "sys_user_name#30d";
|
String SYS_USER_NAME = "sys_user_name#30d";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户名称
|
* 用户昵称
|
||||||
*/
|
*/
|
||||||
String SYS_NICKNAME = "sys_nickname#30d";
|
String SYS_NICKNAME = "sys_nickname#30d";
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ public class FlowCopyDTO implements Serializable {
|
|||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户名称
|
* 用户昵称
|
||||||
*/
|
*/
|
||||||
private String userName;
|
private String nickName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class UserOnlineDTO implements Serializable {
|
|||||||
private String deptName;
|
private String deptName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户名称
|
* 用户账号
|
||||||
*/
|
*/
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
|
|||||||
@@ -98,6 +98,6 @@ public interface UserService {
|
|||||||
* @param userIds 用户 ID 列表
|
* @param userIds 用户 ID 列表
|
||||||
* @return Map,其中 key 为用户 ID,value 为对应的用户昵称
|
* @return Map,其中 key 为用户 ID,value 为对应的用户昵称
|
||||||
*/
|
*/
|
||||||
Map<Long, String> selectUserNamesByIds(List<Long> userIds);
|
Map<Long, String> selectUserNicksByIds(List<Long> userIds);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public interface TransConstant {
|
|||||||
String USER_ID_TO_NAME = "user_id_to_name";
|
String USER_ID_TO_NAME = "user_id_to_name";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id转用户名称
|
* 用户id转用户昵称
|
||||||
*/
|
*/
|
||||||
String USER_ID_TO_NICKNAME = "user_id_to_nickname";
|
String USER_ID_TO_NICKNAME = "user_id_to_nickname";
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import org.dromara.common.translation.constant.TransConstant;
|
|||||||
import org.dromara.common.translation.core.TranslationInterface;
|
import org.dromara.common.translation.core.TranslationInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户名称翻译实现
|
* 用户昵称翻译实现
|
||||||
*
|
*
|
||||||
* @author may
|
* @author may
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ public class ExportDemoVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 用户昵称
|
* 用户昵称
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "用户名", index = 0)
|
@ExcelProperty(value = "用户昵称", index = 0)
|
||||||
@NotEmpty(message = "用户名不能为空", groups = AddGroup.class)
|
@NotEmpty(message = "用户昵称不能为空", groups = AddGroup.class)
|
||||||
private String nickName;
|
private String nickName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class SysUserOnline {
|
|||||||
private String deptName;
|
private String deptName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户名称
|
* 用户账号
|
||||||
*/
|
*/
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
|
|||||||
@@ -34,13 +34,13 @@ public class SysUserExportVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 用户账号
|
* 用户账号
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "登录名称")
|
@ExcelProperty(value = "用户账号")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户昵称
|
* 用户昵称
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "用户名称")
|
@ExcelProperty(value = "用户昵称")
|
||||||
private String nickName;
|
private String nickName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -38,13 +38,13 @@ public class SysUserImportVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 用户账号
|
* 用户账号
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "登录名称")
|
@ExcelProperty(value = "用户账号")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户昵称
|
* 用户昵称
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "用户名称")
|
@ExcelProperty(value = "用户昵称")
|
||||||
private String nickName;
|
private String nickName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public interface ISysUserService {
|
|||||||
String selectUserPostGroup(Long userId);
|
String selectUserPostGroup(Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验用户名称是否唯一
|
* 校验用户账号是否唯一
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
|||||||
/**
|
/**
|
||||||
* 根据用户ID查询菜单
|
* 根据用户ID查询菜单
|
||||||
*
|
*
|
||||||
* @param userId 用户名称
|
* @param userId 用户ID
|
||||||
* @return 菜单列表
|
* @return 菜单列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验用户名称是否唯一
|
* 校验用户账号是否唯一
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
@@ -762,7 +762,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
|||||||
* @return Map,其中 key 为用户 ID,value 为对应的用户昵称
|
* @return Map,其中 key 为用户 ID,value 为对应的用户昵称
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Map<Long, String> selectUserNamesByIds(List<Long> userIds) {
|
public Map<Long, String> selectUserNicksByIds(List<Long> userIds) {
|
||||||
if (CollUtil.isEmpty(userIds)) {
|
if (CollUtil.isEmpty(userIds)) {
|
||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ public class FlwTaskAssigneeServiceImpl implements IFlwTaskAssigneeService, Hand
|
|||||||
|
|
||||||
List<Long> longIds = StreamUtils.toList(ids, Convert::toLong);
|
List<Long> longIds = StreamUtils.toList(ids, Convert::toLong);
|
||||||
Map<Long, String> rawMap = switch (type) {
|
Map<Long, String> rawMap = switch (type) {
|
||||||
case USER -> userService.selectUserNamesByIds(longIds);
|
case USER -> userService.selectUserNicksByIds(longIds);
|
||||||
case ROLE -> roleService.selectRoleNamesByIds(longIds);
|
case ROLE -> roleService.selectRoleNamesByIds(longIds);
|
||||||
case DEPT -> deptService.selectDeptNamesByIds(longIds);
|
case DEPT -> deptService.selectDeptNamesByIds(longIds);
|
||||||
case POST -> postService.selectPostNamesByIds(longIds);
|
case POST -> postService.selectPostNamesByIds(longIds);
|
||||||
|
|||||||
Reference in New Issue
Block a user