修改了用户信息获取方式
This commit is contained in:
@ -7,8 +7,10 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class AuthorityEntity {
|
public class AuthorityEntity {
|
||||||
|
|
||||||
|
private String roleId;
|
||||||
private String roleName;
|
private String roleName;
|
||||||
private String roleCode;
|
private String roleCode;
|
||||||
|
private String roleScope;
|
||||||
private List<String> authorities;
|
private List<String> authorities;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1 +0,0 @@
|
|||||||
package com.chinaunicom.mall.ebtp.common.base;
|
|
@ -55,24 +55,9 @@ public class BaseCacheUserServiceImpl implements IBaseCacheUserService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private BaseCacheUser convertToBusinessModel(SecurityEntity raw) {
|
private BaseCacheUser convertToBusinessModel(SecurityEntity raw) {
|
||||||
return new BaseCacheUser().setUserId(getUserId(raw.getStaffId())).setFullName(raw.getStaffName())
|
return new BaseCacheUser().setUserId(raw.getStaffId()).setFullName(raw.getStaffName())
|
||||||
.setLastName(raw.getUsername()).setRoleIds(raw.getStaffId()).setOrganizationId(raw.getOu())
|
.setLastName(raw.getUsername()).setRoleIds(raw.getStaffId()).setOrganizationId(raw.getOu())
|
||||||
.setOrganizationName(raw.getOuName()).setAuthorityList(raw.getAuthorityList());
|
.setOrganizationName(raw.getOuName()).setAuthorityList(raw.getAuthorityList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
// TODO: 山东框架使用未使用雪花ID存放字符串,暂时使用该方法进行id转换
|
|
||||||
private String getUserId(String rawUid) {
|
|
||||||
long id = ID_SEED;
|
|
||||||
byte[] bytes = rawUid.getBytes();
|
|
||||||
|
|
||||||
for (byte b : bytes) {
|
|
||||||
id += b;
|
|
||||||
}
|
|
||||||
return String.valueOf(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user