feat : 部门重构完成
This commit is contained in:
@@ -2,6 +2,7 @@ package cn.fateverse.workflow.entity.bpmn;
|
||||
|
||||
import cn.fateverse.admin.entity.User;
|
||||
import cn.fateverse.admin.vo.UserVo;
|
||||
import cn.fateverse.common.core.entity.LoginUser;
|
||||
import cn.fateverse.workflow.enums.OperationStateEnums;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@@ -47,6 +48,7 @@ public class UserInfo {
|
||||
public static UserInfo toUserInfo(User user){
|
||||
return toUserInfo(user, OperationStateEnums.RUNNING);
|
||||
}
|
||||
|
||||
public static UserInfo toUserInfo(User user, OperationStateEnums state){
|
||||
return UserInfo.builder()
|
||||
.id(user.getUserId().toString())
|
||||
@@ -57,6 +59,16 @@ public class UserInfo {
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UserInfo toUserInfo(LoginUser user, OperationStateEnums state){
|
||||
return UserInfo.builder()
|
||||
.id(user.getUserId().toString())
|
||||
.avatar(user.getAvatar())
|
||||
.name(user.getNickName())
|
||||
.state(state)
|
||||
.sex(user.getSex())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UserInfo toUserInfo(UserVo user, OperationStateEnums state){
|
||||
return UserInfo.builder()
|
||||
.id(user.getUserId().toString())
|
||||
|
||||
Reference in New Issue
Block a user