mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-03-13 17:40:53 +08:00
update 优化统一用户昵称
This commit is contained in:
@@ -21,18 +21,18 @@ public interface UserService {
|
|||||||
String selectUserNameById(Long userId);
|
String selectUserNameById(Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户ID查询用户账户
|
* 通过用户ID查询用户昵称
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 用户名称
|
* @return 用户昵称
|
||||||
*/
|
*/
|
||||||
String selectNicknameById(Long userId);
|
String selectNicknameById(Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户ID查询用户账户
|
* 通过用户ID查询用户昵称
|
||||||
*
|
*
|
||||||
* @param userIds 用户ID 多个用逗号隔开
|
* @param userIds 用户ID 多个用逗号隔开
|
||||||
* @return 用户名称
|
* @return 用户昵称
|
||||||
*/
|
*/
|
||||||
String selectNicknameByIds(String userIds);
|
String selectNicknameByIds(String userIds);
|
||||||
|
|
||||||
@@ -93,10 +93,10 @@ public interface UserService {
|
|||||||
List<UserDTO> selectUsersByPostIds(List<Long> postIds);
|
List<UserDTO> selectUsersByPostIds(List<Long> postIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户 ID 列表查询用户名称映射关系
|
* 根据用户 ID 列表查询用户昵称映射关系
|
||||||
*
|
*
|
||||||
* @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> selectUserNamesByIds(List<Long> userIds);
|
||||||
|
|
||||||
|
|||||||
@@ -599,10 +599,10 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户ID查询用户账户
|
* 通过用户ID查询用户昵称
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 用户账户
|
* @return 用户昵称
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Cacheable(cacheNames = CacheNames.SYS_NICKNAME, key = "#userId")
|
@Cacheable(cacheNames = CacheNames.SYS_NICKNAME, key = "#userId")
|
||||||
@@ -613,10 +613,10 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户ID查询用户账户
|
* 通过用户ID查询用户昵称
|
||||||
*
|
*
|
||||||
* @param userIds 用户ID 多个用逗号隔开
|
* @param userIds 用户ID 多个用逗号隔开
|
||||||
* @return 用户账户
|
* @return 用户昵称
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String selectNicknameByIds(String userIds) {
|
public String selectNicknameByIds(String userIds) {
|
||||||
@@ -756,10 +756,10 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户 ID 列表查询用户名称映射关系
|
* 根据用户 ID 列表查询用户昵称映射关系
|
||||||
*
|
*
|
||||||
* @param userIds 用户 ID 列表
|
* @param userIds 用户 ID 列表
|
||||||
* @return Map,其中 key 为用户 ID,value 为对应的用户名称
|
* @return Map,其中 key 为用户 ID,value 为对应的用户昵称
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Map<Long, String> selectUserNamesByIds(List<Long> userIds) {
|
public Map<Long, String> selectUserNamesByIds(List<Long> userIds) {
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ public class FlowCopyBo implements Serializable {
|
|||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户名称
|
* 用户昵称
|
||||||
*/
|
*/
|
||||||
private String userName;
|
private String nickName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ public class FlowCopyVo implements Serializable {
|
|||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户名称
|
* 用户昵称
|
||||||
*/
|
*/
|
||||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "userId")
|
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "userId")
|
||||||
private String userName;
|
private String nickName;
|
||||||
|
|
||||||
public FlowCopyVo(Long userId) {
|
public FlowCopyVo(Long userId) {
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class WorkflowGlobalListener implements GlobalListener {
|
|||||||
FlowCopyBo bo = new FlowCopyBo();
|
FlowCopyBo bo = new FlowCopyBo();
|
||||||
Long id = Convert.toLong(x);
|
Long id = Convert.toLong(x);
|
||||||
bo.setUserId(id);
|
bo.setUserId(id);
|
||||||
bo.setUserName(userService.selectUserNameById(id));
|
bo.setNickName(userService.selectNicknameById(id));
|
||||||
return bo;
|
return bo;
|
||||||
});
|
});
|
||||||
variable.put(FlowConstant.FLOW_COPY_LIST, list);
|
variable.put(FlowConstant.FLOW_COPY_LIST, list);
|
||||||
@@ -159,7 +159,7 @@ public class WorkflowGlobalListener implements GlobalListener {
|
|||||||
flowTask.setPermissionList(List.of(userIdArray));
|
flowTask.setPermissionList(List.of(userIdArray));
|
||||||
// 移除已处理的状态变量
|
// 移除已处理的状态变量
|
||||||
variable.remove(nodeKey);
|
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()
|
FlowParams flowParams = FlowParams.build()
|
||||||
.skipType(SkipType.NONE.getKey())
|
.skipType(SkipType.NONE.getKey())
|
||||||
.hisStatus(TaskStatusEnum.COPY.getStatus())
|
.hisStatus(TaskStatusEnum.COPY.getStatus())
|
||||||
.message("【抄送给】" + StreamUtils.join(flowCopyList, FlowCopyBo::getUserName));
|
.message("【抄送给】" + StreamUtils.join(flowCopyList, FlowCopyBo::getNickName));
|
||||||
HisTask hisTask = hisTaskService.setSkipHisTask(task, flowNode, flowParams);
|
HisTask hisTask = hisTaskService.setSkipHisTask(task, flowNode, flowParams);
|
||||||
hisTask.setCreateTime(updateTime);
|
hisTask.setCreateTime(updateTime);
|
||||||
hisTask.setUpdateTime(updateTime);
|
hisTask.setUpdateTime(updateTime);
|
||||||
|
|||||||
Reference in New Issue
Block a user