修改了用户信息获取方式
This commit is contained in:
@ -1 +0,0 @@
|
||||
package com.chinaunicom.mall.ebtp.common.base;
|
@ -55,24 +55,9 @@ public class BaseCacheUserServiceImpl implements IBaseCacheUserService {
|
||||
* @return
|
||||
*/
|
||||
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())
|
||||
.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