修改了用户信息获取方式

This commit is contained in:
ajaxfan
2021-01-28 15:13:37 +08:00
parent d0f511187f
commit e8be1e1902
3 changed files with 3 additions and 17 deletions

View File

@ -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;
} }

View File

@ -1 +0,0 @@
package com.chinaunicom.mall.ebtp.common.base;

View File

@ -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);
}
} }