|
|
@ -23,6 +23,7 @@ import cn.estsh.i3plus.pojo.platform.sqlpack.CoreHqlPack;
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionEnum;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionEnum;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import org.apache.commons.collections.ListUtils;
|
|
|
|
import org.apache.commons.collections.ListUtils;
|
|
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
|
@ -112,7 +113,6 @@ public class SysUserService implements ISysUserService {
|
|
|
|
if(user == null){
|
|
|
|
if(user == null){
|
|
|
|
throw new CredentialsException("用户不存在");
|
|
|
|
throw new CredentialsException("用户不存在");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
packSessionUser(sessionUser, user, user.getUserType(), languageCode);
|
|
|
|
packSessionUser(sessionUser, user, user.getUserType(), languageCode);
|
|
|
|
AuthUtil.setSessionUser(sessionUser);
|
|
|
|
AuthUtil.setSessionUser(sessionUser);
|
|
|
|
refreshUserLoginInformation(user.getId());
|
|
|
|
refreshUserLoginInformation(user.getId());
|
|
|
@ -634,7 +634,7 @@ public class SysUserService implements ISysUserService {
|
|
|
|
LOGGER.error(" SysUser Peck Role information Error userId : {} Exception Message : {} " ,user.getUserInfoId(),e.getMessage());
|
|
|
|
LOGGER.error(" SysUser Peck Role information Error userId : {} Exception Message : {} " ,user.getUserInfoId(),e.getMessage());
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(roleList != null && roleList.size() > 0){
|
|
|
|
if(roleList != null && roleList.size() > 0){
|
|
|
|
List<SysRole> list = new ArrayList<>();
|
|
|
|
List<SysRole> list = new ArrayList<>();
|
|
|
|
roleList.forEach(role -> {
|
|
|
|
roleList.forEach(role -> {
|
|
|
@ -654,9 +654,15 @@ public class SysUserService implements ISysUserService {
|
|
|
|
public void packSysUserMenu(SysUser user){
|
|
|
|
public void packSysUserMenu(SysUser user){
|
|
|
|
List<SysMenu> list = null;
|
|
|
|
List<SysMenu> list = null;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
LOGGER.debug("平台用户 SYS_USER user id :{}", user.getUserInfoId());
|
|
|
|
LOGGER.info("平台用户 SYS_USER user id :{}", user.getUserInfoId());
|
|
|
|
|
|
|
|
if(user.getRoleList() != null && user.getRoleList().size() > 0){
|
|
|
|
|
|
|
|
List<Long> ids = new ArrayList<>();
|
|
|
|
|
|
|
|
user.getRoleList().forEach(role -> {
|
|
|
|
|
|
|
|
ids.add(role.getId());
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
list = userPermissionDao.findSysMenuByUser(user);
|
|
|
|
list = userPermissionDao.findSysMenuByInRoleId(ids.toArray(new Long[ids.size()]));
|
|
|
|
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
}catch (Exception e){
|
|
|
|
LOGGER.error(" SysUser Peck Menu information Error userId : {} Exception Message : {} " ,user.getUserInfoId(),e.getMessage());
|
|
|
|
LOGGER.error(" SysUser Peck Menu information Error userId : {} Exception Message : {} " ,user.getUserInfoId(),e.getMessage());
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|