提交修改
This commit is contained in:
parent
3184452779
commit
a43e44fed7
@ -1,6 +1,7 @@
|
||||
package com.lz.modules.app.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.lz.common.utils.NumberUtil;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.R;
|
||||
import com.lz.modules.app.entity.DepartmentsEntity;
|
||||
@ -144,7 +145,7 @@ public class StaffRoleController {
|
||||
if (req.getId() != null && req.getId() > 0) {
|
||||
List<StaffRoleDepartment> staffRoleDepartments = staffRoleDepartmentService.selectStaffRoleDepartmentByStaffRoleId(staffRole.getId());
|
||||
for(StaffRoleDepartment staffRoleDepartment : staffRoleDepartments){
|
||||
if(!menuIdList.contains(staffRoleDepartment.getDepartmentId())){
|
||||
if(!menuIdList.contains(NumberUtil.objToLong(staffRoleDepartment.getDepartmentId()))){
|
||||
// 删除没有选的部门
|
||||
staffRoleDepartmentService.deleteStaffRoleDepartment(staffRoleDepartment.getId());
|
||||
}
|
||||
|
||||
@ -166,10 +166,18 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
||||
role.setRoleId(staffRole.getId());
|
||||
role.setRoleName(staffRole.getDepartmentLevel());
|
||||
for(StaffRoleDepartment staffRoleDepartment: staffRoleDepartments){
|
||||
if(staffRoleDepartment.getDepartmentId().equals("379454542")
|
||||
|| staffRoleDepartment.getDepartmentId().equals("154274609")){
|
||||
continue;
|
||||
}
|
||||
menuIdList.add(NumberUtil.objToLongDefault(staffRoleDepartment.getDepartmentId(),0l));
|
||||
}
|
||||
}
|
||||
menuIdList.add(-666666l);
|
||||
menuIdList.add(379454542l);
|
||||
menuIdList.add(154274609l);
|
||||
role.setMenuIdList(menuIdList);
|
||||
|
||||
return role;
|
||||
}
|
||||
|
||||
|
||||
@ -103,4 +103,12 @@ public class SysUserEntity implements Serializable {
|
||||
private Date createTime;
|
||||
|
||||
private int type ;// 0 表示系统用户,1 表示普通员工
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,6 +55,7 @@ public class SysUserTokenServiceImpl extends ServiceImpl<SysUserTokenDao, SysUse
|
||||
tokenEntity.setToken(token);
|
||||
tokenEntity.setUpdateTime(now);
|
||||
tokenEntity.setExpireTime(expireTime);
|
||||
tokenEntity.setType(user.getType());
|
||||
//更新token
|
||||
this.updateById(tokenEntity);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user