mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-03-12 01:30:08 +08:00
update 优化统一用户昵称
This commit is contained in:
@@ -21,18 +21,18 @@ public interface UserService {
|
||||
String selectUserNameById(Long userId);
|
||||
|
||||
/**
|
||||
* 通过用户ID查询用户账户
|
||||
* 通过用户ID查询用户昵称
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 用户名称
|
||||
* @return 用户昵称
|
||||
*/
|
||||
String selectNicknameById(Long userId);
|
||||
|
||||
/**
|
||||
* 通过用户ID查询用户账户
|
||||
* 通过用户ID查询用户昵称
|
||||
*
|
||||
* @param userIds 用户ID 多个用逗号隔开
|
||||
* @return 用户名称
|
||||
* @return 用户昵称
|
||||
*/
|
||||
String selectNicknameByIds(String userIds);
|
||||
|
||||
@@ -93,10 +93,10 @@ public interface UserService {
|
||||
List<UserDTO> selectUsersByPostIds(List<Long> postIds);
|
||||
|
||||
/**
|
||||
* 根据用户 ID 列表查询用户名称映射关系
|
||||
* 根据用户 ID 列表查询用户昵称映射关系
|
||||
*
|
||||
* @param userIds 用户 ID 列表
|
||||
* @return Map,其中 key 为用户 ID,value 为对应的用户名称
|
||||
* @return Map,其中 key 为用户 ID,value 为对应的用户昵称
|
||||
*/
|
||||
Map<Long, String> selectUserNamesByIds(List<Long> userIds);
|
||||
|
||||
|
||||
@@ -599,10 +599,10 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过用户ID查询用户账户
|
||||
* 通过用户ID查询用户昵称
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 用户账户
|
||||
* @return 用户昵称
|
||||
*/
|
||||
@Override
|
||||
@Cacheable(cacheNames = CacheNames.SYS_NICKNAME, key = "#userId")
|
||||
@@ -613,10 +613,10 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过用户ID查询用户账户
|
||||
* 通过用户ID查询用户昵称
|
||||
*
|
||||
* @param userIds 用户ID 多个用逗号隔开
|
||||
* @return 用户账户
|
||||
* @return 用户昵称
|
||||
*/
|
||||
@Override
|
||||
public String selectNicknameByIds(String userIds) {
|
||||
@@ -756,10 +756,10 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户 ID 列表查询用户名称映射关系
|
||||
* 根据用户 ID 列表查询用户昵称映射关系
|
||||
*
|
||||
* @param userIds 用户 ID 列表
|
||||
* @return Map,其中 key 为用户 ID,value 为对应的用户名称
|
||||
* @return Map,其中 key 为用户 ID,value 为对应的用户昵称
|
||||
*/
|
||||
@Override
|
||||
public Map<Long, String> selectUserNamesByIds(List<Long> userIds) {
|
||||
|
||||
@@ -23,8 +23,8 @@ public class FlowCopyBo implements Serializable {
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
* 用户昵称
|
||||
*/
|
||||
private String userName;
|
||||
private String nickName;
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -84,7 +84,7 @@ public class WorkflowGlobalListener implements GlobalListener {
|
||||
FlowCopyBo bo = new FlowCopyBo();
|
||||
Long id = Convert.toLong(x);
|
||||
bo.setUserId(id);
|
||||
bo.setUserName(userService.selectUserNameById(id));
|
||||
bo.setNickName(userService.selectNicknameById(id));
|
||||
return bo;
|
||||
});
|
||||
variable.put(FlowConstant.FLOW_COPY_LIST, list);
|
||||
@@ -159,7 +159,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -342,7 +342,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);
|
||||
|
||||
Reference in New Issue
Block a user