报表(未完成)
This commit is contained in:
parent
dd3cdb75d0
commit
d921f2c6e7
|
@ -0,0 +1,20 @@
|
|||
package com.ruoyi.system.domain.dto;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wjh
|
||||
* 2024/10/22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SysUserQuery extends SysUser {
|
||||
|
||||
@ApiModelProperty("用户ID列表")
|
||||
private List<Long> userIds;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author wjh
|
||||
* 2024/10/22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SysUserVO extends SysUser {
|
||||
}
|
|
@ -1,27 +1,30 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.system.domain.dto.SysUserQuery;
|
||||
import com.ruoyi.system.domain.vo.SysUserVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
|
||||
/**
|
||||
* 用户表 数据层
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface SysUserMapper
|
||||
{
|
||||
/**
|
||||
* 根据条件分页查询用户列表
|
||||
*
|
||||
*
|
||||
* @param sysUser 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
public List<SysUser> selectUserList(SysUser sysUser);
|
||||
public List<SysUserVO> selectUserList(SysUserQuery sysUser);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询已配用户角色列表
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
|
@ -29,7 +32,7 @@ public interface SysUserMapper
|
|||
|
||||
/**
|
||||
* 根据条件分页查询未分配用户角色列表
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
|
@ -37,7 +40,7 @@ public interface SysUserMapper
|
|||
|
||||
/**
|
||||
* 通过用户名查询用户
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
|
@ -45,7 +48,7 @@ public interface SysUserMapper
|
|||
|
||||
/**
|
||||
* 通过用户ID查询用户
|
||||
*
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
|
@ -53,7 +56,7 @@ public interface SysUserMapper
|
|||
|
||||
/**
|
||||
* 新增用户信息
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -61,7 +64,7 @@ public interface SysUserMapper
|
|||
|
||||
/**
|
||||
* 修改用户信息
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -69,7 +72,7 @@ public interface SysUserMapper
|
|||
|
||||
/**
|
||||
* 修改用户头像
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @param avatar 头像地址
|
||||
* @return 结果
|
||||
|
@ -78,7 +81,7 @@ public interface SysUserMapper
|
|||
|
||||
/**
|
||||
* 重置用户密码
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @param password 密码
|
||||
* @return 结果
|
||||
|
@ -87,7 +90,7 @@ public interface SysUserMapper
|
|||
|
||||
/**
|
||||
* 通过用户ID删除用户
|
||||
*
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -95,7 +98,7 @@ public interface SysUserMapper
|
|||
|
||||
/**
|
||||
* 批量删除用户信息
|
||||
*
|
||||
*
|
||||
* @param userIds 需要删除的用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -103,7 +106,7 @@ public interface SysUserMapper
|
|||
|
||||
/**
|
||||
* 校验用户名称是否唯一
|
||||
*
|
||||
*
|
||||
* @param userName 用户名称
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
|
@ -2,25 +2,27 @@ package com.ruoyi.system.service;
|
|||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.system.domain.dto.SysUserQuery;
|
||||
import com.ruoyi.system.domain.vo.SysUserVO;
|
||||
|
||||
/**
|
||||
* 用户 业务层
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface ISysUserService
|
||||
{
|
||||
/**
|
||||
* 根据条件分页查询用户列表
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
public List<SysUser> selectUserList(SysUser user);
|
||||
public List<SysUserVO> selectUserList(SysUserQuery user);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询已分配用户角色列表
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
|
@ -28,7 +30,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 根据条件分页查询未分配用户角色列表
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
|
@ -36,7 +38,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 通过用户名查询用户
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
|
@ -44,7 +46,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 通过用户ID查询用户
|
||||
*
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
|
@ -52,7 +54,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 根据用户ID查询用户所属角色组
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -60,7 +62,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 根据用户ID查询用户所属岗位组
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -68,7 +70,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 校验用户名称是否唯一
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -92,21 +94,21 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 校验用户是否允许操作
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
*/
|
||||
public void checkUserAllowed(SysUser user);
|
||||
|
||||
/**
|
||||
* 校验用户是否有数据权限
|
||||
*
|
||||
*
|
||||
* @param userId 用户id
|
||||
*/
|
||||
public void checkUserDataScope(Long userId);
|
||||
|
||||
/**
|
||||
* 新增用户信息
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -114,7 +116,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 注册用户信息
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -122,7 +124,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 修改用户信息
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -130,7 +132,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 用户授权角色
|
||||
*
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param roleIds 角色组
|
||||
*/
|
||||
|
@ -138,7 +140,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 修改用户状态
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -146,7 +148,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 修改用户基本信息
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -154,7 +156,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 修改用户头像
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @param avatar 头像地址
|
||||
* @return 结果
|
||||
|
@ -163,7 +165,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 重置用户密码
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -171,7 +173,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 重置用户密码
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @param password 密码
|
||||
* @return 结果
|
||||
|
@ -180,7 +182,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 通过用户ID删除用户
|
||||
*
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -188,7 +190,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 批量删除用户信息
|
||||
*
|
||||
*
|
||||
* @param userIds 需要删除的用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -196,7 +198,7 @@ public interface ISysUserService
|
|||
|
||||
/**
|
||||
* 导入用户数据
|
||||
*
|
||||
*
|
||||
* @param userList 用户数据列表
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
* @param operName 操作用户
|
||||
|
|
|
@ -4,6 +4,9 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.validation.Validator;
|
||||
|
||||
import com.ruoyi.system.domain.dto.SysUserQuery;
|
||||
import com.ruoyi.system.domain.vo.SysUserVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -33,7 +36,7 @@ import com.ruoyi.system.service.ISysUserService;
|
|||
|
||||
/**
|
||||
* 用户 业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Service
|
||||
|
@ -67,20 +70,20 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 根据条件分页查询用户列表
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d", userAlias = "u")
|
||||
public List<SysUser> selectUserList(SysUser user)
|
||||
public List<SysUserVO> selectUserList(SysUserQuery user)
|
||||
{
|
||||
return userMapper.selectUserList(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件分页查询已分配用户角色列表
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
|
@ -93,7 +96,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 根据条件分页查询未分配用户角色列表
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
|
@ -106,7 +109,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 通过用户名查询用户
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
|
@ -118,7 +121,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 通过用户ID查询用户
|
||||
*
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
|
@ -130,7 +133,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 查询用户所属角色组
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -147,7 +150,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 查询用户所属岗位组
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -164,7 +167,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 校验用户名称是否唯一
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -218,7 +221,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 校验用户是否允许操作
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
*/
|
||||
@Override
|
||||
|
@ -232,7 +235,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 校验用户是否有数据权限
|
||||
*
|
||||
*
|
||||
* @param userId 用户id
|
||||
*/
|
||||
@Override
|
||||
|
@ -240,9 +243,9 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
{
|
||||
if (!SysUser.isAdmin(SecurityUtils.getUserId()))
|
||||
{
|
||||
SysUser user = new SysUser();
|
||||
SysUserQuery user = new SysUserQuery();
|
||||
user.setUserId(userId);
|
||||
List<SysUser> users = SpringUtils.getAopProxy(this).selectUserList(user);
|
||||
List<SysUserVO> users = SpringUtils.getAopProxy(this).selectUserList(user);
|
||||
if (StringUtils.isEmpty(users))
|
||||
{
|
||||
throw new ServiceException("没有权限访问用户数据!");
|
||||
|
@ -252,7 +255,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 新增保存用户信息
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -271,7 +274,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 注册用户信息
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -283,7 +286,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 修改保存用户信息
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -305,7 +308,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 用户授权角色
|
||||
*
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param roleIds 角色组
|
||||
*/
|
||||
|
@ -319,7 +322,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 修改用户状态
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -331,7 +334,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 修改用户基本信息
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -343,7 +346,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 修改用户头像
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @param avatar 头像地址
|
||||
* @return 结果
|
||||
|
@ -356,7 +359,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 重置用户密码
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -368,7 +371,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 重置用户密码
|
||||
*
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @param password 密码
|
||||
* @return 结果
|
||||
|
@ -381,7 +384,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 新增用户角色信息
|
||||
*
|
||||
*
|
||||
* @param user 用户对象
|
||||
*/
|
||||
public void insertUserRole(SysUser user)
|
||||
|
@ -391,7 +394,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 新增用户岗位信息
|
||||
*
|
||||
*
|
||||
* @param user 用户对象
|
||||
*/
|
||||
public void insertUserPost(SysUser user)
|
||||
|
@ -414,7 +417,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 新增用户角色信息
|
||||
*
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param roleIds 角色组
|
||||
*/
|
||||
|
@ -437,7 +440,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 通过用户ID删除用户
|
||||
*
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -454,7 +457,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 批量删除用户信息
|
||||
*
|
||||
*
|
||||
* @param userIds 需要删除的用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -476,7 +479,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
/**
|
||||
* 导入用户数据
|
||||
*
|
||||
*
|
||||
* @param userList 用户数据列表
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
* @param operName 操作用户
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.SysUserMapper">
|
||||
|
||||
<resultMap type="SysUser" id="SysUserResult" autoMapping="true">
|
||||
<resultMap type="SysUserVO" id="SysUserResult" autoMapping="true">
|
||||
<association property="dept" javaType="SysDept" resultMap="deptResult" />
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||
</resultMap>
|
||||
|
@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sys_role r on r.role_id = ur.role_id
|
||||
</sql>
|
||||
|
||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
<select id="selectUserList" parameterType="SysUserQuery" resultMap="SysUserResult">
|
||||
select
|
||||
u.user_id,
|
||||
u.dept_id,
|
||||
|
@ -118,7 +118,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="deptId != null and deptId != 0">
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
||||
</if>
|
||||
<if test="userIds != null and userIds.size() > 0">
|
||||
AND u.user_id IN
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${@com.ruoyi.framework.util.DataScopeUtil@dataScope("d", "u", needScope)}
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@ package com.ruoyi.web.system;
|
|||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.system.domain.dto.SysUserQuery;
|
||||
import com.ruoyi.system.domain.vo.SysUserVO;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
@ -58,20 +61,34 @@ public class SysUserController extends BaseController
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysUser user)
|
||||
public TableDataInfo list(SysUserQuery user)
|
||||
{
|
||||
startPage();
|
||||
List<SysUser> list = userService.selectUserList(user);
|
||||
List<SysUserVO> list = userService.selectUserList(user);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户列表ByIds
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
@PostMapping("/listByIds")
|
||||
public AjaxResult list(@RequestBody List<Long> userIds)
|
||||
{
|
||||
SysUserQuery query = new SysUserQuery();
|
||||
query.setUserIds(userIds);
|
||||
query.setNeedScope(true);
|
||||
List<SysUserVO> list = userService.selectUserList(query);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:user:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysUser user)
|
||||
public void export(HttpServletResponse response, SysUserQuery user)
|
||||
{
|
||||
List<SysUser> list = userService.selectUserList(user);
|
||||
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
|
||||
List<SysUserVO> list = userService.selectUserList(user);
|
||||
ExcelUtil<SysUserVO> util = new ExcelUtil<SysUserVO>(SysUserVO.class);
|
||||
util.exportExcel(response, list, "用户数据");
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ token:
|
|||
# 令牌密钥
|
||||
secret: abcdefghijklmnopqrstuvwxyz
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 30
|
||||
expireTime: 1440
|
||||
|
||||
# MyBatis配置
|
||||
mybatis:
|
||||
|
|
Loading…
Reference in New Issue
Block a user