JSK
This commit is contained in:
		
							parent
							
								
									9d44c6c311
								
							
						
					
					
						commit
						1bc8214fcf
					
				| 
						 | 
					@ -201,6 +201,8 @@ public class SysUser extends BaseEntity {
 | 
				
			||||||
    @ApiModelProperty("查询类型")
 | 
					    @ApiModelProperty("查询类型")
 | 
				
			||||||
    private boolean bingStatus =  false;
 | 
					    private boolean bingStatus =  false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private String isAdmin;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public void setBingStatus(boolean bingStatus) {
 | 
					    public void setBingStatus(boolean bingStatus) {
 | 
				
			||||||
        this.bingStatus = bingStatus;
 | 
					        this.bingStatus = bingStatus;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -495,4 +497,12 @@ public class SysUser extends BaseEntity {
 | 
				
			||||||
    public void setEffectiveEndDay(Date effectiveEndDay) {
 | 
					    public void setEffectiveEndDay(Date effectiveEndDay) {
 | 
				
			||||||
        this.effectiveEndDay = effectiveEndDay;
 | 
					        this.effectiveEndDay = effectiveEndDay;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getIsAdmin() {
 | 
				
			||||||
 | 
					        return isAdmin;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setIsAdmin(String isAdmin) {
 | 
				
			||||||
 | 
					        this.isAdmin = isAdmin;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -87,6 +87,12 @@ public class SysUserController extends BaseController {
 | 
				
			||||||
    @SysLog(title = "用户管理", businessType = OperaType.QUERY, logType = 0, module = "系统管理->用户管理", details = "查询用户列表")
 | 
					    @SysLog(title = "用户管理", businessType = OperaType.QUERY, logType = 0, module = "系统管理->用户管理", details = "查询用户列表")
 | 
				
			||||||
    public TableDataInfo list(SysUser user) {
 | 
					    public TableDataInfo list(SysUser user) {
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
 | 
					            LoginUser userd=SecurityUtils.getLoginUser();
 | 
				
			||||||
 | 
					            String roles=userd.getRoles().toString();
 | 
				
			||||||
 | 
					            if(roles.contains("system_admin")){
 | 
				
			||||||
 | 
					                user.setIsAdmin("1");
 | 
				
			||||||
 | 
					                user.setDeptId(userd.getSysUser().getDeptId());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            startPage();
 | 
					            startPage();
 | 
				
			||||||
            List<SysUser> list = userService.selectUserList(user);
 | 
					            List<SysUser> list = userService.selectUserList(user);
 | 
				
			||||||
            return getDataTable(list);
 | 
					            return getDataTable(list);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -601,7 +601,7 @@ public class SysUserServiceImpl implements ISysUserService {
 | 
				
			||||||
            user.setUserId(userIds[i]);
 | 
					            user.setUserId(userIds[i]);
 | 
				
			||||||
            users.add(user);
 | 
					            users.add(user);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        smartCanteenClient.deleteAccInfoByUserIds(users);
 | 
					//        smartCanteenClient.deleteAccInfoByUserIds(users);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return userMapper.deleteUserByIds(userIds);
 | 
					        return userMapper.deleteUserByIds(userIds);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -168,6 +168,19 @@
 | 
				
			||||||
            AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
 | 
					            AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
 | 
				
			||||||
            ancestors) ))
 | 
					            ancestors) ))
 | 
				
			||||||
        </if>
 | 
					        </if>
 | 
				
			||||||
 | 
					        <if test='isAdmin != null and isAdmin == "1"'>
 | 
				
			||||||
 | 
					            and u.dept_id in (
 | 
				
			||||||
 | 
					            select dept_id from sys_dept where dept_id=#{deptId}
 | 
				
			||||||
 | 
					            union
 | 
				
			||||||
 | 
					            select dept_id from sys_dept where parent_id=#{deptId}
 | 
				
			||||||
 | 
					            union
 | 
				
			||||||
 | 
					            select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id=#{deptId})
 | 
				
			||||||
 | 
					            union
 | 
				
			||||||
 | 
					            select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id=#{deptId}))
 | 
				
			||||||
 | 
					            union
 | 
				
			||||||
 | 
					            select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id=#{deptId})))
 | 
				
			||||||
 | 
					            )
 | 
				
			||||||
 | 
					        </if>
 | 
				
			||||||
        <if test="roleIds != null and roleIds.length > 0">
 | 
					        <if test="roleIds != null and roleIds.length > 0">
 | 
				
			||||||
            and ur.role_id in
 | 
					            and ur.role_id in
 | 
				
			||||||
            <foreach collection="roleIds" item="item" index="index" separator="," open="(" close=")">
 | 
					            <foreach collection="roleIds" item="item" index="index" separator="," open="(" close=")">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue