功能优化
This commit is contained in:
parent
b609ba465e
commit
0d5d1f129d
|
|
@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
|
@ -80,4 +81,7 @@ public class SysRole implements Serializable {
|
||||||
|
|
||||||
/**租户ID*/
|
/**租户ID*/
|
||||||
private java.lang.Integer tenantId;
|
private java.lang.Integer tenantId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String superId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@
|
||||||
<bind name="bindKeyword" value="'%'+role.roleName+'%'"/>
|
<bind name="bindKeyword" value="'%'+role.roleName+'%'"/>
|
||||||
AND role_name like #{bindKeyword}
|
AND role_name like #{bindKeyword}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="role.superId!=null and role.superId!=''">
|
||||||
|
AND id != '1'
|
||||||
|
</if>
|
||||||
<if test="role.roleCode!='' and role.roleCode!=null">
|
<if test="role.roleCode!='' and role.roleCode!=null">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="role.roleCode.indexOf(',') != -1">
|
<when test="role.roleCode.indexOf(',') != -1">
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,12 @@ package org.jeecg.modules.system.service.impl;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.common.constant.SymbolConstant;
|
import org.jeecg.common.constant.SymbolConstant;
|
||||||
import org.jeecg.common.exception.JeecgBootException;
|
import org.jeecg.common.exception.JeecgBootException;
|
||||||
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
import org.jeecg.common.util.ImportExcelUtil;
|
import org.jeecg.common.util.ImportExcelUtil;
|
||||||
import org.jeecg.modules.system.entity.SysRole;
|
import org.jeecg.modules.system.entity.SysRole;
|
||||||
import org.jeecg.modules.system.mapper.SysRoleMapper;
|
import org.jeecg.modules.system.mapper.SysRoleMapper;
|
||||||
|
|
@ -41,6 +43,10 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<SysRole> listAllSysRole(Page<SysRole> page, SysRole role) {
|
public Page<SysRole> listAllSysRole(Page<SysRole> page, SysRole role) {
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
if(!sysUser.getId().equals("1")){
|
||||||
|
role.setSuperId("1");
|
||||||
|
}
|
||||||
return page.setRecords(sysRoleMapper.listAllSysRole(page,role));
|
return page.setRecords(sysRoleMapper.listAllSysRole(page,role));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,11 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||||
|
|
||||||
//TODO 外部模拟登陆临时账号,列表不显示
|
//TODO 外部模拟登陆临时账号,列表不显示
|
||||||
queryWrapper.ne("username", "_reserve_user_external");
|
queryWrapper.ne("username", "_reserve_user_external");
|
||||||
|
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
if(!sysUser.getId().equals("1")){
|
||||||
|
queryWrapper.ne("id", "1");
|
||||||
|
}
|
||||||
Page<SysUser> page = new Page<SysUser>(pageNo, pageSize);
|
Page<SysUser> page = new Page<SysUser>(pageNo, pageSize);
|
||||||
IPage<SysUser> pageList = this.page(page, queryWrapper);
|
IPage<SysUser> pageList = this.page(page, queryWrapper);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue