update 优化统一用户昵称

This commit is contained in:
疯狂的狮子Li
2026-03-10 15:55:08 +08:00
parent 76ed1c259d
commit 3df21f9ecb
17 changed files with 31 additions and 33 deletions

View File

@@ -32,13 +32,13 @@ public class SysUserExportVo implements Serializable {
/**
* 用户账号
*/
@ExcelProperty(value = "登录名称")
@ExcelProperty(value = "用户账号")
private String userName;
/**
* 用户昵称
*/
@ExcelProperty(value = "用户")
@ExcelProperty(value = "用户")
private String nickName;
/**

View File

@@ -39,13 +39,13 @@ public class SysUserImportVo implements Serializable {
/**
* 用户账号
*/
@ExcelProperty(value = "登录名称")
@ExcelProperty(value = "用户账号")
private String userName;
/**
* 用户昵称
*/
@ExcelProperty(value = "用户")
@ExcelProperty(value = "用户")
private String nickName;
/**

View File

@@ -399,12 +399,12 @@ public class RemoteUserServiceImpl implements RemoteUserService {
}
/**
* 根据用户 ID 列表查询用户称映射关系
* 根据用户 ID 列表查询用户称映射关系
*
* @param userIds 用户 ID 列表
* @return Map其中 key 为用户 IDvalue 为对应的用户
* @return Map其中 key 为用户 IDvalue 为对应的用户
*/
public Map<Long, String> selectUserNamesByIds(List<Long> userIds) {
public Map<Long, String> selectUserNicksByIds(List<Long> userIds) {
if (CollUtil.isEmpty(userIds)) {
return Collections.emptyMap();
}

View File

@@ -98,7 +98,7 @@ public interface ISysUserService {
String selectUserPostGroup(Long userId);
/**
* 校验用户名称是否唯一
* 校验用户账号是否唯一
*
* @param user 用户信息
* @return 结果

View File

@@ -109,7 +109,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
/**
* 根据用户ID查询菜单
*
* @param userId 用户名称
* @param userId 用户ID
* @return 菜单列表
*/
@Override

View File

@@ -231,7 +231,7 @@ public class SysUserServiceImpl implements ISysUserService {
}
/**
* 校验用户名称是否唯一
* 校验用户账号是否唯一
*
* @param user 用户信息
* @return 结果

View File

@@ -23,8 +23,8 @@ public class FlowCopyBo implements Serializable {
private Long userId;
/**
* 用户
* 用户
*/
private String userName;
private String nickName;
}

View File

@@ -24,10 +24,10 @@ public class FlowCopyVo implements Serializable {
private Long userId;
/**
* 用户
* 用户
*/
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "userId")
private String userName;
private String nickName;
public FlowCopyVo(Long userId) {
this.userId = userId;

View File

@@ -87,7 +87,7 @@ public class WorkflowGlobalListener implements GlobalListener {
FlowCopyBo bo = new FlowCopyBo();
Long id = Convert.toLong(x);
bo.setUserId(id);
bo.setUserName(remoteUserService.selectUserNameById(id));
bo.setNickName(remoteUserService.selectNicknameById(id));
return bo;
});
variable.put(FlowConstant.FLOW_COPY_LIST, list);
@@ -162,7 +162,7 @@ public class WorkflowGlobalListener implements GlobalListener {
flowTask.setPermissionList(List.of(userIdArray));
// 移除已处理的状态变量
variable.remove(nodeKey);
FlowEngine.insService().removeVariables(flowTask.getInstanceId(),nodeKey);
FlowEngine.insService().removeVariables(flowTask.getInstanceId(), nodeKey);
}
}

View File

@@ -252,7 +252,7 @@ public class FlwTaskAssigneeServiceImpl implements IFlwTaskAssigneeService, Hand
List<Long> longIds = StreamUtils.toList(ids, Convert::toLong);
Map<Long, String> rawMap = switch (type) {
case USER -> remoteUserService.selectUserNamesByIds(longIds);
case USER -> remoteUserService.selectUserNicksByIds(longIds);
case ROLE -> remoteRoleService.selectRoleNamesByIds(longIds);
case DEPT -> remoteDeptService.selectDeptNamesByIds(longIds);
case POST -> remotePostService.selectPostNamesByIds(longIds);

View File

@@ -344,7 +344,7 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
FlowParams flowParams = FlowParams.build()
.skipType(SkipType.NONE.getKey())
.hisStatus(TaskStatusEnum.COPY.getStatus())
.message("【抄送给】" + StreamUtils.join(flowCopyList, FlowCopyBo::getUserName));
.message("【抄送给】" + StreamUtils.join(flowCopyList, FlowCopyBo::getNickName));
HisTask hisTask = hisTaskService.setSkipHisTask(task, flowNode, flowParams);
hisTask.setCreateTime(updateTime);
hisTask.setUpdateTime(updateTime);