mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update [重大更新]全业务 增加 接口文档注解 格式化代码
This commit is contained in:
@ -2,44 +2,46 @@ package com.ruoyi.system.domain;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 参数配置表 sys_config
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_config")
|
||||
@ExcelIgnoreUnannotated
|
||||
public class SysConfig implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModel("参数配置业务对象")
|
||||
public class SysConfig extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 参数主键
|
||||
*/
|
||||
@ApiModelProperty(value = "参数主键")
|
||||
@ExcelProperty(value = "参数主键")
|
||||
@TableId(value = "config_id", type = IdType.AUTO)
|
||||
@TableId(value = "config_id")
|
||||
private Long configId;
|
||||
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
@ApiModelProperty(value = "参数名称")
|
||||
@ExcelProperty(value = "参数名称")
|
||||
@NotBlank(message = "参数名称不能为空")
|
||||
@Size(min = 0, max = 100, message = "参数名称不能超过100个字符")
|
||||
@ -48,6 +50,7 @@ public class SysConfig implements Serializable {
|
||||
/**
|
||||
* 参数键名
|
||||
*/
|
||||
@ApiModelProperty(value = "参数键名")
|
||||
@ExcelProperty(value = "参数键名")
|
||||
@NotBlank(message = "参数键名长度不能为空")
|
||||
@Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符")
|
||||
@ -56,6 +59,7 @@ public class SysConfig implements Serializable {
|
||||
/**
|
||||
* 参数键值
|
||||
*/
|
||||
@ApiModelProperty(value = "参数键值")
|
||||
@ExcelProperty(value = "参数键值")
|
||||
@NotBlank(message = "参数键值不能为空")
|
||||
@Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符")
|
||||
@ -64,43 +68,15 @@ public class SysConfig implements Serializable {
|
||||
/**
|
||||
* 系统内置(Y是 N否)
|
||||
*/
|
||||
@ApiModelProperty(value = "系统内置(Y是 N否)")
|
||||
@ExcelProperty(value = "系统内置", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private String configType;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
|
||||
}
|
||||
|
@ -2,14 +2,14 @@ package com.ruoyi.system.domain;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
@ -20,76 +20,86 @@ import java.util.Map;
|
||||
/**
|
||||
* 系统访问记录表 sys_logininfor
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_logininfor")
|
||||
@ExcelIgnoreUnannotated
|
||||
@ApiModel("系统访问记录业务对象")
|
||||
public class SysLogininfor implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ApiModelProperty(value = "访问ID")
|
||||
@ExcelProperty(value = "序号")
|
||||
@TableId(value = "info_id", type = IdType.AUTO)
|
||||
@TableId(value = "info_id")
|
||||
private Long infoId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
@ApiModelProperty(value = "用户账号")
|
||||
@ExcelProperty(value = "用户账号")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 登录状态 0成功 1失败
|
||||
*/
|
||||
@ApiModelProperty(value = "登录状态 0成功 1失败")
|
||||
@ExcelProperty(value = "登录状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_common_status")
|
||||
@ExcelDictFormat(dictType = "sys_common_status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 登录IP地址
|
||||
*/
|
||||
@ApiModelProperty(value = "登录IP地址")
|
||||
@ExcelProperty(value = "登录地址")
|
||||
private String ipaddr;
|
||||
|
||||
/**
|
||||
* 登录地点
|
||||
*/
|
||||
@ApiModelProperty(value = "登录地点")
|
||||
@ExcelProperty(value = "登录地点")
|
||||
private String loginLocation;
|
||||
|
||||
/**
|
||||
* 浏览器类型
|
||||
*/
|
||||
@ApiModelProperty(value = "浏览器类型")
|
||||
@ExcelProperty(value = "浏览器")
|
||||
private String browser;
|
||||
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
@ApiModelProperty(value = "操作系统")
|
||||
@ExcelProperty(value = "操作系统")
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
@ApiModelProperty(value = "提示消息")
|
||||
@ExcelProperty(value = "提示消息")
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* 访问时间
|
||||
*/
|
||||
@ApiModelProperty(value = "访问时间")
|
||||
@ExcelProperty(value = "访问时间")
|
||||
private Date loginTime;
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
@ApiModelProperty(value = "请求参数")
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
|
||||
|
@ -1,39 +1,38 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 通知公告表 sys_notice
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_notice")
|
||||
public class SysNotice implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class SysNotice extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 公告ID
|
||||
*/
|
||||
@TableId(value = "notice_id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "公告ID")
|
||||
@TableId(value = "notice_id")
|
||||
private Long noticeId;
|
||||
|
||||
/**
|
||||
* 公告标题
|
||||
*/
|
||||
@ApiModelProperty(value = "公告标题")
|
||||
@NotBlank(message = "公告标题不能为空")
|
||||
@Size(min = 0, max = 50, message = "公告标题不能超过50个字符")
|
||||
private String noticeTitle;
|
||||
@ -41,53 +40,25 @@ public class SysNotice implements Serializable {
|
||||
/**
|
||||
* 公告类型(1通知 2公告)
|
||||
*/
|
||||
@ApiModelProperty(value = "公告类型(1通知 2公告)")
|
||||
private String noticeType;
|
||||
|
||||
/**
|
||||
* 公告内容
|
||||
*/
|
||||
@ApiModelProperty(value = "公告内容")
|
||||
private String noticeContent;
|
||||
|
||||
/**
|
||||
* 公告状态(0正常 1关闭)
|
||||
*/
|
||||
@ApiModelProperty(value = "公告状态(0正常 1关闭)")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
|
||||
}
|
||||
|
@ -2,14 +2,14 @@ package com.ruoyi.system.domain;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
@ -20,33 +20,37 @@ import java.util.Map;
|
||||
/**
|
||||
* 操作日志记录表 oper_log
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_oper_log")
|
||||
@ExcelIgnoreUnannotated
|
||||
@ApiModel("操作日志记录业务对象")
|
||||
public class SysOperLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 日志主键
|
||||
*/
|
||||
@ExcelProperty(value = "操作序号")
|
||||
@TableId(value = "oper_id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "日志主键")
|
||||
@ExcelProperty(value = "日志主键")
|
||||
@TableId(value = "oper_id")
|
||||
private Long operId;
|
||||
|
||||
/**
|
||||
* 操作模块
|
||||
*/
|
||||
@ApiModelProperty(value = "操作模块")
|
||||
@ExcelProperty(value = "操作模块")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 业务类型(0其它 1新增 2修改 3删除)
|
||||
*/
|
||||
@ApiModelProperty(value = "业务类型(0其它 1新增 2修改 3删除)")
|
||||
@ExcelProperty(value = "业务类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_oper_type")
|
||||
private Integer businessType;
|
||||
@ -54,24 +58,28 @@ public class SysOperLog implements Serializable {
|
||||
/**
|
||||
* 业务类型数组
|
||||
*/
|
||||
@ApiModelProperty(value = "业务类型数组")
|
||||
@TableField(exist = false)
|
||||
private Integer[] businessTypes;
|
||||
|
||||
/**
|
||||
* 请求方法
|
||||
*/
|
||||
@ApiModelProperty(value = "请求方法")
|
||||
@ExcelProperty(value = "请求方法")
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 请求方式
|
||||
*/
|
||||
@ApiModelProperty(value = "请求方式")
|
||||
@ExcelProperty(value = "请求方式")
|
||||
private String requestMethod;
|
||||
|
||||
/**
|
||||
* 操作类别(0其它 1后台用户 2手机端用户)
|
||||
*/
|
||||
@ApiModelProperty(value = "操作类别(0其它 1后台用户 2手机端用户)")
|
||||
@ExcelProperty(value = "操作类别", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=其它,1=后台用户,2=手机端用户")
|
||||
private Integer operatorType;
|
||||
@ -79,48 +87,56 @@ public class SysOperLog implements Serializable {
|
||||
/**
|
||||
* 操作人员
|
||||
*/
|
||||
@ApiModelProperty(value = "操作人员")
|
||||
@ExcelProperty(value = "操作人员")
|
||||
private String operName;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
@ExcelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 请求url
|
||||
*/
|
||||
@ApiModelProperty(value = "请求url")
|
||||
@ExcelProperty(value = "请求地址")
|
||||
private String operUrl;
|
||||
|
||||
/**
|
||||
* 操作地址
|
||||
*/
|
||||
@ApiModelProperty(value = "操作地址")
|
||||
@ExcelProperty(value = "操作地址")
|
||||
private String operIp;
|
||||
|
||||
/**
|
||||
* 操作地点
|
||||
*/
|
||||
@ApiModelProperty(value = "操作地点")
|
||||
@ExcelProperty(value = "操作地点")
|
||||
private String operLocation;
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
@ApiModelProperty(value = "请求参数")
|
||||
@ExcelProperty(value = "请求参数")
|
||||
private String operParam;
|
||||
|
||||
/**
|
||||
* 返回参数
|
||||
*/
|
||||
@ApiModelProperty(value = "返回参数")
|
||||
@ExcelProperty(value = "返回参数")
|
||||
private String jsonResult;
|
||||
|
||||
/**
|
||||
* 操作状态(0正常 1异常)
|
||||
*/
|
||||
@ApiModelProperty(value = "操作状态(0正常 1异常)")
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_common_status")
|
||||
private Integer status;
|
||||
@ -128,18 +144,21 @@ public class SysOperLog implements Serializable {
|
||||
/**
|
||||
* 错误消息
|
||||
*/
|
||||
@ApiModelProperty(value = "错误消息")
|
||||
@ExcelProperty(value = "错误消息")
|
||||
private String errorMsg;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@ApiModelProperty(value = "操作时间")
|
||||
@ExcelProperty(value = "操作时间")
|
||||
private Date operTime;
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
@ApiModelProperty(value = "请求参数")
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
|
||||
|
@ -2,44 +2,47 @@ package com.ruoyi.system.domain;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 岗位表 sys_post
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_post")
|
||||
@ExcelIgnoreUnannotated
|
||||
public class SysPost implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModel("岗位信息业务对象")
|
||||
public class SysPost extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 岗位序号
|
||||
*/
|
||||
@ApiModelProperty(value = "岗位序号")
|
||||
@ExcelProperty(value = "岗位序号")
|
||||
@TableId(value = "post_id", type = IdType.AUTO)
|
||||
@TableId(value = "post_id")
|
||||
private Long postId;
|
||||
|
||||
/**
|
||||
* 岗位编码
|
||||
*/
|
||||
@ApiModelProperty(value = "岗位编码")
|
||||
@ExcelProperty(value = "岗位编码")
|
||||
@NotBlank(message = "岗位编码不能为空")
|
||||
@Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符")
|
||||
@ -48,6 +51,7 @@ public class SysPost implements Serializable {
|
||||
/**
|
||||
* 岗位名称
|
||||
*/
|
||||
@ApiModelProperty(value = "岗位名称")
|
||||
@ExcelProperty(value = "岗位名称")
|
||||
@NotBlank(message = "岗位名称不能为空")
|
||||
@Size(min = 0, max = 50, message = "岗位名称长度不能超过50个字符")
|
||||
@ -56,6 +60,7 @@ public class SysPost implements Serializable {
|
||||
/**
|
||||
* 岗位排序
|
||||
*/
|
||||
@ApiModelProperty(value = "岗位排序")
|
||||
@ExcelProperty(value = "岗位排序")
|
||||
@NotBlank(message = "显示顺序不能为空")
|
||||
private String postSort;
|
||||
@ -63,48 +68,21 @@ public class SysPost implements Serializable {
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(0正常 1停用)")
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_common_status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
|
||||
/**
|
||||
* 用户是否存在此岗位标识 默认不存在
|
||||
*/
|
||||
@ApiModelProperty(value = "用户是否存在此岗位标识 默认不存在")
|
||||
@TableField(exist = false)
|
||||
private boolean flag = false;
|
||||
|
||||
|
@ -1,29 +1,33 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 角色和部门关联 sys_role_dept
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_role_dept")
|
||||
@ApiModel("角色和部门关联")
|
||||
public class SysRoleDept {
|
||||
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
@ApiModelProperty(value = "角色ID")
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
@ApiModelProperty(value = "部门ID")
|
||||
private Long deptId;
|
||||
|
||||
}
|
||||
|
@ -1,29 +1,33 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 角色和菜单关联 sys_role_menu
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_role_menu")
|
||||
@ApiModel("角色和菜单关联")
|
||||
public class SysRoleMenu {
|
||||
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
@ApiModelProperty(value = "角色ID")
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@ApiModelProperty(value = "角色ID")
|
||||
private Long menuId;
|
||||
|
||||
}
|
||||
|
@ -1,56 +1,67 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 当前在线会话
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("当前在线会话业务对象")
|
||||
public class SysUserOnline {
|
||||
|
||||
/**
|
||||
* 会话编号
|
||||
*/
|
||||
@ApiModelProperty(value = "会话编号")
|
||||
private String tokenId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
@ApiModelProperty(value = "用户名称")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 登录IP地址
|
||||
*/
|
||||
@ApiModelProperty(value = "登录IP地址")
|
||||
private String ipaddr;
|
||||
|
||||
/**
|
||||
* 登录地址
|
||||
*/
|
||||
@ApiModelProperty(value = "登录地址")
|
||||
private String loginLocation;
|
||||
|
||||
/**
|
||||
* 浏览器类型
|
||||
*/
|
||||
@ApiModelProperty(value = "浏览器类型")
|
||||
private String browser;
|
||||
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
@ApiModelProperty(value = "操作系统")
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 登录时间
|
||||
*/
|
||||
@ApiModelProperty(value = "登录时间")
|
||||
private Long loginTime;
|
||||
|
||||
}
|
||||
|
@ -1,29 +1,33 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 用户和岗位关联 sys_user_post
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_user_post")
|
||||
@ApiModel("用户和岗位关联")
|
||||
public class SysUserPost {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
@ApiModelProperty(value = "岗位ID")
|
||||
private Long postId;
|
||||
|
||||
}
|
||||
|
@ -1,29 +1,33 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 用户和角色关联 sys_user_role
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_user_role")
|
||||
@ApiModel("用户和角色关联")
|
||||
public class SysUserRole {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
@ApiModelProperty(value = "角色ID")
|
||||
private Long roleId;
|
||||
|
||||
}
|
||||
|
@ -16,52 +16,52 @@ import lombok.EqualsAndHashCode;
|
||||
@ApiModel("OSS对象存储分页查询对象")
|
||||
public class SysOssBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 分页大小
|
||||
*/
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/**
|
||||
* 当前页数
|
||||
*/
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
/**
|
||||
* 排序列
|
||||
*/
|
||||
@ApiModelProperty("排序列")
|
||||
private String orderByColumn;
|
||||
/**
|
||||
* 排序的方向desc或者asc
|
||||
*/
|
||||
@ApiModelProperty(value = "排序的方向", example = "asc,desc")
|
||||
private String isAsc;
|
||||
/**
|
||||
* 分页大小
|
||||
*/
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/**
|
||||
* 当前页数
|
||||
*/
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
/**
|
||||
* 排序列
|
||||
*/
|
||||
@ApiModelProperty("排序列")
|
||||
private String orderByColumn;
|
||||
/**
|
||||
* 排序的方向desc或者asc
|
||||
*/
|
||||
@ApiModelProperty(value = "排序的方向", example = "asc,desc")
|
||||
private String isAsc;
|
||||
|
||||
|
||||
/**
|
||||
* 文件名
|
||||
*/
|
||||
@ApiModelProperty("文件名")
|
||||
private String fileName;
|
||||
/**
|
||||
* 原名
|
||||
*/
|
||||
@ApiModelProperty("原名")
|
||||
private String originalName;
|
||||
/**
|
||||
* 文件后缀名
|
||||
*/
|
||||
@ApiModelProperty("文件后缀名")
|
||||
private String fileSuffix;
|
||||
/**
|
||||
* URL地址
|
||||
*/
|
||||
@ApiModelProperty("URL地址")
|
||||
private String url;
|
||||
/**
|
||||
* 服务商
|
||||
*/
|
||||
@ApiModelProperty("服务商")
|
||||
private String service;
|
||||
/**
|
||||
* 文件名
|
||||
*/
|
||||
@ApiModelProperty("文件名")
|
||||
private String fileName;
|
||||
/**
|
||||
* 原名
|
||||
*/
|
||||
@ApiModelProperty("原名")
|
||||
private String originalName;
|
||||
/**
|
||||
* 文件后缀名
|
||||
*/
|
||||
@ApiModelProperty("文件后缀名")
|
||||
private String fileSuffix;
|
||||
/**
|
||||
* URL地址
|
||||
*/
|
||||
@ApiModelProperty("URL地址")
|
||||
private String url;
|
||||
/**
|
||||
* 服务商
|
||||
*/
|
||||
@ApiModelProperty("服务商")
|
||||
private String service;
|
||||
|
||||
}
|
||||
|
@ -25,43 +25,43 @@ import javax.validation.constraints.Size;
|
||||
@ApiModel("对象存储配置业务对象")
|
||||
public class SysOssConfigBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主建
|
||||
*/
|
||||
@ApiModelProperty(value = "主建", required = true)
|
||||
@NotNull(message = "主建不能为空", groups = { EditGroup.class })
|
||||
private Long ossConfigId;
|
||||
/**
|
||||
* 主建
|
||||
*/
|
||||
@ApiModelProperty(value = "主建", required = true)
|
||||
@NotNull(message = "主建不能为空", groups = {EditGroup.class})
|
||||
private Long ossConfigId;
|
||||
|
||||
/**
|
||||
* 配置key
|
||||
*/
|
||||
@ApiModelProperty(value = "configKey", required = true)
|
||||
@NotBlank(message = "configKey不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(min = 2, max = 100, message = "configKey长度必须介于2和20 之间")
|
||||
@NotBlank(message = "configKey不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(min = 2, max = 100, message = "configKey长度必须介于2和20 之间")
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* accessKey
|
||||
*/
|
||||
@ApiModelProperty(value = "accessKey", required = true)
|
||||
@NotBlank(message = "accessKey不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(min = 2, max = 100, message = "accessKey长度必须介于2和100 之间")
|
||||
@NotBlank(message = "accessKey不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(min = 2, max = 100, message = "accessKey长度必须介于2和100 之间")
|
||||
private String accessKey;
|
||||
|
||||
/**
|
||||
* 秘钥
|
||||
*/
|
||||
@ApiModelProperty(value = "secretKey", required = true)
|
||||
@NotBlank(message = "secretKey不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(min = 2, max = 100, message = "secretKey长度必须介于2和100 之间")
|
||||
@NotBlank(message = "secretKey不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(min = 2, max = 100, message = "secretKey长度必须介于2和100 之间")
|
||||
private String secretKey;
|
||||
|
||||
/**
|
||||
* 桶名称
|
||||
*/
|
||||
@ApiModelProperty(value = "bucketName", required = true)
|
||||
@NotBlank(message = "bucketName不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(min = 2, max = 100, message = "bucketName长度必须介于2和100之间")
|
||||
@NotBlank(message = "bucketName不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(min = 2, max = 100, message = "bucketName长度必须介于2和100之间")
|
||||
private String bucketName;
|
||||
|
||||
/**
|
||||
@ -74,21 +74,21 @@ public class SysOssConfigBo extends BaseEntity {
|
||||
* 访问站点
|
||||
*/
|
||||
@ApiModelProperty(value = "endpoint", required = true)
|
||||
@NotBlank(message = "endpoint不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(min = 2, max = 100, message = "endpoint长度必须介于2和100之间")
|
||||
@NotBlank(message = "endpoint不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(min = 2, max = 100, message = "endpoint长度必须介于2和100之间")
|
||||
private String endpoint;
|
||||
|
||||
/**
|
||||
* 是否https(Y=是,N=否)
|
||||
*/
|
||||
@ApiModelProperty("是否https(Y=是,N=否)")
|
||||
private String isHttps;
|
||||
/**
|
||||
* 是否https(Y=是,N=否)
|
||||
*/
|
||||
@ApiModelProperty("是否https(Y=是,N=否)")
|
||||
private String isHttps;
|
||||
|
||||
/**
|
||||
* 状态(0=正常,1=停用)
|
||||
*/
|
||||
@ApiModelProperty("状态(0=正常,1=停用)")
|
||||
private String status;
|
||||
/**
|
||||
* 状态(0=正常,1=停用)
|
||||
*/
|
||||
@ApiModelProperty("状态(0=正常,1=停用)")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 域
|
||||
|
@ -1,8 +1,9 @@
|
||||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
@ -12,28 +13,33 @@ import lombok.experimental.Accessors;
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("路由显示信息")
|
||||
public class MetaVo {
|
||||
|
||||
/**
|
||||
* 设置该路由在侧边栏和面包屑中展示的名字
|
||||
*/
|
||||
@ApiModelProperty(value = "设置该路由在侧边栏和面包屑中展示的名字")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 设置该路由的图标,对应路径src/assets/icons/svg
|
||||
*/
|
||||
@ApiModelProperty(value = "设置该路由的图标,对应路径src/assets/icons/svg")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 设置为true,则不会被 <keep-alive>缓存
|
||||
*/
|
||||
@ApiModelProperty(value = "设置为true,则不会被 <keep-alive>缓存")
|
||||
private boolean noCache;
|
||||
|
||||
/**
|
||||
* 内链地址(http(s)://开头)
|
||||
*/
|
||||
private String link;
|
||||
/**
|
||||
* 内链地址(http(s)://开头)
|
||||
*/
|
||||
@ApiModelProperty(value = "内链地址(http(s)://开头)")
|
||||
private String link;
|
||||
|
||||
public MetaVo(String title, String icon) {
|
||||
this.title = title;
|
||||
@ -46,19 +52,19 @@ public class MetaVo {
|
||||
this.noCache = noCache;
|
||||
}
|
||||
|
||||
public MetaVo(String title, String icon, String link) {
|
||||
this.title = title;
|
||||
this.icon = icon;
|
||||
this.link = link;
|
||||
}
|
||||
public MetaVo(String title, String icon, String link) {
|
||||
this.title = title;
|
||||
this.icon = icon;
|
||||
this.link = link;
|
||||
}
|
||||
|
||||
public MetaVo(String title, String icon, boolean noCache, String link) {
|
||||
this.title = title;
|
||||
this.icon = icon;
|
||||
this.noCache = noCache;
|
||||
if (StringUtils.ishttp(link)) {
|
||||
this.link = link;
|
||||
}
|
||||
}
|
||||
public MetaVo(String title, String icon, boolean noCache, String link) {
|
||||
this.title = title;
|
||||
this.icon = icon;
|
||||
this.noCache = noCache;
|
||||
if (StringUtils.ishttp(link)) {
|
||||
this.link = link;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
@ -9,56 +11,66 @@ import java.util.List;
|
||||
/**
|
||||
* 路由配置信息
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
@ApiModel("路由配置信息")
|
||||
public class RouterVo {
|
||||
|
||||
/**
|
||||
* 路由名字
|
||||
*/
|
||||
@ApiModelProperty(value = "路由名字")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
@ApiModelProperty(value = "路由地址")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 是否隐藏路由,当设置 true 的时候该路由不会再侧边栏出现
|
||||
*/
|
||||
@ApiModelProperty(value = "是否隐藏路由,当设置 true 的时候该路由不会再侧边栏出现")
|
||||
private boolean hidden;
|
||||
|
||||
/**
|
||||
* 重定向地址,当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
|
||||
*/
|
||||
@ApiModelProperty(value = "重定向地址,当设置 noRedirect 的时候该路由在面包屑导航中不可被点击")
|
||||
private String redirect;
|
||||
|
||||
/**
|
||||
* 组件地址
|
||||
*/
|
||||
@ApiModelProperty(value = "组件地址")
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 路由参数:如 {"id": 1, "name": "ry"}
|
||||
*/
|
||||
@ApiModelProperty(value = "路由参数:如 {\"id\": 1, \"name\": \"ry\"}")
|
||||
private String query;
|
||||
|
||||
/**
|
||||
* 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面
|
||||
*/
|
||||
@ApiModelProperty(value = "当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面")
|
||||
private Boolean alwaysShow;
|
||||
|
||||
/**
|
||||
* 其他元素
|
||||
*/
|
||||
@ApiModelProperty(value = "其他元素")
|
||||
private MetaVo meta;
|
||||
|
||||
/**
|
||||
* 子路由
|
||||
*/
|
||||
@ApiModelProperty(value = "子路由")
|
||||
private List<RouterVo> children;
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 对象存储配置视图对象 sys_oss_config
|
||||
*
|
||||
@ -19,78 +18,78 @@ import lombok.Data;
|
||||
@ExcelIgnoreUnannotated
|
||||
public class SysOssConfigVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
/**
|
||||
* 主建
|
||||
*/
|
||||
@ApiModelProperty("主建")
|
||||
private Long ossConfigId;
|
||||
@ApiModelProperty("主建")
|
||||
private Long ossConfigId;
|
||||
|
||||
/**
|
||||
* 配置key
|
||||
*/
|
||||
@ApiModelProperty("配置key")
|
||||
private String configKey;
|
||||
@ApiModelProperty("配置key")
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* accessKey
|
||||
*/
|
||||
@ApiModelProperty("accessKey")
|
||||
private String accessKey;
|
||||
@ApiModelProperty("accessKey")
|
||||
private String accessKey;
|
||||
|
||||
/**
|
||||
* 秘钥
|
||||
*/
|
||||
@ApiModelProperty("secretKey")
|
||||
private String secretKey;
|
||||
@ApiModelProperty("secretKey")
|
||||
private String secretKey;
|
||||
|
||||
/**
|
||||
* 桶名称
|
||||
*/
|
||||
@ApiModelProperty("桶名称")
|
||||
private String bucketName;
|
||||
@ApiModelProperty("桶名称")
|
||||
private String bucketName;
|
||||
|
||||
/**
|
||||
* 前缀
|
||||
*/
|
||||
@ApiModelProperty("前缀")
|
||||
private String prefix;
|
||||
@ApiModelProperty("前缀")
|
||||
private String prefix;
|
||||
|
||||
/**
|
||||
* 访问站点
|
||||
*/
|
||||
@ApiModelProperty("访问站点")
|
||||
private String endpoint;
|
||||
@ApiModelProperty("访问站点")
|
||||
private String endpoint;
|
||||
|
||||
/**
|
||||
* 是否https(Y=是,N=否)
|
||||
*/
|
||||
@ApiModelProperty("是否https(Y=是,N=否)")
|
||||
private String isHttps;
|
||||
@ApiModelProperty("是否https(Y=是,N=否)")
|
||||
private String isHttps;
|
||||
|
||||
/**
|
||||
* 域
|
||||
*/
|
||||
@ApiModelProperty("域")
|
||||
private String region;
|
||||
@ApiModelProperty("域")
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* 状态(0=正常,1=停用)
|
||||
*/
|
||||
@ApiModelProperty("状态(0=正常,1=停用)")
|
||||
private String status;
|
||||
@ApiModelProperty("状态(0=正常,1=停用)")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 扩展字段
|
||||
*/
|
||||
@ApiModelProperty("扩展字段")
|
||||
private String ext1;
|
||||
@ApiModelProperty("扩展字段")
|
||||
private String ext1;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
@ -15,55 +15,55 @@ import java.util.Date;
|
||||
@ApiModel("OSS对象存储视图对象")
|
||||
public class SysOssVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 对象存储主键
|
||||
*/
|
||||
@ApiModelProperty("对象存储主键")
|
||||
private Long ossId;
|
||||
/**
|
||||
* 对象存储主键
|
||||
*/
|
||||
@ApiModelProperty("对象存储主键")
|
||||
private Long ossId;
|
||||
|
||||
/**
|
||||
* 文件名
|
||||
*/
|
||||
@ApiModelProperty("文件名")
|
||||
private String fileName;
|
||||
/**
|
||||
* 文件名
|
||||
*/
|
||||
@ApiModelProperty("文件名")
|
||||
private String fileName;
|
||||
|
||||
/**
|
||||
* 原名
|
||||
*/
|
||||
@ApiModelProperty("原名")
|
||||
private String originalName;
|
||||
/**
|
||||
* 原名
|
||||
*/
|
||||
@ApiModelProperty("原名")
|
||||
private String originalName;
|
||||
|
||||
/**
|
||||
* 文件后缀名
|
||||
*/
|
||||
@ApiModelProperty("文件后缀名")
|
||||
private String fileSuffix;
|
||||
/**
|
||||
* 文件后缀名
|
||||
*/
|
||||
@ApiModelProperty("文件后缀名")
|
||||
private String fileSuffix;
|
||||
|
||||
/**
|
||||
* URL地址
|
||||
*/
|
||||
@ApiModelProperty("URL地址")
|
||||
private String url;
|
||||
/**
|
||||
* URL地址
|
||||
*/
|
||||
@ApiModelProperty("URL地址")
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 上传人
|
||||
*/
|
||||
@ApiModelProperty("上传人")
|
||||
private String createBy;
|
||||
/**
|
||||
* 上传人
|
||||
*/
|
||||
@ApiModelProperty("上传人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 服务商
|
||||
*/
|
||||
@ApiModelProperty("服务商")
|
||||
private String service;
|
||||
/**
|
||||
* 服务商
|
||||
*/
|
||||
@ApiModelProperty("服务商")
|
||||
private String service;
|
||||
|
||||
|
||||
}
|
||||
|
@ -20,74 +20,74 @@ import java.util.Date;
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class SysUserExportVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "用户序号")
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "用户序号")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
@ExcelProperty(value = "登录名称")
|
||||
private String userName;
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
@ExcelProperty(value = "登录名称")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
@ExcelProperty(value = "用户名称")
|
||||
private String nickName;
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
@ExcelProperty(value = "用户名称")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 用户邮箱
|
||||
*/
|
||||
@ExcelProperty(value = "用户邮箱")
|
||||
private String email;
|
||||
/**
|
||||
* 用户邮箱
|
||||
*/
|
||||
@ExcelProperty(value = "用户邮箱")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@ExcelProperty(value = "手机号码")
|
||||
private String phonenumber;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@ExcelProperty(value = "手机号码")
|
||||
private String phonenumber;
|
||||
|
||||
/**
|
||||
* 用户性别
|
||||
*/
|
||||
@ExcelProperty(value = "用户性别", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_user_sex")
|
||||
private String sex;
|
||||
/**
|
||||
* 用户性别
|
||||
*/
|
||||
@ExcelProperty(value = "用户性别", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_user_sex")
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
@ExcelProperty(value = "帐号状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_common_status")
|
||||
private String status;
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
@ExcelProperty(value = "帐号状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_common_status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 最后登录IP
|
||||
*/
|
||||
@ExcelProperty(value = "最后登录IP")
|
||||
private String loginIp;
|
||||
/**
|
||||
* 最后登录IP
|
||||
*/
|
||||
@ExcelProperty(value = "最后登录IP")
|
||||
private String loginIp;
|
||||
|
||||
/**
|
||||
* 最后登录时间
|
||||
*/
|
||||
@ExcelProperty(value = "最后登录时间")
|
||||
private Date loginDate;
|
||||
/**
|
||||
* 最后登录时间
|
||||
*/
|
||||
@ExcelProperty(value = "最后登录时间")
|
||||
private Date loginDate;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ExcelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ExcelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
@ExcelProperty(value = "部门负责人")
|
||||
private String leader;
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
@ExcelProperty(value = "部门负责人")
|
||||
private String leader;
|
||||
|
||||
}
|
||||
|
@ -18,56 +18,56 @@ import java.io.Serializable;
|
||||
@NoArgsConstructor
|
||||
// @Accessors(chain = true) // 导入不允许使用 会找不到set方法
|
||||
public class SysUserImportVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "用户序号")
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "用户序号")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
@ExcelProperty(value = "部门编号")
|
||||
private Long deptId;
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
@ExcelProperty(value = "部门编号")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
@ExcelProperty(value = "登录名称")
|
||||
private String userName;
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
@ExcelProperty(value = "登录名称")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
@ExcelProperty(value = "用户名称")
|
||||
private String nickName;
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
@ExcelProperty(value = "用户名称")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 用户邮箱
|
||||
*/
|
||||
@ExcelProperty(value = "用户邮箱")
|
||||
private String email;
|
||||
/**
|
||||
* 用户邮箱
|
||||
*/
|
||||
@ExcelProperty(value = "用户邮箱")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@ExcelProperty(value = "手机号码")
|
||||
private String phonenumber;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@ExcelProperty(value = "手机号码")
|
||||
private String phonenumber;
|
||||
|
||||
/**
|
||||
* 用户性别
|
||||
*/
|
||||
@ExcelProperty(value = "用户性别", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_user_sex")
|
||||
private String sex;
|
||||
/**
|
||||
* 用户性别
|
||||
*/
|
||||
@ExcelProperty(value = "用户性别", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_user_sex")
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
@ExcelProperty(value = "帐号状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_common_status")
|
||||
private String status;
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
@ExcelProperty(value = "帐号状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_common_status")
|
||||
private String status;
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import com.ruoyi.system.domain.SysConfig;
|
||||
/**
|
||||
* 参数配置 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysConfigMapper extends BaseMapperPlus<SysConfig> {
|
||||
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* 部门管理 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysDeptMapper extends BaseMapperPlus<SysDept> {
|
||||
|
||||
@ -19,23 +19,23 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDept> {
|
||||
* @param dept 部门信息
|
||||
* @return 部门信息集合
|
||||
*/
|
||||
public List<SysDept> selectDeptList(SysDept dept);
|
||||
List<SysDept> selectDeptList(SysDept dept);
|
||||
|
||||
/**
|
||||
* 根据角色ID查询部门树信息
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @param roleId 角色ID
|
||||
* @param deptCheckStrictly 部门树选择项是否关联显示
|
||||
* @return 选中部门列表
|
||||
*/
|
||||
public List<Integer> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
|
||||
List<Integer> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
|
||||
|
||||
/**
|
||||
* 修改子元素关系
|
||||
*
|
||||
* @param depts 子元素
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeptChildren(@Param("depts") List<SysDept> depts);
|
||||
/**
|
||||
* 修改子元素关系
|
||||
*
|
||||
* @param depts 子元素
|
||||
* @return 结果
|
||||
*/
|
||||
int updateDeptChildren(@Param("depts") List<SysDept> depts);
|
||||
|
||||
}
|
||||
|
@ -9,15 +9,15 @@ import java.util.List;
|
||||
/**
|
||||
* 字典表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysDictDataMapper extends BaseMapperPlus<SysDictData> {
|
||||
|
||||
default List<SysDictData> selectDictDataByType(String dictType) {
|
||||
return selectList(
|
||||
new LambdaQueryWrapper<SysDictData>()
|
||||
.eq(SysDictData::getStatus, "0")
|
||||
.eq(SysDictData::getDictType, dictType)
|
||||
.orderByAsc(SysDictData::getDictSort));
|
||||
}
|
||||
default List<SysDictData> selectDictDataByType(String dictType) {
|
||||
return selectList(
|
||||
new LambdaQueryWrapper<SysDictData>()
|
||||
.eq(SysDictData::getStatus, "0")
|
||||
.eq(SysDictData::getDictType, dictType)
|
||||
.orderByAsc(SysDictData::getDictSort));
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
/**
|
||||
* 字典表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysDictTypeMapper extends BaseMapperPlus<SysDictType> {
|
||||
|
||||
|
@ -6,7 +6,7 @@ import com.ruoyi.system.domain.SysLogininfor;
|
||||
/**
|
||||
* 系统访问日志情况信息 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysLogininforMapper extends BaseMapperPlus<SysLogininfor> {
|
||||
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* 菜单表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysMenuMapper extends BaseMapperPlus<SysMenu> {
|
||||
|
||||
@ -18,7 +18,7 @@ public interface SysMenuMapper extends BaseMapperPlus<SysMenu> {
|
||||
*
|
||||
* @return 权限列表
|
||||
*/
|
||||
public List<String> selectMenuPerms();
|
||||
List<String> selectMenuPerms();
|
||||
|
||||
/**
|
||||
* 根据用户查询系统菜单列表
|
||||
@ -26,7 +26,7 @@ public interface SysMenuMapper extends BaseMapperPlus<SysMenu> {
|
||||
* @param menu 菜单信息
|
||||
* @return 菜单列表
|
||||
*/
|
||||
public List<SysMenu> selectMenuListByUserId(SysMenu menu);
|
||||
List<SysMenu> selectMenuListByUserId(SysMenu menu);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询权限
|
||||
@ -34,14 +34,14 @@ public interface SysMenuMapper extends BaseMapperPlus<SysMenu> {
|
||||
* @param userId 用户ID
|
||||
* @return 权限列表
|
||||
*/
|
||||
public List<String> selectMenuPermsByUserId(Long userId);
|
||||
List<String> selectMenuPermsByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询菜单
|
||||
*
|
||||
* @return 菜单列表
|
||||
*/
|
||||
public List<SysMenu> selectMenuTreeAll();
|
||||
List<SysMenu> selectMenuTreeAll();
|
||||
|
||||
/**
|
||||
* 根据用户ID查询菜单
|
||||
@ -49,7 +49,7 @@ public interface SysMenuMapper extends BaseMapperPlus<SysMenu> {
|
||||
* @param userId 用户ID
|
||||
* @return 菜单列表
|
||||
*/
|
||||
public List<SysMenu> selectMenuTreeByUserId(Long userId);
|
||||
List<SysMenu> selectMenuTreeByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据角色ID查询菜单树信息
|
||||
@ -58,6 +58,6 @@ public interface SysMenuMapper extends BaseMapperPlus<SysMenu> {
|
||||
* @param menuCheckStrictly 菜单树选择项是否关联显示
|
||||
* @return 选中菜单列表
|
||||
*/
|
||||
public List<Integer> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);
|
||||
List<Integer> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import com.ruoyi.system.domain.SysNotice;
|
||||
/**
|
||||
* 通知公告表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysNoticeMapper extends BaseMapperPlus<SysNotice> {
|
||||
|
||||
|
@ -6,7 +6,7 @@ import com.ruoyi.system.domain.SysOperLog;
|
||||
/**
|
||||
* 操作日志 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysOperLogMapper extends BaseMapperPlus<SysOperLog> {
|
||||
|
||||
|
@ -8,7 +8,7 @@ import java.util.List;
|
||||
/**
|
||||
* 岗位信息 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysPostMapper extends BaseMapperPlus<SysPost> {
|
||||
|
||||
@ -18,7 +18,7 @@ public interface SysPostMapper extends BaseMapperPlus<SysPost> {
|
||||
* @param userId 用户ID
|
||||
* @return 选中岗位ID列表
|
||||
*/
|
||||
public List<Integer> selectPostListByUserId(Long userId);
|
||||
List<Integer> selectPostListByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询用户所属岗位组
|
||||
@ -26,6 +26,6 @@ public interface SysPostMapper extends BaseMapperPlus<SysPost> {
|
||||
* @param userName 用户名
|
||||
* @return 结果
|
||||
*/
|
||||
public List<SysPost> selectPostsByUserName(String userName);
|
||||
List<SysPost> selectPostsByUserName(String userName);
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import com.ruoyi.system.domain.SysRoleDept;
|
||||
/**
|
||||
* 角色与部门关联表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysRoleDeptMapper extends BaseMapperPlus<SysRoleDept> {
|
||||
|
||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* 角色表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysRoleMapper extends BaseMapperPlus<SysRole> {
|
||||
|
||||
@ -22,7 +22,7 @@ public interface SysRoleMapper extends BaseMapperPlus<SysRole> {
|
||||
* @param role 角色信息
|
||||
* @return 角色数据集合信息
|
||||
*/
|
||||
public List<SysRole> selectRoleList(SysRole role);
|
||||
List<SysRole> selectRoleList(SysRole role);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询角色
|
||||
@ -30,7 +30,7 @@ public interface SysRoleMapper extends BaseMapperPlus<SysRole> {
|
||||
* @param userId 用户ID
|
||||
* @return 角色列表
|
||||
*/
|
||||
public List<SysRole> selectRolePermissionByUserId(Long userId);
|
||||
List<SysRole> selectRolePermissionByUserId(Long userId);
|
||||
|
||||
|
||||
/**
|
||||
@ -39,7 +39,7 @@ public interface SysRoleMapper extends BaseMapperPlus<SysRole> {
|
||||
* @param userId 用户ID
|
||||
* @return 选中角色ID列表
|
||||
*/
|
||||
public List<Integer> selectRoleListByUserId(Long userId);
|
||||
List<Integer> selectRoleListByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询角色
|
||||
@ -47,6 +47,6 @@ public interface SysRoleMapper extends BaseMapperPlus<SysRole> {
|
||||
* @param userName 用户名
|
||||
* @return 角色列表
|
||||
*/
|
||||
public List<SysRole> selectRolesByUserName(String userName);
|
||||
List<SysRole> selectRolesByUserName(String userName);
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import com.ruoyi.system.domain.SysRoleMenu;
|
||||
/**
|
||||
* 角色与菜单关联表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysRoleMenuMapper extends BaseMapperPlus<SysRoleMenu> {
|
||||
|
||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* 用户表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysUserMapper extends BaseMapperPlus<SysUser> {
|
||||
|
||||
@ -22,7 +22,7 @@ public interface SysUserMapper extends BaseMapperPlus<SysUser> {
|
||||
* @param sysUser 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
public List<SysUser> selectUserList(SysUser sysUser);
|
||||
List<SysUser> selectUserList(SysUser sysUser);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询未已配用户角色列表
|
||||
@ -30,7 +30,7 @@ public interface SysUserMapper extends BaseMapperPlus<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
public Page<SysUser> selectAllocatedList(@Param("page") Page<SysUser> page, @Param("user") SysUser user);
|
||||
Page<SysUser> selectAllocatedList(@Param("page") Page<SysUser> page, @Param("user") SysUser user);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询未分配用户角色列表
|
||||
@ -38,7 +38,7 @@ public interface SysUserMapper extends BaseMapperPlus<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
public Page<SysUser> selectUnallocatedList(@Param("page") Page<SysUser> page, @Param("user") SysUser user);
|
||||
Page<SysUser> selectUnallocatedList(@Param("page") Page<SysUser> page, @Param("user") SysUser user);
|
||||
|
||||
/**
|
||||
* 通过用户名查询用户
|
||||
@ -46,7 +46,7 @@ public interface SysUserMapper extends BaseMapperPlus<SysUser> {
|
||||
* @param userName 用户名
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
public SysUser selectUserByUserName(String userName);
|
||||
SysUser selectUserByUserName(String userName);
|
||||
|
||||
/**
|
||||
* 通过用户ID查询用户
|
||||
@ -54,6 +54,6 @@ public interface SysUserMapper extends BaseMapperPlus<SysUser> {
|
||||
* @param userId 用户ID
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
public SysUser selectUserById(Long userId);
|
||||
SysUser selectUserById(Long userId);
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import com.ruoyi.system.domain.SysUserPost;
|
||||
/**
|
||||
* 用户与岗位关联表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysUserPostMapper extends BaseMapperPlus<SysUserPost> {
|
||||
|
||||
|
@ -6,7 +6,7 @@ import com.ruoyi.system.domain.SysUserRole;
|
||||
/**
|
||||
* 用户与角色关联表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface SysUserRoleMapper extends BaseMapperPlus<SysUserRole> {
|
||||
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* 参数配置 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface ISysConfigService extends IService<SysConfig> {
|
||||
|
||||
@ -22,7 +22,7 @@ public interface ISysConfigService extends IService<SysConfig> {
|
||||
* @param configId 参数配置ID
|
||||
* @return 参数配置信息
|
||||
*/
|
||||
public SysConfig selectConfigById(Long configId);
|
||||
SysConfig selectConfigById(Long configId);
|
||||
|
||||
/**
|
||||
* 根据键名查询参数配置信息
|
||||
@ -30,14 +30,14 @@ public interface ISysConfigService extends IService<SysConfig> {
|
||||
* @param configKey 参数键名
|
||||
* @return 参数键值
|
||||
*/
|
||||
public String selectConfigByKey(String configKey);
|
||||
String selectConfigByKey(String configKey);
|
||||
|
||||
/**
|
||||
* 获取验证码开关
|
||||
*
|
||||
* @return true开启,false关闭
|
||||
*/
|
||||
public boolean selectCaptchaOnOff();
|
||||
boolean selectCaptchaOnOff();
|
||||
|
||||
/**
|
||||
* 查询参数配置列表
|
||||
@ -45,7 +45,7 @@ public interface ISysConfigService extends IService<SysConfig> {
|
||||
* @param config 参数配置信息
|
||||
* @return 参数配置集合
|
||||
*/
|
||||
public List<SysConfig> selectConfigList(SysConfig config);
|
||||
List<SysConfig> selectConfigList(SysConfig config);
|
||||
|
||||
/**
|
||||
* 新增参数配置
|
||||
@ -53,7 +53,7 @@ public interface ISysConfigService extends IService<SysConfig> {
|
||||
* @param config 参数配置信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertConfig(SysConfig config);
|
||||
int insertConfig(SysConfig config);
|
||||
|
||||
/**
|
||||
* 修改参数配置
|
||||
@ -61,7 +61,7 @@ public interface ISysConfigService extends IService<SysConfig> {
|
||||
* @param config 参数配置信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateConfig(SysConfig config);
|
||||
int updateConfig(SysConfig config);
|
||||
|
||||
/**
|
||||
* 批量删除参数信息
|
||||
@ -69,22 +69,22 @@ public interface ISysConfigService extends IService<SysConfig> {
|
||||
* @param configIds 需要删除的参数ID
|
||||
* @return 结果
|
||||
*/
|
||||
public void deleteConfigByIds(Long[] configIds);
|
||||
void deleteConfigByIds(Long[] configIds);
|
||||
|
||||
/**
|
||||
* 加载参数缓存数据
|
||||
*/
|
||||
public void loadingConfigCache();
|
||||
void loadingConfigCache();
|
||||
|
||||
/**
|
||||
* 清空参数缓存数据
|
||||
*/
|
||||
public void clearConfigCache();
|
||||
void clearConfigCache();
|
||||
|
||||
/**
|
||||
* 重置参数缓存数据
|
||||
*/
|
||||
public void resetConfigCache();
|
||||
void resetConfigCache();
|
||||
|
||||
/**
|
||||
* 校验参数键名是否唯一
|
||||
@ -92,5 +92,5 @@ public interface ISysConfigService extends IService<SysConfig> {
|
||||
* @param config 参数信息
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkConfigKeyUnique(SysConfig config);
|
||||
String checkConfigKeyUnique(SysConfig config);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* 部门管理 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface ISysDeptService extends IService<SysDept> {
|
||||
/**
|
||||
@ -18,7 +18,7 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param dept 部门信息
|
||||
* @return 部门信息集合
|
||||
*/
|
||||
public List<SysDept> selectDeptList(SysDept dept);
|
||||
List<SysDept> selectDeptList(SysDept dept);
|
||||
|
||||
/**
|
||||
* 构建前端所需要树结构
|
||||
@ -26,7 +26,7 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param depts 部门列表
|
||||
* @return 树结构列表
|
||||
*/
|
||||
public List<SysDept> buildDeptTree(List<SysDept> depts);
|
||||
List<SysDept> buildDeptTree(List<SysDept> depts);
|
||||
|
||||
/**
|
||||
* 构建前端所需要下拉树结构
|
||||
@ -34,7 +34,7 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param depts 部门列表
|
||||
* @return 下拉树结构列表
|
||||
*/
|
||||
public List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts);
|
||||
List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts);
|
||||
|
||||
/**
|
||||
* 根据角色ID查询部门树信息
|
||||
@ -42,7 +42,7 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param roleId 角色ID
|
||||
* @return 选中部门列表
|
||||
*/
|
||||
public List<Integer> selectDeptListByRoleId(Long roleId);
|
||||
List<Integer> selectDeptListByRoleId(Long roleId);
|
||||
|
||||
/**
|
||||
* 根据部门ID查询信息
|
||||
@ -50,7 +50,7 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param deptId 部门ID
|
||||
* @return 部门信息
|
||||
*/
|
||||
public SysDept selectDeptById(Long deptId);
|
||||
SysDept selectDeptById(Long deptId);
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子部门(正常状态)
|
||||
@ -58,7 +58,7 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param deptId 部门ID
|
||||
* @return 子部门数
|
||||
*/
|
||||
public long selectNormalChildrenDeptById(Long deptId);
|
||||
long selectNormalChildrenDeptById(Long deptId);
|
||||
|
||||
/**
|
||||
* 是否存在部门子节点
|
||||
@ -66,7 +66,7 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param deptId 部门ID
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean hasChildByDeptId(Long deptId);
|
||||
boolean hasChildByDeptId(Long deptId);
|
||||
|
||||
/**
|
||||
* 查询部门是否存在用户
|
||||
@ -74,7 +74,7 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param deptId 部门ID
|
||||
* @return 结果 true 存在 false 不存在
|
||||
*/
|
||||
public boolean checkDeptExistUser(Long deptId);
|
||||
boolean checkDeptExistUser(Long deptId);
|
||||
|
||||
/**
|
||||
* 校验部门名称是否唯一
|
||||
@ -82,14 +82,14 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param dept 部门信息
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkDeptNameUnique(SysDept dept);
|
||||
String checkDeptNameUnique(SysDept dept);
|
||||
|
||||
/**
|
||||
* 校验部门是否有数据权限
|
||||
*
|
||||
* @param deptId 部门id
|
||||
*/
|
||||
public void checkDeptDataScope(Long deptId);
|
||||
void checkDeptDataScope(Long deptId);
|
||||
|
||||
/**
|
||||
* 新增保存部门信息
|
||||
@ -97,7 +97,7 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param dept 部门信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDept(SysDept dept);
|
||||
int insertDept(SysDept dept);
|
||||
|
||||
/**
|
||||
* 修改保存部门信息
|
||||
@ -105,7 +105,7 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param dept 部门信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDept(SysDept dept);
|
||||
int updateDept(SysDept dept);
|
||||
|
||||
/**
|
||||
* 删除部门管理信息
|
||||
@ -113,5 +113,5 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param deptId 部门ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeptById(Long deptId);
|
||||
int deleteDeptById(Long deptId);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* 字典 业务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface ISysDictDataService extends IService<SysDictData> {
|
||||
|
||||
@ -22,7 +22,7 @@ public interface ISysDictDataService extends IService<SysDictData> {
|
||||
* @param dictData 字典数据信息
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataList(SysDictData dictData);
|
||||
List<SysDictData> selectDictDataList(SysDictData dictData);
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典键值查询字典数据信息
|
||||
@ -31,7 +31,7 @@ public interface ISysDictDataService extends IService<SysDictData> {
|
||||
* @param dictValue 字典键值
|
||||
* @return 字典标签
|
||||
*/
|
||||
public String selectDictLabel(String dictType, String dictValue);
|
||||
String selectDictLabel(String dictType, String dictValue);
|
||||
|
||||
/**
|
||||
* 根据字典数据ID查询信息
|
||||
@ -39,7 +39,7 @@ public interface ISysDictDataService extends IService<SysDictData> {
|
||||
* @param dictCode 字典数据ID
|
||||
* @return 字典数据
|
||||
*/
|
||||
public SysDictData selectDictDataById(Long dictCode);
|
||||
SysDictData selectDictDataById(Long dictCode);
|
||||
|
||||
/**
|
||||
* 批量删除字典数据信息
|
||||
@ -47,7 +47,7 @@ public interface ISysDictDataService extends IService<SysDictData> {
|
||||
* @param dictCodes 需要删除的字典数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public void deleteDictDataByIds(Long[] dictCodes);
|
||||
void deleteDictDataByIds(Long[] dictCodes);
|
||||
|
||||
/**
|
||||
* 新增保存字典数据信息
|
||||
@ -55,7 +55,7 @@ public interface ISysDictDataService extends IService<SysDictData> {
|
||||
* @param dictData 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictData(SysDictData dictData);
|
||||
int insertDictData(SysDictData dictData);
|
||||
|
||||
/**
|
||||
* 修改保存字典数据信息
|
||||
@ -63,5 +63,5 @@ public interface ISysDictDataService extends IService<SysDictData> {
|
||||
* @param dictData 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictData(SysDictData dictData);
|
||||
int updateDictData(SysDictData dictData);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* 字典 业务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface ISysDictTypeService extends IService<SysDictType> {
|
||||
|
||||
@ -23,14 +23,14 @@ public interface ISysDictTypeService extends IService<SysDictType> {
|
||||
* @param dictType 字典类型信息
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 根据所有字典类型
|
||||
*
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeAll();
|
||||
List<SysDictType> selectDictTypeAll();
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典数据
|
||||
@ -38,7 +38,7 @@ public interface ISysDictTypeService extends IService<SysDictType> {
|
||||
* @param dictType 字典类型
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataByType(String dictType);
|
||||
List<SysDictData> selectDictDataByType(String dictType);
|
||||
|
||||
/**
|
||||
* 根据字典类型ID查询信息
|
||||
@ -46,7 +46,7 @@ public interface ISysDictTypeService extends IService<SysDictType> {
|
||||
* @param dictId 字典类型ID
|
||||
* @return 字典类型
|
||||
*/
|
||||
public SysDictType selectDictTypeById(Long dictId);
|
||||
SysDictType selectDictTypeById(Long dictId);
|
||||
|
||||
/**
|
||||
* 根据字典类型查询信息
|
||||
@ -54,7 +54,7 @@ public interface ISysDictTypeService extends IService<SysDictType> {
|
||||
* @param dictType 字典类型
|
||||
* @return 字典类型
|
||||
*/
|
||||
public SysDictType selectDictTypeByType(String dictType);
|
||||
SysDictType selectDictTypeByType(String dictType);
|
||||
|
||||
/**
|
||||
* 批量删除字典信息
|
||||
@ -62,22 +62,22 @@ public interface ISysDictTypeService extends IService<SysDictType> {
|
||||
* @param dictIds 需要删除的字典ID
|
||||
* @return 结果
|
||||
*/
|
||||
public void deleteDictTypeByIds(Long[] dictIds);
|
||||
void deleteDictTypeByIds(Long[] dictIds);
|
||||
|
||||
/**
|
||||
* 加载字典缓存数据
|
||||
*/
|
||||
public void loadingDictCache();
|
||||
void loadingDictCache();
|
||||
|
||||
/**
|
||||
* 清空字典缓存数据
|
||||
*/
|
||||
public void clearDictCache();
|
||||
void clearDictCache();
|
||||
|
||||
/**
|
||||
* 重置字典缓存数据
|
||||
*/
|
||||
public void resetDictCache();
|
||||
void resetDictCache();
|
||||
|
||||
/**
|
||||
* 新增保存字典类型信息
|
||||
@ -85,7 +85,7 @@ public interface ISysDictTypeService extends IService<SysDictType> {
|
||||
* @param dictType 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictType(SysDictType dictType);
|
||||
int insertDictType(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 修改保存字典类型信息
|
||||
@ -93,7 +93,7 @@ public interface ISysDictTypeService extends IService<SysDictType> {
|
||||
* @param dictType 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictType(SysDictType dictType);
|
||||
int updateDictType(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 校验字典类型称是否唯一
|
||||
@ -101,5 +101,5 @@ public interface ISysDictTypeService extends IService<SysDictType> {
|
||||
* @param dictType 字典类型
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkDictTypeUnique(SysDictType dictType);
|
||||
String checkDictTypeUnique(SysDictType dictType);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* 系统访问日志情况信息 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface ISysLogininforService extends IService<SysLogininfor> {
|
||||
|
||||
@ -21,7 +21,7 @@ public interface ISysLogininforService extends IService<SysLogininfor> {
|
||||
*
|
||||
* @param logininfor 访问日志对象
|
||||
*/
|
||||
public void insertLogininfor(SysLogininfor logininfor);
|
||||
void insertLogininfor(SysLogininfor logininfor);
|
||||
|
||||
/**
|
||||
* 查询系统登录日志集合
|
||||
@ -29,7 +29,7 @@ public interface ISysLogininforService extends IService<SysLogininfor> {
|
||||
* @param logininfor 访问日志对象
|
||||
* @return 登录记录集合
|
||||
*/
|
||||
public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
|
||||
List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
|
||||
|
||||
/**
|
||||
* 批量删除系统登录日志
|
||||
@ -37,10 +37,10 @@ public interface ISysLogininforService extends IService<SysLogininfor> {
|
||||
* @param infoIds 需要删除的登录日志ID
|
||||
* @return
|
||||
*/
|
||||
public int deleteLogininforByIds(Long[] infoIds);
|
||||
int deleteLogininforByIds(Long[] infoIds);
|
||||
|
||||
/**
|
||||
* 清空系统登录日志
|
||||
*/
|
||||
public void cleanLogininfor();
|
||||
void cleanLogininfor();
|
||||
}
|
||||
|
@ -11,16 +11,17 @@ import java.util.Set;
|
||||
/**
|
||||
* 菜单 业务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface ISysMenuService extends IService<SysMenu> {
|
||||
|
||||
/**
|
||||
* 根据用户查询系统菜单列表
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 菜单列表
|
||||
*/
|
||||
public List<SysMenu> selectMenuList(Long userId);
|
||||
List<SysMenu> selectMenuList(Long userId);
|
||||
|
||||
/**
|
||||
* 根据用户查询系统菜单列表
|
||||
@ -29,7 +30,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param userId 用户ID
|
||||
* @return 菜单列表
|
||||
*/
|
||||
public List<SysMenu> selectMenuList(SysMenu menu, Long userId);
|
||||
List<SysMenu> selectMenuList(SysMenu menu, Long userId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询权限
|
||||
@ -37,7 +38,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param userId 用户ID
|
||||
* @return 权限列表
|
||||
*/
|
||||
public Set<String> selectMenuPermsByUserId(Long userId);
|
||||
Set<String> selectMenuPermsByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询菜单树信息
|
||||
@ -45,7 +46,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param userId 用户ID
|
||||
* @return 菜单列表
|
||||
*/
|
||||
public List<SysMenu> selectMenuTreeByUserId(Long userId);
|
||||
List<SysMenu> selectMenuTreeByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据角色ID查询菜单树信息
|
||||
@ -53,7 +54,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param roleId 角色ID
|
||||
* @return 选中菜单列表
|
||||
*/
|
||||
public List<Integer> selectMenuListByRoleId(Long roleId);
|
||||
List<Integer> selectMenuListByRoleId(Long roleId);
|
||||
|
||||
/**
|
||||
* 构建前端路由所需要的菜单
|
||||
@ -61,7 +62,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param menus 菜单列表
|
||||
* @return 路由列表
|
||||
*/
|
||||
public List<RouterVo> buildMenus(List<SysMenu> menus);
|
||||
List<RouterVo> buildMenus(List<SysMenu> menus);
|
||||
|
||||
/**
|
||||
* 构建前端所需要树结构
|
||||
@ -69,7 +70,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param menus 菜单列表
|
||||
* @return 树结构列表
|
||||
*/
|
||||
public List<SysMenu> buildMenuTree(List<SysMenu> menus);
|
||||
List<SysMenu> buildMenuTree(List<SysMenu> menus);
|
||||
|
||||
/**
|
||||
* 构建前端所需要下拉树结构
|
||||
@ -77,7 +78,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param menus 菜单列表
|
||||
* @return 下拉树结构列表
|
||||
*/
|
||||
public List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus);
|
||||
List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus);
|
||||
|
||||
/**
|
||||
* 根据菜单ID查询信息
|
||||
@ -85,7 +86,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param menuId 菜单ID
|
||||
* @return 菜单信息
|
||||
*/
|
||||
public SysMenu selectMenuById(Long menuId);
|
||||
SysMenu selectMenuById(Long menuId);
|
||||
|
||||
/**
|
||||
* 是否存在菜单子节点
|
||||
@ -93,7 +94,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param menuId 菜单ID
|
||||
* @return 结果 true 存在 false 不存在
|
||||
*/
|
||||
public boolean hasChildByMenuId(Long menuId);
|
||||
boolean hasChildByMenuId(Long menuId);
|
||||
|
||||
/**
|
||||
* 查询菜单是否存在角色
|
||||
@ -101,7 +102,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param menuId 菜单ID
|
||||
* @return 结果 true 存在 false 不存在
|
||||
*/
|
||||
public boolean checkMenuExistRole(Long menuId);
|
||||
boolean checkMenuExistRole(Long menuId);
|
||||
|
||||
/**
|
||||
* 新增保存菜单信息
|
||||
@ -109,7 +110,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param menu 菜单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMenu(SysMenu menu);
|
||||
int insertMenu(SysMenu menu);
|
||||
|
||||
/**
|
||||
* 修改保存菜单信息
|
||||
@ -117,7 +118,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param menu 菜单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMenu(SysMenu menu);
|
||||
int updateMenu(SysMenu menu);
|
||||
|
||||
/**
|
||||
* 删除菜单管理信息
|
||||
@ -125,7 +126,7 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param menuId 菜单ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMenuById(Long menuId);
|
||||
int deleteMenuById(Long menuId);
|
||||
|
||||
/**
|
||||
* 校验菜单名称是否唯一
|
||||
@ -133,5 +134,5 @@ public interface ISysMenuService extends IService<SysMenu> {
|
||||
* @param menu 菜单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkMenuNameUnique(SysMenu menu);
|
||||
String checkMenuNameUnique(SysMenu menu);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* 公告 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface ISysNoticeService extends IService<SysNotice> {
|
||||
|
||||
@ -22,7 +22,7 @@ public interface ISysNoticeService extends IService<SysNotice> {
|
||||
* @param noticeId 公告ID
|
||||
* @return 公告信息
|
||||
*/
|
||||
public SysNotice selectNoticeById(Long noticeId);
|
||||
SysNotice selectNoticeById(Long noticeId);
|
||||
|
||||
/**
|
||||
* 查询公告列表
|
||||
@ -30,7 +30,7 @@ public interface ISysNoticeService extends IService<SysNotice> {
|
||||
* @param notice 公告信息
|
||||
* @return 公告集合
|
||||
*/
|
||||
public List<SysNotice> selectNoticeList(SysNotice notice);
|
||||
List<SysNotice> selectNoticeList(SysNotice notice);
|
||||
|
||||
/**
|
||||
* 新增公告
|
||||
@ -38,7 +38,7 @@ public interface ISysNoticeService extends IService<SysNotice> {
|
||||
* @param notice 公告信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNotice(SysNotice notice);
|
||||
int insertNotice(SysNotice notice);
|
||||
|
||||
/**
|
||||
* 修改公告
|
||||
@ -46,7 +46,7 @@ public interface ISysNoticeService extends IService<SysNotice> {
|
||||
* @param notice 公告信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNotice(SysNotice notice);
|
||||
int updateNotice(SysNotice notice);
|
||||
|
||||
/**
|
||||
* 删除公告信息
|
||||
@ -54,7 +54,7 @@ public interface ISysNoticeService extends IService<SysNotice> {
|
||||
* @param noticeId 公告ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNoticeById(Long noticeId);
|
||||
int deleteNoticeById(Long noticeId);
|
||||
|
||||
/**
|
||||
* 批量删除公告信息
|
||||
@ -62,5 +62,5 @@ public interface ISysNoticeService extends IService<SysNotice> {
|
||||
* @param noticeIds 需要删除的公告ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNoticeByIds(Long[] noticeIds);
|
||||
int deleteNoticeByIds(Long[] noticeIds);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* 操作日志 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface ISysOperLogService extends IService<SysOperLog> {
|
||||
|
||||
@ -20,7 +20,7 @@ public interface ISysOperLogService extends IService<SysOperLog> {
|
||||
*
|
||||
* @param operLog 操作日志对象
|
||||
*/
|
||||
public void insertOperlog(SysOperLog operLog);
|
||||
void insertOperlog(SysOperLog operLog);
|
||||
|
||||
/**
|
||||
* 查询系统操作日志集合
|
||||
@ -28,7 +28,7 @@ public interface ISysOperLogService extends IService<SysOperLog> {
|
||||
* @param operLog 操作日志对象
|
||||
* @return 操作日志集合
|
||||
*/
|
||||
public List<SysOperLog> selectOperLogList(SysOperLog operLog);
|
||||
List<SysOperLog> selectOperLogList(SysOperLog operLog);
|
||||
|
||||
/**
|
||||
* 批量删除系统操作日志
|
||||
@ -36,7 +36,7 @@ public interface ISysOperLogService extends IService<SysOperLog> {
|
||||
* @param operIds 需要删除的操作日志ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOperLogByIds(Long[] operIds);
|
||||
int deleteOperLogByIds(Long[] operIds);
|
||||
|
||||
/**
|
||||
* 查询操作日志详细
|
||||
@ -44,10 +44,10 @@ public interface ISysOperLogService extends IService<SysOperLog> {
|
||||
* @param operId 操作ID
|
||||
* @return 操作日志对象
|
||||
*/
|
||||
public SysOperLog selectOperLogById(Long operId);
|
||||
SysOperLog selectOperLogById(Long operId);
|
||||
|
||||
/**
|
||||
* 清空操作日志
|
||||
*/
|
||||
public void cleanOperLog();
|
||||
void cleanOperLog();
|
||||
}
|
||||
|
@ -17,42 +17,45 @@ import java.util.Collection;
|
||||
*/
|
||||
public interface ISysOssConfigService extends IServicePlus<SysOssConfig, SysOssConfigVo> {
|
||||
|
||||
/**
|
||||
* 查询单个
|
||||
*/
|
||||
SysOssConfigVo queryById(Integer ossConfigId);
|
||||
/**
|
||||
* 查询单个
|
||||
*/
|
||||
SysOssConfigVo queryById(Integer ossConfigId);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
TableDataInfo<SysOssConfigVo> queryPageList(SysOssConfigBo bo);
|
||||
|
||||
|
||||
/**
|
||||
* 根据新增业务对象插入对象存储配置
|
||||
* @param bo 对象存储配置新增业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean insertByBo(SysOssConfigBo bo);
|
||||
/**
|
||||
* 根据新增业务对象插入对象存储配置
|
||||
*
|
||||
* @param bo 对象存储配置新增业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean insertByBo(SysOssConfigBo bo);
|
||||
|
||||
/**
|
||||
* 根据编辑业务对象修改对象存储配置
|
||||
* @param bo 对象存储配置编辑业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean updateByBo(SysOssConfigBo bo);
|
||||
/**
|
||||
* 根据编辑业务对象修改对象存储配置
|
||||
*
|
||||
* @param bo 对象存储配置编辑业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean updateByBo(SysOssConfigBo bo);
|
||||
|
||||
/**
|
||||
* 校验并删除数据
|
||||
* @param ids 主键集合
|
||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
/**
|
||||
* 校验并删除数据
|
||||
*
|
||||
* @param ids 主键集合
|
||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 启用停用状态
|
||||
*/
|
||||
int updateOssConfigStatus(SysOssConfigBo bo);
|
||||
/**
|
||||
* 启用停用状态
|
||||
*/
|
||||
int updateOssConfigStatus(SysOssConfigBo bo);
|
||||
|
||||
}
|
||||
|
@ -16,9 +16,9 @@ import java.util.Collection;
|
||||
*/
|
||||
public interface ISysOssService extends IServicePlus<SysOss, SysOssVo> {
|
||||
|
||||
TableDataInfo<SysOssVo> queryPageList(SysOssBo sysOss);
|
||||
TableDataInfo<SysOssVo> queryPageList(SysOssBo sysOss);
|
||||
|
||||
SysOss upload(MultipartFile file);
|
||||
SysOss upload(MultipartFile file);
|
||||
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* 岗位信息 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface ISysPostService extends IService<SysPost> {
|
||||
|
||||
@ -22,14 +22,14 @@ public interface ISysPostService extends IService<SysPost> {
|
||||
* @param post 岗位信息
|
||||
* @return 岗位列表
|
||||
*/
|
||||
public List<SysPost> selectPostList(SysPost post);
|
||||
List<SysPost> selectPostList(SysPost post);
|
||||
|
||||
/**
|
||||
* 查询所有岗位
|
||||
*
|
||||
* @return 岗位列表
|
||||
*/
|
||||
public List<SysPost> selectPostAll();
|
||||
List<SysPost> selectPostAll();
|
||||
|
||||
/**
|
||||
* 通过岗位ID查询岗位信息
|
||||
@ -37,7 +37,7 @@ public interface ISysPostService extends IService<SysPost> {
|
||||
* @param postId 岗位ID
|
||||
* @return 角色对象信息
|
||||
*/
|
||||
public SysPost selectPostById(Long postId);
|
||||
SysPost selectPostById(Long postId);
|
||||
|
||||
/**
|
||||
* 根据用户ID获取岗位选择框列表
|
||||
@ -45,7 +45,7 @@ public interface ISysPostService extends IService<SysPost> {
|
||||
* @param userId 用户ID
|
||||
* @return 选中岗位ID列表
|
||||
*/
|
||||
public List<Integer> selectPostListByUserId(Long userId);
|
||||
List<Integer> selectPostListByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 校验岗位名称
|
||||
@ -53,7 +53,7 @@ public interface ISysPostService extends IService<SysPost> {
|
||||
* @param post 岗位信息
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkPostNameUnique(SysPost post);
|
||||
String checkPostNameUnique(SysPost post);
|
||||
|
||||
/**
|
||||
* 校验岗位编码
|
||||
@ -61,7 +61,7 @@ public interface ISysPostService extends IService<SysPost> {
|
||||
* @param post 岗位信息
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkPostCodeUnique(SysPost post);
|
||||
String checkPostCodeUnique(SysPost post);
|
||||
|
||||
/**
|
||||
* 通过岗位ID查询岗位使用数量
|
||||
@ -69,7 +69,7 @@ public interface ISysPostService extends IService<SysPost> {
|
||||
* @param postId 岗位ID
|
||||
* @return 结果
|
||||
*/
|
||||
public long countUserPostById(Long postId);
|
||||
long countUserPostById(Long postId);
|
||||
|
||||
/**
|
||||
* 删除岗位信息
|
||||
@ -77,7 +77,7 @@ public interface ISysPostService extends IService<SysPost> {
|
||||
* @param postId 岗位ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePostById(Long postId);
|
||||
int deletePostById(Long postId);
|
||||
|
||||
/**
|
||||
* 批量删除岗位信息
|
||||
@ -86,7 +86,7 @@ public interface ISysPostService extends IService<SysPost> {
|
||||
* @return 结果
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
public int deletePostByIds(Long[] postIds);
|
||||
int deletePostByIds(Long[] postIds);
|
||||
|
||||
/**
|
||||
* 新增保存岗位信息
|
||||
@ -94,7 +94,7 @@ public interface ISysPostService extends IService<SysPost> {
|
||||
* @param post 岗位信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPost(SysPost post);
|
||||
int insertPost(SysPost post);
|
||||
|
||||
/**
|
||||
* 修改保存岗位信息
|
||||
@ -102,5 +102,5 @@ public interface ISysPostService extends IService<SysPost> {
|
||||
* @param post 岗位信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePost(SysPost post);
|
||||
int updatePost(SysPost post);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import java.util.Set;
|
||||
/**
|
||||
* 角色业务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface ISysRoleService extends IService<SysRole> {
|
||||
|
||||
@ -24,7 +24,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param role 角色信息
|
||||
* @return 角色数据集合信息
|
||||
*/
|
||||
public List<SysRole> selectRoleList(SysRole role);
|
||||
List<SysRole> selectRoleList(SysRole role);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询角色列表
|
||||
@ -32,7 +32,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param userId 用户ID
|
||||
* @return 角色列表
|
||||
*/
|
||||
public List<SysRole> selectRolesByUserId(Long userId);
|
||||
List<SysRole> selectRolesByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询角色权限
|
||||
@ -40,14 +40,14 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param userId 用户ID
|
||||
* @return 权限列表
|
||||
*/
|
||||
public Set<String> selectRolePermissionByUserId(Long userId);
|
||||
Set<String> selectRolePermissionByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询所有角色
|
||||
*
|
||||
* @return 角色列表
|
||||
*/
|
||||
public List<SysRole> selectRoleAll();
|
||||
List<SysRole> selectRoleAll();
|
||||
|
||||
/**
|
||||
* 根据用户ID获取角色选择框列表
|
||||
@ -55,7 +55,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param userId 用户ID
|
||||
* @return 选中角色ID列表
|
||||
*/
|
||||
public List<Integer> selectRoleListByUserId(Long userId);
|
||||
List<Integer> selectRoleListByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 通过角色ID查询角色
|
||||
@ -63,7 +63,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param roleId 角色ID
|
||||
* @return 角色对象信息
|
||||
*/
|
||||
public SysRole selectRoleById(Long roleId);
|
||||
SysRole selectRoleById(Long roleId);
|
||||
|
||||
/**
|
||||
* 校验角色名称是否唯一
|
||||
@ -71,7 +71,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param role 角色信息
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkRoleNameUnique(SysRole role);
|
||||
String checkRoleNameUnique(SysRole role);
|
||||
|
||||
/**
|
||||
* 校验角色权限是否唯一
|
||||
@ -79,21 +79,21 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param role 角色信息
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkRoleKeyUnique(SysRole role);
|
||||
String checkRoleKeyUnique(SysRole role);
|
||||
|
||||
/**
|
||||
* 校验角色是否允许操作
|
||||
*
|
||||
* @param role 角色信息
|
||||
*/
|
||||
public void checkRoleAllowed(SysRole role);
|
||||
void checkRoleAllowed(SysRole role);
|
||||
|
||||
/**
|
||||
* 校验角色是否有数据权限
|
||||
*
|
||||
* @param roleId 角色id
|
||||
*/
|
||||
public void checkRoleDataScope(Long roleId);
|
||||
void checkRoleDataScope(Long roleId);
|
||||
|
||||
/**
|
||||
* 通过角色ID查询角色使用数量
|
||||
@ -101,7 +101,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param roleId 角色ID
|
||||
* @return 结果
|
||||
*/
|
||||
public long countUserRoleByRoleId(Long roleId);
|
||||
long countUserRoleByRoleId(Long roleId);
|
||||
|
||||
/**
|
||||
* 新增保存角色信息
|
||||
@ -109,7 +109,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param role 角色信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRole(SysRole role);
|
||||
int insertRole(SysRole role);
|
||||
|
||||
/**
|
||||
* 修改保存角色信息
|
||||
@ -117,7 +117,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param role 角色信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRole(SysRole role);
|
||||
int updateRole(SysRole role);
|
||||
|
||||
/**
|
||||
* 修改角色状态
|
||||
@ -125,7 +125,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param role 角色信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRoleStatus(SysRole role);
|
||||
int updateRoleStatus(SysRole role);
|
||||
|
||||
/**
|
||||
* 修改数据权限信息
|
||||
@ -133,7 +133,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param role 角色信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int authDataScope(SysRole role);
|
||||
int authDataScope(SysRole role);
|
||||
|
||||
/**
|
||||
* 通过角色ID删除角色
|
||||
@ -141,7 +141,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param roleId 角色ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRoleById(Long roleId);
|
||||
int deleteRoleById(Long roleId);
|
||||
|
||||
/**
|
||||
* 批量删除角色信息
|
||||
@ -149,7 +149,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param roleIds 需要删除的角色ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRoleByIds(Long[] roleIds);
|
||||
int deleteRoleByIds(Long[] roleIds);
|
||||
|
||||
/**
|
||||
* 取消授权用户角色
|
||||
@ -157,23 +157,23 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param userRole 用户和角色关联信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAuthUser(SysUserRole userRole);
|
||||
int deleteAuthUser(SysUserRole userRole);
|
||||
|
||||
/**
|
||||
* 批量取消授权用户角色
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @param roleId 角色ID
|
||||
* @param userIds 需要取消授权的用户数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAuthUsers(Long roleId, Long[] userIds);
|
||||
int deleteAuthUsers(Long roleId, Long[] userIds);
|
||||
|
||||
/**
|
||||
* 批量选择授权用户角色
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @param roleId 角色ID
|
||||
* @param userIds 需要删除的用户数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAuthUsers(Long roleId, Long[] userIds);
|
||||
int insertAuthUsers(Long roleId, Long[] userIds);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import com.ruoyi.system.domain.SysUserOnline;
|
||||
/**
|
||||
* 在线用户 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface ISysUserOnlineService {
|
||||
/**
|
||||
@ -16,7 +16,7 @@ public interface ISysUserOnlineService {
|
||||
* @param user 用户信息
|
||||
* @return 在线用户信息
|
||||
*/
|
||||
public SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user);
|
||||
SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user);
|
||||
|
||||
/**
|
||||
* 通过用户名称查询信息
|
||||
@ -25,7 +25,7 @@ public interface ISysUserOnlineService {
|
||||
* @param user 用户信息
|
||||
* @return 在线用户信息
|
||||
*/
|
||||
public SysUserOnline selectOnlineByUserName(String userName, LoginUser user);
|
||||
SysUserOnline selectOnlineByUserName(String userName, LoginUser user);
|
||||
|
||||
/**
|
||||
* 通过登录地址/用户名称查询信息
|
||||
@ -35,7 +35,7 @@ public interface ISysUserOnlineService {
|
||||
* @param user 用户信息
|
||||
* @return 在线用户信息
|
||||
*/
|
||||
public SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user);
|
||||
SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user);
|
||||
|
||||
/**
|
||||
* 设置在线用户信息
|
||||
@ -43,5 +43,5 @@ public interface ISysUserOnlineService {
|
||||
* @param user 用户信息
|
||||
* @return 在线用户
|
||||
*/
|
||||
public SysUserOnline loginUserToUserOnline(LoginUser user);
|
||||
SysUserOnline loginUserToUserOnline(LoginUser user);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* 用户 业务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface ISysUserService extends IService<SysUser> {
|
||||
|
||||
@ -22,7 +22,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
public List<SysUser> selectUserList(SysUser user);
|
||||
List<SysUser> selectUserList(SysUser user);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询已分配用户角色列表
|
||||
@ -30,7 +30,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
public TableDataInfo<SysUser> selectAllocatedList(SysUser user);
|
||||
TableDataInfo<SysUser> selectAllocatedList(SysUser user);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询未分配用户角色列表
|
||||
@ -38,7 +38,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
public TableDataInfo<SysUser> selectUnallocatedList(SysUser user);
|
||||
TableDataInfo<SysUser> selectUnallocatedList(SysUser user);
|
||||
|
||||
/**
|
||||
* 通过用户名查询用户
|
||||
@ -46,7 +46,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param userName 用户名
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
public SysUser selectUserByUserName(String userName);
|
||||
SysUser selectUserByUserName(String userName);
|
||||
|
||||
/**
|
||||
* 通过用户ID查询用户
|
||||
@ -54,7 +54,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param userId 用户ID
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
public SysUser selectUserById(Long userId);
|
||||
SysUser selectUserById(Long userId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询用户所属角色组
|
||||
@ -62,7 +62,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param userName 用户名
|
||||
* @return 结果
|
||||
*/
|
||||
public String selectUserRoleGroup(String userName);
|
||||
String selectUserRoleGroup(String userName);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询用户所属岗位组
|
||||
@ -70,7 +70,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param userName 用户名
|
||||
* @return 结果
|
||||
*/
|
||||
public String selectUserPostGroup(String userName);
|
||||
String selectUserPostGroup(String userName);
|
||||
|
||||
/**
|
||||
* 校验用户名称是否唯一
|
||||
@ -78,7 +78,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param userName 用户名称
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkUserNameUnique(String userName);
|
||||
String checkUserNameUnique(String userName);
|
||||
|
||||
/**
|
||||
* 校验手机号码是否唯一
|
||||
@ -86,7 +86,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkPhoneUnique(SysUser user);
|
||||
String checkPhoneUnique(SysUser user);
|
||||
|
||||
/**
|
||||
* 校验email是否唯一
|
||||
@ -94,21 +94,21 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkEmailUnique(SysUser user);
|
||||
String checkEmailUnique(SysUser user);
|
||||
|
||||
/**
|
||||
* 校验用户是否允许操作
|
||||
*
|
||||
* @param user 用户信息
|
||||
*/
|
||||
public void checkUserAllowed(SysUser user);
|
||||
void checkUserAllowed(SysUser user);
|
||||
|
||||
/**
|
||||
* 校验用户是否有数据权限
|
||||
*
|
||||
* @param userId 用户id
|
||||
*/
|
||||
public void checkUserDataScope(Long userId);
|
||||
void checkUserDataScope(Long userId);
|
||||
|
||||
/**
|
||||
* 新增用户信息
|
||||
@ -116,7 +116,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUser(SysUser user);
|
||||
int insertUser(SysUser user);
|
||||
|
||||
/**
|
||||
* 注册用户信息
|
||||
@ -124,7 +124,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean registerUser(SysUser user);
|
||||
boolean registerUser(SysUser user);
|
||||
|
||||
/**
|
||||
* 修改用户信息
|
||||
@ -132,15 +132,15 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUser(SysUser user);
|
||||
int updateUser(SysUser user);
|
||||
|
||||
/**
|
||||
* 用户授权角色
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param userId 用户ID
|
||||
* @param roleIds 角色组
|
||||
*/
|
||||
public void insertUserAuth(Long userId, Long[] roleIds);
|
||||
void insertUserAuth(Long userId, Long[] roleIds);
|
||||
|
||||
/**
|
||||
* 修改用户状态
|
||||
@ -148,7 +148,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserStatus(SysUser user);
|
||||
int updateUserStatus(SysUser user);
|
||||
|
||||
/**
|
||||
* 修改用户基本信息
|
||||
@ -156,16 +156,16 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserProfile(SysUser user);
|
||||
int updateUserProfile(SysUser user);
|
||||
|
||||
/**
|
||||
* 修改用户头像
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @param avatar 头像地址
|
||||
* @param avatar 头像地址
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean updateUserAvatar(String userName, String avatar);
|
||||
boolean updateUserAvatar(String userName, String avatar);
|
||||
|
||||
/**
|
||||
* 重置用户密码
|
||||
@ -173,7 +173,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int resetPwd(SysUser user);
|
||||
int resetPwd(SysUser user);
|
||||
|
||||
/**
|
||||
* 重置用户密码
|
||||
@ -182,7 +182,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param password 密码
|
||||
* @return 结果
|
||||
*/
|
||||
public int resetUserPwd(String userName, String password);
|
||||
int resetUserPwd(String userName, String password);
|
||||
|
||||
/**
|
||||
* 通过用户ID删除用户
|
||||
@ -190,7 +190,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserById(Long userId);
|
||||
int deleteUserById(Long userId);
|
||||
|
||||
/**
|
||||
* 批量删除用户信息
|
||||
@ -198,15 +198,15 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param userIds 需要删除的用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserByIds(Long[] userIds);
|
||||
int deleteUserByIds(Long[] userIds);
|
||||
|
||||
/**
|
||||
* 导入用户数据
|
||||
*
|
||||
* @param userList 用户数据列表
|
||||
* @param userList 用户数据列表
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
* @param operName 操作用户
|
||||
* @param operName 操作用户
|
||||
* @return 结果
|
||||
*/
|
||||
public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);
|
||||
String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);
|
||||
}
|
||||
|
@ -26,10 +26,11 @@ import javax.servlet.http.HttpServletRequest;
|
||||
/**
|
||||
* 登录校验方法
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Service
|
||||
public class SysLoginService {
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 注册校验方法
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Service
|
||||
public class SysRegisterService {
|
||||
|
@ -26,204 +26,204 @@ import java.util.Map;
|
||||
/**
|
||||
* 参数配置 服务层实现
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Service
|
||||
public class SysConfigServiceImpl extends ServicePlusImpl<SysConfigMapper, SysConfig, SysConfig> implements ISysConfigService {
|
||||
|
||||
/**
|
||||
* 项目启动时,初始化参数到缓存
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
loadingConfigCache();
|
||||
}
|
||||
/**
|
||||
* 项目启动时,初始化参数到缓存
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
loadingConfigCache();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<SysConfig> selectPageConfigList(SysConfig config) {
|
||||
Map<String, Object> params = config.getParams();
|
||||
LambdaQueryWrapper<SysConfig> lqw = new LambdaQueryWrapper<SysConfig>()
|
||||
.like(StringUtils.isNotBlank(config.getConfigName()), SysConfig::getConfigName, config.getConfigName())
|
||||
.eq(StringUtils.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType())
|
||||
.like(StringUtils.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey())
|
||||
.apply(StringUtils.isNotEmpty(params.get("beginTime")),
|
||||
"date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
||||
params.get("beginTime"))
|
||||
.apply(StringUtils.isNotEmpty(params.get("endTime")),
|
||||
"date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
||||
params.get("endTime"));
|
||||
return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw));
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<SysConfig> selectPageConfigList(SysConfig config) {
|
||||
Map<String, Object> params = config.getParams();
|
||||
LambdaQueryWrapper<SysConfig> lqw = new LambdaQueryWrapper<SysConfig>()
|
||||
.like(StringUtils.isNotBlank(config.getConfigName()), SysConfig::getConfigName, config.getConfigName())
|
||||
.eq(StringUtils.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType())
|
||||
.like(StringUtils.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey())
|
||||
.apply(StringUtils.isNotEmpty(params.get("beginTime")),
|
||||
"date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
||||
params.get("beginTime"))
|
||||
.apply(StringUtils.isNotEmpty(params.get("endTime")),
|
||||
"date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
||||
params.get("endTime"));
|
||||
return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询参数配置信息
|
||||
*
|
||||
* @param configId 参数配置ID
|
||||
* @return 参数配置信息
|
||||
*/
|
||||
@Override
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
public SysConfig selectConfigById(Long configId) {
|
||||
return baseMapper.selectById(configId);
|
||||
}
|
||||
/**
|
||||
* 查询参数配置信息
|
||||
*
|
||||
* @param configId 参数配置ID
|
||||
* @return 参数配置信息
|
||||
*/
|
||||
@Override
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
public SysConfig selectConfigById(Long configId) {
|
||||
return baseMapper.selectById(configId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据键名查询参数配置信息
|
||||
*
|
||||
* @param configKey 参数key
|
||||
* @return 参数键值
|
||||
*/
|
||||
@Override
|
||||
public String selectConfigByKey(String configKey) {
|
||||
String configValue = Convert.toStr(RedisUtils.getCacheObject(getCacheKey(configKey)));
|
||||
if (StringUtils.isNotEmpty(configValue)) {
|
||||
return configValue;
|
||||
}
|
||||
SysConfig retConfig = baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>()
|
||||
.eq(SysConfig::getConfigKey, configKey));
|
||||
if (StringUtils.isNotNull(retConfig)) {
|
||||
RedisUtils.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue());
|
||||
return retConfig.getConfigValue();
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
/**
|
||||
* 根据键名查询参数配置信息
|
||||
*
|
||||
* @param configKey 参数key
|
||||
* @return 参数键值
|
||||
*/
|
||||
@Override
|
||||
public String selectConfigByKey(String configKey) {
|
||||
String configValue = Convert.toStr(RedisUtils.getCacheObject(getCacheKey(configKey)));
|
||||
if (StringUtils.isNotEmpty(configValue)) {
|
||||
return configValue;
|
||||
}
|
||||
SysConfig retConfig = baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>()
|
||||
.eq(SysConfig::getConfigKey, configKey));
|
||||
if (StringUtils.isNotNull(retConfig)) {
|
||||
RedisUtils.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue());
|
||||
return retConfig.getConfigValue();
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取验证码开关
|
||||
*
|
||||
* @return true开启,false关闭
|
||||
*/
|
||||
@Override
|
||||
public boolean selectCaptchaOnOff() {
|
||||
String captchaOnOff = selectConfigByKey("sys.account.captchaOnOff");
|
||||
if (StringUtils.isEmpty(captchaOnOff)) {
|
||||
return true;
|
||||
}
|
||||
return Convert.toBool(captchaOnOff);
|
||||
}
|
||||
/**
|
||||
* 获取验证码开关
|
||||
*
|
||||
* @return true开启,false关闭
|
||||
*/
|
||||
@Override
|
||||
public boolean selectCaptchaOnOff() {
|
||||
String captchaOnOff = selectConfigByKey("sys.account.captchaOnOff");
|
||||
if (StringUtils.isEmpty(captchaOnOff)) {
|
||||
return true;
|
||||
}
|
||||
return Convert.toBool(captchaOnOff);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询参数配置列表
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
* @return 参数配置集合
|
||||
*/
|
||||
@Override
|
||||
public List<SysConfig> selectConfigList(SysConfig config) {
|
||||
Map<String, Object> params = config.getParams();
|
||||
LambdaQueryWrapper<SysConfig> lqw = new LambdaQueryWrapper<SysConfig>()
|
||||
.like(StringUtils.isNotBlank(config.getConfigName()), SysConfig::getConfigName, config.getConfigName())
|
||||
.eq(StringUtils.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType())
|
||||
.like(StringUtils.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey())
|
||||
.apply(StringUtils.isNotEmpty(params.get("beginTime")),
|
||||
"date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
||||
params.get("beginTime"))
|
||||
.apply(StringUtils.isNotEmpty(params.get("endTime")),
|
||||
"date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
||||
params.get("endTime"));
|
||||
return baseMapper.selectList(lqw);
|
||||
}
|
||||
/**
|
||||
* 查询参数配置列表
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
* @return 参数配置集合
|
||||
*/
|
||||
@Override
|
||||
public List<SysConfig> selectConfigList(SysConfig config) {
|
||||
Map<String, Object> params = config.getParams();
|
||||
LambdaQueryWrapper<SysConfig> lqw = new LambdaQueryWrapper<SysConfig>()
|
||||
.like(StringUtils.isNotBlank(config.getConfigName()), SysConfig::getConfigName, config.getConfigName())
|
||||
.eq(StringUtils.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType())
|
||||
.like(StringUtils.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey())
|
||||
.apply(StringUtils.isNotEmpty(params.get("beginTime")),
|
||||
"date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
||||
params.get("beginTime"))
|
||||
.apply(StringUtils.isNotEmpty(params.get("endTime")),
|
||||
"date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
||||
params.get("endTime"));
|
||||
return baseMapper.selectList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增参数配置
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertConfig(SysConfig config) {
|
||||
int row = baseMapper.insert(config);
|
||||
if (row > 0) {
|
||||
RedisUtils.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());
|
||||
}
|
||||
return row;
|
||||
}
|
||||
/**
|
||||
* 新增参数配置
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertConfig(SysConfig config) {
|
||||
int row = baseMapper.insert(config);
|
||||
if (row > 0) {
|
||||
RedisUtils.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改参数配置
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateConfig(SysConfig config) {
|
||||
int row = baseMapper.updateById(config);
|
||||
if (row > 0) {
|
||||
RedisUtils.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());
|
||||
}
|
||||
return row;
|
||||
}
|
||||
/**
|
||||
* 修改参数配置
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateConfig(SysConfig config) {
|
||||
int row = baseMapper.updateById(config);
|
||||
if (row > 0) {
|
||||
RedisUtils.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除参数信息
|
||||
*
|
||||
* @param configIds 需要删除的参数ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public void deleteConfigByIds(Long[] configIds) {
|
||||
for (Long configId : configIds) {
|
||||
SysConfig config = selectConfigById(configId);
|
||||
if (StringUtils.equals(UserConstants.YES, config.getConfigType())) {
|
||||
throw new ServiceException(String.format("内置参数【%1$s】不能删除 ", config.getConfigKey()));
|
||||
}
|
||||
RedisUtils.deleteObject(getCacheKey(config.getConfigKey()));
|
||||
}
|
||||
baseMapper.deleteBatchIds(Arrays.asList(configIds));
|
||||
}
|
||||
/**
|
||||
* 批量删除参数信息
|
||||
*
|
||||
* @param configIds 需要删除的参数ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public void deleteConfigByIds(Long[] configIds) {
|
||||
for (Long configId : configIds) {
|
||||
SysConfig config = selectConfigById(configId);
|
||||
if (StringUtils.equals(UserConstants.YES, config.getConfigType())) {
|
||||
throw new ServiceException(String.format("内置参数【%1$s】不能删除 ", config.getConfigKey()));
|
||||
}
|
||||
RedisUtils.deleteObject(getCacheKey(config.getConfigKey()));
|
||||
}
|
||||
baseMapper.deleteBatchIds(Arrays.asList(configIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载参数缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void loadingConfigCache() {
|
||||
List<SysConfig> configsList = selectConfigList(new SysConfig());
|
||||
for (SysConfig config : configsList) {
|
||||
RedisUtils.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 加载参数缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void loadingConfigCache() {
|
||||
List<SysConfig> configsList = selectConfigList(new SysConfig());
|
||||
for (SysConfig config : configsList) {
|
||||
RedisUtils.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空参数缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void clearConfigCache() {
|
||||
Collection<String> keys = RedisUtils.keys(Constants.SYS_CONFIG_KEY + "*");
|
||||
RedisUtils.deleteObject(keys);
|
||||
}
|
||||
/**
|
||||
* 清空参数缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void clearConfigCache() {
|
||||
Collection<String> keys = RedisUtils.keys(Constants.SYS_CONFIG_KEY + "*");
|
||||
RedisUtils.deleteObject(keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置参数缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void resetConfigCache() {
|
||||
clearConfigCache();
|
||||
loadingConfigCache();
|
||||
}
|
||||
/**
|
||||
* 重置参数缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void resetConfigCache() {
|
||||
clearConfigCache();
|
||||
loadingConfigCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验参数键名是否唯一
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public String checkConfigKeyUnique(SysConfig config) {
|
||||
Long configId = StringUtils.isNull(config.getConfigId()) ? -1L : config.getConfigId();
|
||||
SysConfig info = baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>().eq(SysConfig::getConfigKey, config.getConfigKey()));
|
||||
if (StringUtils.isNotNull(info) && info.getConfigId().longValue() != configId.longValue()) {
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
/**
|
||||
* 校验参数键名是否唯一
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public String checkConfigKeyUnique(SysConfig config) {
|
||||
Long configId = StringUtils.isNull(config.getConfigId()) ? -1L : config.getConfigId();
|
||||
SysConfig info = baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>().eq(SysConfig::getConfigKey, config.getConfigKey()));
|
||||
if (StringUtils.isNotNull(info) && info.getConfigId().longValue() != configId.longValue()) {
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置cache key
|
||||
*
|
||||
* @param configKey 参数键
|
||||
* @return 缓存键key
|
||||
*/
|
||||
private String getCacheKey(String configKey) {
|
||||
return Constants.SYS_CONFIG_KEY + configKey;
|
||||
}
|
||||
/**
|
||||
* 设置cache key
|
||||
*
|
||||
* @param configKey 参数键
|
||||
* @return 缓存键key
|
||||
*/
|
||||
private String getCacheKey(String configKey) {
|
||||
return Constants.SYS_CONFIG_KEY + configKey;
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* 部门管理 服务实现
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Service
|
||||
public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept, SysDept> implements ISysDeptService {
|
||||
@ -65,13 +65,13 @@ public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept,
|
||||
for (SysDept dept : depts) {
|
||||
tempList.add(dept.getDeptId());
|
||||
}
|
||||
for (SysDept dept : depts) {
|
||||
// 如果是顶级节点, 遍历该父节点的所有子节点
|
||||
if (!tempList.contains(dept.getParentId())) {
|
||||
recursionFn(depts, dept);
|
||||
returnList.add(dept);
|
||||
}
|
||||
}
|
||||
for (SysDept dept : depts) {
|
||||
// 如果是顶级节点, 遍历该父节点的所有子节点
|
||||
if (!tempList.contains(dept.getParentId())) {
|
||||
recursionFn(depts, dept);
|
||||
returnList.add(dept);
|
||||
}
|
||||
}
|
||||
if (returnList.isEmpty()) {
|
||||
returnList = depts;
|
||||
}
|
||||
@ -224,7 +224,7 @@ public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept,
|
||||
}
|
||||
int result = baseMapper.updateById(dept);
|
||||
if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors())
|
||||
&& !StringUtils.equals("0", dept.getAncestors())) {
|
||||
&& !StringUtils.equals("0", dept.getAncestors())) {
|
||||
// 如果该部门是启用状态,则启用该部门的所有上级部门
|
||||
updateParentDeptStatusNormal(dept);
|
||||
}
|
||||
@ -237,8 +237,8 @@ public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept,
|
||||
* @param dept 当前部门
|
||||
*/
|
||||
private void updateParentDeptStatusNormal(SysDept dept) {
|
||||
String ancestors = dept.getAncestors();
|
||||
Long[] deptIds = Convert.toLongArray(ancestors);
|
||||
String ancestors = dept.getAncestors();
|
||||
Long[] deptIds = Convert.toLongArray(ancestors);
|
||||
update(null, new LambdaUpdateWrapper<SysDept>()
|
||||
.set(SysDept::getStatus, "0")
|
||||
.in(SysDept::getDeptId, Arrays.asList(deptIds)));
|
||||
@ -247,13 +247,13 @@ public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept,
|
||||
/**
|
||||
* 修改子元素关系
|
||||
*
|
||||
* @param deptId 被修改的部门ID
|
||||
* @param deptId 被修改的部门ID
|
||||
* @param newAncestors 新的父ID集合
|
||||
* @param oldAncestors 旧的父ID集合
|
||||
*/
|
||||
public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) {
|
||||
List<SysDept> children = list(new LambdaQueryWrapper<SysDept>()
|
||||
.apply("find_in_set({0},ancestors)",deptId));
|
||||
.apply("find_in_set({0},ancestors)", deptId));
|
||||
for (SysDept child : children) {
|
||||
child.setAncestors(child.getAncestors().replaceFirst(oldAncestors, newAncestors));
|
||||
}
|
||||
@ -292,11 +292,11 @@ public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept,
|
||||
*/
|
||||
private List<SysDept> getChildList(List<SysDept> list, SysDept t) {
|
||||
List<SysDept> tlist = new ArrayList<SysDept>();
|
||||
for (SysDept n : list) {
|
||||
if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getDeptId().longValue()) {
|
||||
tlist.add(n);
|
||||
}
|
||||
}
|
||||
for (SysDept n : list) {
|
||||
if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getDeptId().longValue()) {
|
||||
tlist.add(n);
|
||||
}
|
||||
}
|
||||
return tlist;
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.mapper.SysDictDataMapper;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -16,108 +16,108 @@ import java.util.List;
|
||||
/**
|
||||
* 字典 业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Service
|
||||
public class SysDictDataServiceImpl extends ServicePlusImpl<SysDictDataMapper, SysDictData, SysDictData> implements ISysDictDataService {
|
||||
|
||||
@Override
|
||||
public TableDataInfo<SysDictData> selectPageDictDataList(SysDictData dictData) {
|
||||
LambdaQueryWrapper<SysDictData> lqw = new LambdaQueryWrapper<SysDictData>()
|
||||
.eq(StringUtils.isNotBlank(dictData.getDictType()), SysDictData::getDictType, dictData.getDictType())
|
||||
.like(StringUtils.isNotBlank(dictData.getDictLabel()), SysDictData::getDictLabel, dictData.getDictLabel())
|
||||
.eq(StringUtils.isNotBlank(dictData.getStatus()), SysDictData::getStatus, dictData.getStatus())
|
||||
.orderByAsc(SysDictData::getDictSort);
|
||||
return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw));
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<SysDictData> selectPageDictDataList(SysDictData dictData) {
|
||||
LambdaQueryWrapper<SysDictData> lqw = new LambdaQueryWrapper<SysDictData>()
|
||||
.eq(StringUtils.isNotBlank(dictData.getDictType()), SysDictData::getDictType, dictData.getDictType())
|
||||
.like(StringUtils.isNotBlank(dictData.getDictLabel()), SysDictData::getDictLabel, dictData.getDictLabel())
|
||||
.eq(StringUtils.isNotBlank(dictData.getStatus()), SysDictData::getStatus, dictData.getStatus())
|
||||
.orderByAsc(SysDictData::getDictSort);
|
||||
return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件分页查询字典数据
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictData> selectDictDataList(SysDictData dictData) {
|
||||
return list(new LambdaQueryWrapper<SysDictData>()
|
||||
.eq(StringUtils.isNotBlank(dictData.getDictType()), SysDictData::getDictType, dictData.getDictType())
|
||||
.like(StringUtils.isNotBlank(dictData.getDictLabel()), SysDictData::getDictLabel, dictData.getDictLabel())
|
||||
.eq(StringUtils.isNotBlank(dictData.getStatus()), SysDictData::getStatus, dictData.getStatus())
|
||||
.orderByAsc(SysDictData::getDictSort));
|
||||
}
|
||||
/**
|
||||
* 根据条件分页查询字典数据
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictData> selectDictDataList(SysDictData dictData) {
|
||||
return list(new LambdaQueryWrapper<SysDictData>()
|
||||
.eq(StringUtils.isNotBlank(dictData.getDictType()), SysDictData::getDictType, dictData.getDictType())
|
||||
.like(StringUtils.isNotBlank(dictData.getDictLabel()), SysDictData::getDictLabel, dictData.getDictLabel())
|
||||
.eq(StringUtils.isNotBlank(dictData.getStatus()), SysDictData::getStatus, dictData.getStatus())
|
||||
.orderByAsc(SysDictData::getDictSort));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典键值查询字典数据信息
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典键值
|
||||
* @return 字典标签
|
||||
*/
|
||||
@Override
|
||||
public String selectDictLabel(String dictType, String dictValue) {
|
||||
return getOne(new LambdaQueryWrapper<SysDictData>()
|
||||
.select(SysDictData::getDictLabel)
|
||||
.eq(SysDictData::getDictType, dictType)
|
||||
.eq(SysDictData::getDictValue, dictValue))
|
||||
.getDictLabel();
|
||||
}
|
||||
/**
|
||||
* 根据字典类型和字典键值查询字典数据信息
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典键值
|
||||
* @return 字典标签
|
||||
*/
|
||||
@Override
|
||||
public String selectDictLabel(String dictType, String dictValue) {
|
||||
return getOne(new LambdaQueryWrapper<SysDictData>()
|
||||
.select(SysDictData::getDictLabel)
|
||||
.eq(SysDictData::getDictType, dictType)
|
||||
.eq(SysDictData::getDictValue, dictValue))
|
||||
.getDictLabel();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典数据ID查询信息
|
||||
*
|
||||
* @param dictCode 字典数据ID
|
||||
* @return 字典数据
|
||||
*/
|
||||
@Override
|
||||
public SysDictData selectDictDataById(Long dictCode) {
|
||||
return getById(dictCode);
|
||||
}
|
||||
/**
|
||||
* 根据字典数据ID查询信息
|
||||
*
|
||||
* @param dictCode 字典数据ID
|
||||
* @return 字典数据
|
||||
*/
|
||||
@Override
|
||||
public SysDictData selectDictDataById(Long dictCode) {
|
||||
return getById(dictCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除字典数据信息
|
||||
*
|
||||
* @param dictCodes 需要删除的字典数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public void deleteDictDataByIds(Long[] dictCodes) {
|
||||
for (Long dictCode : dictCodes) {
|
||||
SysDictData data = selectDictDataById(dictCode);
|
||||
/**
|
||||
* 批量删除字典数据信息
|
||||
*
|
||||
* @param dictCodes 需要删除的字典数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public void deleteDictDataByIds(Long[] dictCodes) {
|
||||
for (Long dictCode : dictCodes) {
|
||||
SysDictData data = selectDictDataById(dictCode);
|
||||
removeById(dictCode);
|
||||
List<SysDictData> dictDatas = baseMapper.selectDictDataByType(data.getDictType());
|
||||
DictUtils.setDictCache(data.getDictType(), dictDatas);
|
||||
}
|
||||
}
|
||||
List<SysDictData> dictDatas = baseMapper.selectDictDataByType(data.getDictType());
|
||||
DictUtils.setDictCache(data.getDictType(), dictDatas);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存字典数据信息
|
||||
*
|
||||
* @param data 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDictData(SysDictData data) {
|
||||
int row = baseMapper.insert(data);
|
||||
if (row > 0) {
|
||||
List<SysDictData> dictDatas = baseMapper.selectDictDataByType(data.getDictType());
|
||||
DictUtils.setDictCache(data.getDictType(), dictDatas);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
/**
|
||||
* 新增保存字典数据信息
|
||||
*
|
||||
* @param data 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDictData(SysDictData data) {
|
||||
int row = baseMapper.insert(data);
|
||||
if (row > 0) {
|
||||
List<SysDictData> dictDatas = baseMapper.selectDictDataByType(data.getDictType());
|
||||
DictUtils.setDictCache(data.getDictType(), dictDatas);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存字典数据信息
|
||||
*
|
||||
* @param data 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDictData(SysDictData data) {
|
||||
int row = baseMapper.updateById(data);
|
||||
if (row > 0) {
|
||||
List<SysDictData> dictDatas = baseMapper.selectDictDataByType(data.getDictType());
|
||||
DictUtils.setDictCache(data.getDictType(), dictDatas);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
/**
|
||||
* 修改保存字典数据信息
|
||||
*
|
||||
* @param data 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDictData(SysDictData data) {
|
||||
int row = baseMapper.updateById(data);
|
||||
if (row > 0) {
|
||||
List<SysDictData> dictDatas = baseMapper.selectDictDataByType(data.getDictType());
|
||||
DictUtils.setDictCache(data.getDictType(), dictDatas);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
@ -12,6 +11,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.mapper.SysDictDataMapper;
|
||||
import com.ruoyi.system.mapper.SysDictTypeMapper;
|
||||
import com.ruoyi.system.service.ISysDictTypeService;
|
||||
@ -27,210 +27,210 @@ import java.util.Map;
|
||||
/**
|
||||
* 字典 业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Service
|
||||
public class SysDictTypeServiceImpl extends ServicePlusImpl<SysDictTypeMapper, SysDictType, SysDictType> implements ISysDictTypeService {
|
||||
|
||||
@Autowired
|
||||
private SysDictDataMapper dictDataMapper;
|
||||
@Autowired
|
||||
private SysDictDataMapper dictDataMapper;
|
||||
|
||||
/**
|
||||
* 项目启动时,初始化字典到缓存
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
loadingDictCache();
|
||||
}
|
||||
/**
|
||||
* 项目启动时,初始化字典到缓存
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
loadingDictCache();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<SysDictType> selectPageDictTypeList(SysDictType dictType) {
|
||||
Map<String, Object> params = dictType.getParams();
|
||||
LambdaQueryWrapper<SysDictType> lqw = new LambdaQueryWrapper<SysDictType>()
|
||||
.like(StringUtils.isNotBlank(dictType.getDictName()), SysDictType::getDictName, dictType.getDictName())
|
||||
.eq(StringUtils.isNotBlank(dictType.getStatus()), SysDictType::getStatus, dictType.getStatus())
|
||||
.like(StringUtils.isNotBlank(dictType.getDictType()), SysDictType::getDictType, dictType.getDictType())
|
||||
.apply(StringUtils.isNotEmpty(params.get("beginTime")),
|
||||
"date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
||||
params.get("beginTime"))
|
||||
.apply(StringUtils.isNotEmpty(params.get("endTime")),
|
||||
"date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
||||
params.get("endTime"));
|
||||
return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw));
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<SysDictType> selectPageDictTypeList(SysDictType dictType) {
|
||||
Map<String, Object> params = dictType.getParams();
|
||||
LambdaQueryWrapper<SysDictType> lqw = new LambdaQueryWrapper<SysDictType>()
|
||||
.like(StringUtils.isNotBlank(dictType.getDictName()), SysDictType::getDictName, dictType.getDictName())
|
||||
.eq(StringUtils.isNotBlank(dictType.getStatus()), SysDictType::getStatus, dictType.getStatus())
|
||||
.like(StringUtils.isNotBlank(dictType.getDictType()), SysDictType::getDictType, dictType.getDictType())
|
||||
.apply(StringUtils.isNotEmpty(params.get("beginTime")),
|
||||
"date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
||||
params.get("beginTime"))
|
||||
.apply(StringUtils.isNotEmpty(params.get("endTime")),
|
||||
"date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
||||
params.get("endTime"));
|
||||
return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件分页查询字典类型
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictType> selectDictTypeList(SysDictType dictType) {
|
||||
Map<String, Object> params = dictType.getParams();
|
||||
return list(new LambdaQueryWrapper<SysDictType>()
|
||||
.like(StringUtils.isNotBlank(dictType.getDictName()), SysDictType::getDictName, dictType.getDictName())
|
||||
.eq(StringUtils.isNotBlank(dictType.getStatus()), SysDictType::getStatus, dictType.getStatus())
|
||||
.like(StringUtils.isNotBlank(dictType.getDictType()), SysDictType::getDictType, dictType.getDictType())
|
||||
.apply(StringUtils.isNotEmpty(params.get("beginTime")),
|
||||
"date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
||||
params.get("beginTime"))
|
||||
.apply(StringUtils.isNotEmpty(params.get("endTime")),
|
||||
"date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
||||
params.get("endTime")));
|
||||
}
|
||||
/**
|
||||
* 根据条件分页查询字典类型
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictType> selectDictTypeList(SysDictType dictType) {
|
||||
Map<String, Object> params = dictType.getParams();
|
||||
return list(new LambdaQueryWrapper<SysDictType>()
|
||||
.like(StringUtils.isNotBlank(dictType.getDictName()), SysDictType::getDictName, dictType.getDictName())
|
||||
.eq(StringUtils.isNotBlank(dictType.getStatus()), SysDictType::getStatus, dictType.getStatus())
|
||||
.like(StringUtils.isNotBlank(dictType.getDictType()), SysDictType::getDictType, dictType.getDictType())
|
||||
.apply(StringUtils.isNotEmpty(params.get("beginTime")),
|
||||
"date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
||||
params.get("beginTime"))
|
||||
.apply(StringUtils.isNotEmpty(params.get("endTime")),
|
||||
"date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
||||
params.get("endTime")));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据所有字典类型
|
||||
*
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictType> selectDictTypeAll() {
|
||||
return list();
|
||||
}
|
||||
/**
|
||||
* 根据所有字典类型
|
||||
*
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictType> selectDictTypeAll() {
|
||||
return list();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典数据
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictData> selectDictDataByType(String dictType) {
|
||||
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
|
||||
if (CollUtil.isNotEmpty(dictDatas)) {
|
||||
return dictDatas;
|
||||
}
|
||||
dictDatas = dictDataMapper.selectDictDataByType(dictType);
|
||||
if (CollUtil.isNotEmpty(dictDatas)) {
|
||||
DictUtils.setDictCache(dictType, dictDatas);
|
||||
return dictDatas;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* 根据字典类型查询字典数据
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictData> selectDictDataByType(String dictType) {
|
||||
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
|
||||
if (CollUtil.isNotEmpty(dictDatas)) {
|
||||
return dictDatas;
|
||||
}
|
||||
dictDatas = dictDataMapper.selectDictDataByType(dictType);
|
||||
if (CollUtil.isNotEmpty(dictDatas)) {
|
||||
DictUtils.setDictCache(dictType, dictDatas);
|
||||
return dictDatas;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型ID查询信息
|
||||
*
|
||||
* @param dictId 字典类型ID
|
||||
* @return 字典类型
|
||||
*/
|
||||
@Override
|
||||
public SysDictType selectDictTypeById(Long dictId) {
|
||||
return getById(dictId);
|
||||
}
|
||||
/**
|
||||
* 根据字典类型ID查询信息
|
||||
*
|
||||
* @param dictId 字典类型ID
|
||||
* @return 字典类型
|
||||
*/
|
||||
@Override
|
||||
public SysDictType selectDictTypeById(Long dictId) {
|
||||
return getById(dictId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型查询信息
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典类型
|
||||
*/
|
||||
@Override
|
||||
public SysDictType selectDictTypeByType(String dictType) {
|
||||
return getOne(new LambdaQueryWrapper<SysDictType>().eq(SysDictType::getDictType, dictType));
|
||||
}
|
||||
/**
|
||||
* 根据字典类型查询信息
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典类型
|
||||
*/
|
||||
@Override
|
||||
public SysDictType selectDictTypeByType(String dictType) {
|
||||
return getOne(new LambdaQueryWrapper<SysDictType>().eq(SysDictType::getDictType, dictType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除字典类型信息
|
||||
*
|
||||
* @param dictIds 需要删除的字典ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public void deleteDictTypeByIds(Long[] dictIds) {
|
||||
for (Long dictId : dictIds) {
|
||||
SysDictType dictType = selectDictTypeById(dictId);
|
||||
if (dictDataMapper.selectCount(new LambdaQueryWrapper<SysDictData>()
|
||||
.eq(SysDictData::getDictType, dictType.getDictType())) > 0) {
|
||||
throw new ServiceException(String.format("%1$s已分配,不能删除", dictType.getDictName()));
|
||||
}
|
||||
DictUtils.removeDictCache(dictType.getDictType());
|
||||
}
|
||||
baseMapper.deleteBatchIds(Arrays.asList(dictIds));
|
||||
}
|
||||
/**
|
||||
* 批量删除字典类型信息
|
||||
*
|
||||
* @param dictIds 需要删除的字典ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public void deleteDictTypeByIds(Long[] dictIds) {
|
||||
for (Long dictId : dictIds) {
|
||||
SysDictType dictType = selectDictTypeById(dictId);
|
||||
if (dictDataMapper.selectCount(new LambdaQueryWrapper<SysDictData>()
|
||||
.eq(SysDictData::getDictType, dictType.getDictType())) > 0) {
|
||||
throw new ServiceException(String.format("%1$s已分配,不能删除", dictType.getDictName()));
|
||||
}
|
||||
DictUtils.removeDictCache(dictType.getDictType());
|
||||
}
|
||||
baseMapper.deleteBatchIds(Arrays.asList(dictIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载字典缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void loadingDictCache() {
|
||||
List<SysDictType> dictTypeList = list();
|
||||
for (SysDictType dictType : dictTypeList) {
|
||||
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dictType.getDictType());
|
||||
DictUtils.setDictCache(dictType.getDictType(), dictDatas);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 加载字典缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void loadingDictCache() {
|
||||
List<SysDictType> dictTypeList = list();
|
||||
for (SysDictType dictType : dictTypeList) {
|
||||
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dictType.getDictType());
|
||||
DictUtils.setDictCache(dictType.getDictType(), dictDatas);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空字典缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void clearDictCache() {
|
||||
DictUtils.clearDictCache();
|
||||
}
|
||||
/**
|
||||
* 清空字典缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void clearDictCache() {
|
||||
DictUtils.clearDictCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置字典缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void resetDictCache() {
|
||||
clearDictCache();
|
||||
loadingDictCache();
|
||||
}
|
||||
/**
|
||||
* 重置字典缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void resetDictCache() {
|
||||
clearDictCache();
|
||||
loadingDictCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存字典类型信息
|
||||
*
|
||||
* @param dict 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDictType(SysDictType dict) {
|
||||
int row = baseMapper.insert(dict);
|
||||
if (row > 0) {
|
||||
DictUtils.setDictCache(dict.getDictType(), null);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
/**
|
||||
* 新增保存字典类型信息
|
||||
*
|
||||
* @param dict 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDictType(SysDictType dict) {
|
||||
int row = baseMapper.insert(dict);
|
||||
if (row > 0) {
|
||||
DictUtils.setDictCache(dict.getDictType(), null);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存字典类型信息
|
||||
*
|
||||
* @param dict 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateDictType(SysDictType dict) {
|
||||
SysDictType oldDict = getById(dict.getDictId());
|
||||
dictDataMapper.update(null, new LambdaUpdateWrapper<SysDictData>()
|
||||
.set(SysDictData::getDictType, dict.getDictType())
|
||||
.eq(SysDictData::getDictType, oldDict.getDictType()));
|
||||
int row = baseMapper.updateById(dict);
|
||||
if (row > 0) {
|
||||
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dict.getDictType());
|
||||
DictUtils.setDictCache(dict.getDictType(), dictDatas);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
/**
|
||||
* 修改保存字典类型信息
|
||||
*
|
||||
* @param dict 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateDictType(SysDictType dict) {
|
||||
SysDictType oldDict = getById(dict.getDictId());
|
||||
dictDataMapper.update(null, new LambdaUpdateWrapper<SysDictData>()
|
||||
.set(SysDictData::getDictType, dict.getDictType())
|
||||
.eq(SysDictData::getDictType, oldDict.getDictType()));
|
||||
int row = baseMapper.updateById(dict);
|
||||
if (row > 0) {
|
||||
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dict.getDictType());
|
||||
DictUtils.setDictCache(dict.getDictType(), dictDatas);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验字典类型称是否唯一
|
||||
*
|
||||
* @param dict 字典类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public String checkDictTypeUnique(SysDictType dict) {
|
||||
Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId();
|
||||
SysDictType dictType = getOne(new LambdaQueryWrapper<SysDictType>()
|
||||
.eq(SysDictType::getDictType, dict.getDictType())
|
||||
.last("limit 1"));
|
||||
if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue()) {
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
/**
|
||||
* 校验字典类型称是否唯一
|
||||
*
|
||||
* @param dict 字典类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public String checkDictTypeUnique(SysDictType dict) {
|
||||
Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId();
|
||||
SysDictType dictType = getOne(new LambdaQueryWrapper<SysDictType>()
|
||||
.eq(SysDictType::getDictType, dict.getDictType())
|
||||
.last("limit 1"));
|
||||
if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue()) {
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 系统访问日志情况信息 服务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
|
@ -26,11 +26,10 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* 菜单 业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Service
|
||||
public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu, SysMenu> implements ISysMenuService {
|
||||
public static final String PREMISSION_STRING = "perms[\"{0}\"]";
|
||||
|
||||
@Autowired
|
||||
private SysRoleMapper roleMapper;
|
||||
@ -61,9 +60,9 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
// 管理员显示所有菜单信息
|
||||
if (SysUser.isAdmin(userId)) {
|
||||
menuList = list(new LambdaQueryWrapper<SysMenu>()
|
||||
.like(StringUtils.isNotBlank(menu.getMenuName()),SysMenu::getMenuName,menu.getMenuName())
|
||||
.eq(StringUtils.isNotBlank(menu.getVisible()),SysMenu::getVisible,menu.getVisible())
|
||||
.eq(StringUtils.isNotBlank(menu.getStatus()),SysMenu::getStatus,menu.getStatus())
|
||||
.like(StringUtils.isNotBlank(menu.getMenuName()), SysMenu::getMenuName, menu.getMenuName())
|
||||
.eq(StringUtils.isNotBlank(menu.getVisible()), SysMenu::getVisible, menu.getVisible())
|
||||
.eq(StringUtils.isNotBlank(menu.getStatus()), SysMenu::getStatus, menu.getStatus())
|
||||
.orderByAsc(SysMenu::getParentId)
|
||||
.orderByAsc(SysMenu::getOrderNum));
|
||||
} else {
|
||||
@ -137,7 +136,7 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
router.setComponent(getComponent(menu));
|
||||
router.setQuery(menu.getQuery());
|
||||
router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath()));
|
||||
List<SysMenu> cMenus = menu.getChildren();
|
||||
List<SysMenu> cMenus = (List<SysMenu>) menu.getChildren();
|
||||
if (!cMenus.isEmpty() && UserConstants.TYPE_DIR.equals(menu.getMenuType())) {
|
||||
router.setAlwaysShow(true);
|
||||
router.setRedirect("noRedirect");
|
||||
@ -151,18 +150,18 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
children.setName(StringUtils.capitalize(menu.getPath()));
|
||||
children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath()));
|
||||
children.setQuery(menu.getQuery());
|
||||
childrenList.add(children);
|
||||
router.setChildren(childrenList);
|
||||
} else if (menu.getParentId().intValue() == 0 && isInnerLink(menu)) {
|
||||
router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon()));
|
||||
router.setPath("/inner");
|
||||
List<RouterVo> childrenList = new ArrayList<RouterVo>();
|
||||
RouterVo children = new RouterVo();
|
||||
String routerPath = StringUtils.replaceEach(menu.getPath(), new String[] { Constants.HTTP, Constants.HTTPS }, new String[] { "", "" });
|
||||
children.setPath(routerPath);
|
||||
children.setComponent(UserConstants.INNER_LINK);
|
||||
children.setName(StringUtils.capitalize(routerPath));
|
||||
children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), menu.getPath()));
|
||||
childrenList.add(children);
|
||||
router.setChildren(childrenList);
|
||||
} else if (menu.getParentId().intValue() == 0 && isInnerLink(menu)) {
|
||||
router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon()));
|
||||
router.setPath("/inner");
|
||||
List<RouterVo> childrenList = new ArrayList<RouterVo>();
|
||||
RouterVo children = new RouterVo();
|
||||
String routerPath = StringUtils.replaceEach(menu.getPath(), new String[]{Constants.HTTP, Constants.HTTPS}, new String[]{"", ""});
|
||||
children.setPath(routerPath);
|
||||
children.setComponent(UserConstants.INNER_LINK);
|
||||
children.setName(StringUtils.capitalize(routerPath));
|
||||
children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), menu.getPath()));
|
||||
childrenList.add(children);
|
||||
router.setChildren(childrenList);
|
||||
}
|
||||
@ -184,13 +183,13 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
for (SysMenu dept : menus) {
|
||||
tempList.add(dept.getMenuId());
|
||||
}
|
||||
for (SysMenu menu : menus) {
|
||||
// 如果是顶级节点, 遍历该父节点的所有子节点
|
||||
if (!tempList.contains(menu.getParentId())) {
|
||||
recursionFn(menus, menu);
|
||||
returnList.add(menu);
|
||||
}
|
||||
}
|
||||
for (SysMenu menu : menus) {
|
||||
// 如果是顶级节点, 遍历该父节点的所有子节点
|
||||
if (!tempList.contains(menu.getParentId())) {
|
||||
recursionFn(menus, menu);
|
||||
returnList.add(menu);
|
||||
}
|
||||
}
|
||||
if (returnList.isEmpty()) {
|
||||
returnList = menus;
|
||||
}
|
||||
@ -228,7 +227,7 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
*/
|
||||
@Override
|
||||
public boolean hasChildByMenuId(Long menuId) {
|
||||
long result = count(new LambdaQueryWrapper<SysMenu>().eq(SysMenu::getParentId,menuId));
|
||||
long result = count(new LambdaQueryWrapper<SysMenu>().eq(SysMenu::getParentId, menuId));
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
@ -240,7 +239,7 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
*/
|
||||
@Override
|
||||
public boolean checkMenuExistRole(Long menuId) {
|
||||
long result = roleMenuMapper.selectCount(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getMenuId,menuId));
|
||||
long result = roleMenuMapper.selectCount(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getMenuId, menuId));
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
@ -287,8 +286,8 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
public String checkMenuNameUnique(SysMenu menu) {
|
||||
Long menuId = StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId();
|
||||
SysMenu info = getOne(new LambdaQueryWrapper<SysMenu>()
|
||||
.eq(SysMenu::getMenuName,menu.getMenuName())
|
||||
.eq(SysMenu::getParentId,menu.getParentId())
|
||||
.eq(SysMenu::getMenuName, menu.getMenuName())
|
||||
.eq(SysMenu::getParentId, menu.getParentId())
|
||||
.last("limit 1"));
|
||||
if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue()) {
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
@ -321,7 +320,7 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
String routerPath = menu.getPath();
|
||||
// 内链打开外网方式
|
||||
if (menu.getParentId().intValue() != 0 && isInnerLink(menu)) {
|
||||
routerPath = StringUtils.replaceEach(routerPath, new String[] { Constants.HTTP, Constants.HTTPS }, new String[] { "", "" });
|
||||
routerPath = StringUtils.replaceEach(routerPath, new String[]{Constants.HTTP, Constants.HTTPS}, new String[]{"", ""});
|
||||
}
|
||||
// 非外链并且是一级目录(类型为目录)
|
||||
if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType())
|
||||
@ -345,9 +344,9 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
String component = UserConstants.LAYOUT;
|
||||
if (StringUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu)) {
|
||||
component = menu.getComponent();
|
||||
} else if (StringUtils.isEmpty(menu.getComponent()) && menu.getParentId().intValue() != 0 && isInnerLink(menu)) {
|
||||
component = UserConstants.INNER_LINK;
|
||||
} else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu)) {
|
||||
} else if (StringUtils.isEmpty(menu.getComponent()) && menu.getParentId().intValue() != 0 && isInnerLink(menu)) {
|
||||
component = UserConstants.INNER_LINK;
|
||||
} else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu)) {
|
||||
component = UserConstants.PARENT_VIEW;
|
||||
}
|
||||
return component;
|
||||
@ -387,19 +386,19 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
/**
|
||||
* 根据父节点的ID获取所有子节点
|
||||
*
|
||||
* @param list 分类表
|
||||
* @param list 分类表
|
||||
* @param parentId 传入的父节点ID
|
||||
* @return String
|
||||
*/
|
||||
public List<SysMenu> getChildPerms(List<SysMenu> list, int parentId) {
|
||||
List<SysMenu> returnList = new ArrayList<SysMenu>();
|
||||
for (SysMenu t : list) {
|
||||
// 一、根据传入的某个父节点ID,遍历该父节点的所有子节点
|
||||
if (t.getParentId() == parentId) {
|
||||
recursionFn(list, t);
|
||||
returnList.add(t);
|
||||
}
|
||||
}
|
||||
for (SysMenu t : list) {
|
||||
// 一、根据传入的某个父节点ID,遍历该父节点的所有子节点
|
||||
if (t.getParentId() == parentId) {
|
||||
recursionFn(list, t);
|
||||
returnList.add(t);
|
||||
}
|
||||
}
|
||||
return returnList;
|
||||
}
|
||||
|
||||
@ -425,11 +424,11 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
*/
|
||||
private List<SysMenu> getChildList(List<SysMenu> list, SysMenu t) {
|
||||
List<SysMenu> tlist = new ArrayList<SysMenu>();
|
||||
for (SysMenu n : list) {
|
||||
if (n.getParentId().longValue() == t.getMenuId().longValue()) {
|
||||
tlist.add(n);
|
||||
}
|
||||
}
|
||||
for (SysMenu n : list) {
|
||||
if (n.getParentId().longValue() == t.getMenuId().longValue()) {
|
||||
tlist.add(n);
|
||||
}
|
||||
}
|
||||
return tlist;
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.SysNotice;
|
||||
import com.ruoyi.system.mapper.SysNoticeMapper;
|
||||
import com.ruoyi.system.service.ISysNoticeService;
|
||||
@ -16,7 +16,7 @@ import java.util.List;
|
||||
/**
|
||||
* 公告 服务层实现
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Service
|
||||
public class SysNoticeServiceImpl extends ServicePlusImpl<SysNoticeMapper, SysNotice, SysNotice> implements ISysNoticeService {
|
||||
@ -27,7 +27,7 @@ public class SysNoticeServiceImpl extends ServicePlusImpl<SysNoticeMapper, SysNo
|
||||
.like(StringUtils.isNotBlank(notice.getNoticeTitle()), SysNotice::getNoticeTitle, notice.getNoticeTitle())
|
||||
.eq(StringUtils.isNotBlank(notice.getNoticeType()), SysNotice::getNoticeType, notice.getNoticeType())
|
||||
.like(StringUtils.isNotBlank(notice.getCreateBy()), SysNotice::getCreateBy, notice.getCreateBy());
|
||||
return PageUtils.buildDataInfo(page(PageUtils.buildPage(),lqw));
|
||||
return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -50,9 +50,9 @@ public class SysNoticeServiceImpl extends ServicePlusImpl<SysNoticeMapper, SysNo
|
||||
@Override
|
||||
public List<SysNotice> selectNoticeList(SysNotice notice) {
|
||||
return list(new LambdaQueryWrapper<SysNotice>()
|
||||
.like(StringUtils.isNotBlank(notice.getNoticeTitle()),SysNotice::getNoticeTitle,notice.getNoticeTitle())
|
||||
.eq(StringUtils.isNotBlank(notice.getNoticeType()),SysNotice::getNoticeType,notice.getNoticeType())
|
||||
.like(StringUtils.isNotBlank(notice.getCreateBy()),SysNotice::getCreateBy,notice.getCreateBy()));
|
||||
.like(StringUtils.isNotBlank(notice.getNoticeTitle()), SysNotice::getNoticeTitle, notice.getNoticeTitle())
|
||||
.eq(StringUtils.isNotBlank(notice.getNoticeType()), SysNotice::getNoticeType, notice.getNoticeType())
|
||||
.like(StringUtils.isNotBlank(notice.getCreateBy()), SysNotice::getCreateBy, notice.getCreateBy()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,10 +3,10 @@ package com.ruoyi.system.service.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ruoyi.common.core.domain.dto.OperLogDTO;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.service.OperLogService;
|
||||
import com.ruoyi.common.core.domain.dto.OperLogDTO;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.ip.AddressUtils;
|
||||
@ -24,7 +24,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 操作日志 服务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Service
|
||||
public class SysOperLogServiceImpl extends ServicePlusImpl<SysOperLogMapper, SysOperLog, SysOperLog> implements ISysOperLogService, OperLogService {
|
||||
@ -64,7 +64,7 @@ public class SysOperLogServiceImpl extends ServicePlusImpl<SysOperLogMapper, Sys
|
||||
.apply(StringUtils.isNotEmpty(params.get("endTime")),
|
||||
"date_format(oper_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
||||
params.get("endTime"));
|
||||
return PageUtils.buildDataInfo(page(PageUtils.buildPage("oper_id","desc"), lqw));
|
||||
return PageUtils.buildDataInfo(page(PageUtils.buildPage("oper_id", "desc"), lqw));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -88,17 +88,17 @@ public class SysOperLogServiceImpl extends ServicePlusImpl<SysOperLogMapper, Sys
|
||||
public List<SysOperLog> selectOperLogList(SysOperLog operLog) {
|
||||
Map<String, Object> params = operLog.getParams();
|
||||
return list(new LambdaQueryWrapper<SysOperLog>()
|
||||
.like(StringUtils.isNotBlank(operLog.getTitle()),SysOperLog::getTitle,operLog.getTitle())
|
||||
.like(StringUtils.isNotBlank(operLog.getTitle()), SysOperLog::getTitle, operLog.getTitle())
|
||||
.eq(operLog.getBusinessType() != null && operLog.getBusinessType() > 0,
|
||||
SysOperLog::getBusinessType,operLog.getBusinessType())
|
||||
SysOperLog::getBusinessType, operLog.getBusinessType())
|
||||
.func(f -> {
|
||||
if (ArrayUtil.isNotEmpty(operLog.getBusinessTypes())){
|
||||
if (ArrayUtil.isNotEmpty(operLog.getBusinessTypes())) {
|
||||
f.in(SysOperLog::getBusinessType, Arrays.asList(operLog.getBusinessTypes()));
|
||||
}
|
||||
})
|
||||
.eq(operLog.getStatus() != null && operLog.getStatus() > 0,
|
||||
SysOperLog::getStatus,operLog.getStatus())
|
||||
.like(StringUtils.isNotBlank(operLog.getOperName()),SysOperLog::getOperName,operLog.getOperName())
|
||||
SysOperLog::getStatus, operLog.getStatus())
|
||||
.like(StringUtils.isNotBlank(operLog.getOperName()), SysOperLog::getOperName, operLog.getOperName())
|
||||
.apply(StringUtils.isNotEmpty(params.get("beginTime")),
|
||||
"date_format(oper_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
||||
params.get("beginTime"))
|
||||
|
@ -43,23 +43,23 @@ import java.util.List;
|
||||
@Service
|
||||
public class SysOssConfigServiceImpl extends ServicePlusImpl<SysOssConfigMapper, SysOssConfig, SysOssConfigVo> implements ISysOssConfigService {
|
||||
|
||||
/**
|
||||
* 项目启动时,初始化参数到缓存,加载配置类
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
List<SysOssConfig> list = list();
|
||||
for (SysOssConfig config : list) {
|
||||
String configKey = config.getConfigKey();
|
||||
if ("0".equals(config.getStatus())) {
|
||||
RedisUtils.setCacheObject(CloudConstant.CACHE_CONFIG_KEY, configKey);
|
||||
}
|
||||
setConfigCache(true, config);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 项目启动时,初始化参数到缓存,加载配置类
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
List<SysOssConfig> list = list();
|
||||
for (SysOssConfig config : list) {
|
||||
String configKey = config.getConfigKey();
|
||||
if ("0".equals(config.getStatus())) {
|
||||
RedisUtils.setCacheObject(CloudConstant.CACHE_CONFIG_KEY, configKey);
|
||||
}
|
||||
setConfigCache(true, config);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysOssConfigVo queryById(Integer ossConfigId){
|
||||
public SysOssConfigVo queryById(Integer ossConfigId) {
|
||||
return getVoById(ossConfigId);
|
||||
}
|
||||
|
||||
@ -74,46 +74,46 @@ public class SysOssConfigServiceImpl extends ServicePlusImpl<SysOssConfigMapper,
|
||||
LambdaQueryWrapper<SysOssConfig> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getConfigKey()), SysOssConfig::getConfigKey, bo.getConfigKey());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getBucketName()), SysOssConfig::getBucketName, bo.getBucketName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysOssConfig::getStatus, bo.getStatus());
|
||||
return lqw;
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysOssConfig::getStatus, bo.getStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertByBo(SysOssConfigBo bo) {
|
||||
SysOssConfig config = BeanUtil.toBean(bo, SysOssConfig.class);
|
||||
validEntityBeforeSave(config);
|
||||
return setConfigCache(save(config), config);
|
||||
return setConfigCache(save(config), config);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateByBo(SysOssConfigBo bo) {
|
||||
SysOssConfig config = BeanUtil.toBean(bo, SysOssConfig.class);
|
||||
validEntityBeforeSave(config);
|
||||
LambdaUpdateWrapper<SysOssConfig> luw = new LambdaUpdateWrapper<>();
|
||||
luw.set(StringUtils.isBlank(config.getPrefix()), SysOssConfig::getPrefix, "");
|
||||
luw.set(StringUtils.isBlank(config.getRegion()), SysOssConfig::getRegion, "");
|
||||
luw.set(StringUtils.isBlank(config.getExt1()), SysOssConfig::getExt1, "");
|
||||
luw.eq(SysOssConfig::getOssConfigId, config.getOssConfigId());
|
||||
return setConfigCache(update(config, luw), config);
|
||||
LambdaUpdateWrapper<SysOssConfig> luw = new LambdaUpdateWrapper<>();
|
||||
luw.set(StringUtils.isBlank(config.getPrefix()), SysOssConfig::getPrefix, "");
|
||||
luw.set(StringUtils.isBlank(config.getRegion()), SysOssConfig::getRegion, "");
|
||||
luw.set(StringUtils.isBlank(config.getExt1()), SysOssConfig::getExt1, "");
|
||||
luw.eq(SysOssConfig::getOssConfigId, config.getOssConfigId());
|
||||
return setConfigCache(update(config, luw), config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(SysOssConfig entity){
|
||||
if (StringUtils.isNotEmpty(entity.getConfigKey())
|
||||
&& UserConstants.NOT_UNIQUE.equals(checkConfigKeyUnique(entity))) {
|
||||
throw new ServiceException("操作配置'" + entity.getConfigKey() + "'失败, 配置key已存在!");
|
||||
}
|
||||
private void validEntityBeforeSave(SysOssConfig entity) {
|
||||
if (StringUtils.isNotEmpty(entity.getConfigKey())
|
||||
&& UserConstants.NOT_UNIQUE.equals(checkConfigKeyUnique(entity))) {
|
||||
throw new ServiceException("操作配置'" + entity.getConfigKey() + "'失败, 配置key已存在!");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid) {
|
||||
if (CollUtil.containsAny(ids, CloudConstant.SYSTEM_DATA_IDS)) {
|
||||
throw new ServiceException("系统内置, 不可删除!");
|
||||
}
|
||||
}
|
||||
if (isValid) {
|
||||
if (CollUtil.containsAny(ids, CloudConstant.SYSTEM_DATA_IDS)) {
|
||||
throw new ServiceException("系统内置, 不可删除!");
|
||||
}
|
||||
}
|
||||
List<SysOssConfig> list = Lists.newArrayList();
|
||||
for (Long configId : ids) {
|
||||
SysOssConfig config = getById(configId);
|
||||
@ -128,61 +128,62 @@ public class SysOssConfigServiceImpl extends ServicePlusImpl<SysOssConfigMapper,
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断configKey是否唯一
|
||||
*/
|
||||
private String checkConfigKeyUnique(SysOssConfig sysOssConfig) {
|
||||
long ossConfigId = StringUtils.isNull(sysOssConfig.getOssConfigId()) ? -1L : sysOssConfig.getOssConfigId();
|
||||
SysOssConfig info = getOne(new LambdaQueryWrapper<SysOssConfig>()
|
||||
.select(SysOssConfig::getOssConfigId, SysOssConfig::getConfigKey)
|
||||
.eq(SysOssConfig::getConfigKey, sysOssConfig.getConfigKey()));
|
||||
if (StringUtils.isNotNull(info) && info.getOssConfigId() != ossConfigId) {
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
/**
|
||||
* 判断configKey是否唯一
|
||||
*/
|
||||
private String checkConfigKeyUnique(SysOssConfig sysOssConfig) {
|
||||
long ossConfigId = StringUtils.isNull(sysOssConfig.getOssConfigId()) ? -1L : sysOssConfig.getOssConfigId();
|
||||
SysOssConfig info = getOne(new LambdaQueryWrapper<SysOssConfig>()
|
||||
.select(SysOssConfig::getOssConfigId, SysOssConfig::getConfigKey)
|
||||
.eq(SysOssConfig::getConfigKey, sysOssConfig.getConfigKey()));
|
||||
if (StringUtils.isNotNull(info) && info.getOssConfigId() != ossConfigId) {
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用禁用状态
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateOssConfigStatus(SysOssConfigBo bo) {
|
||||
SysOssConfig sysOssConfig = BeanUtil.toBean(bo, SysOssConfig.class);
|
||||
int row = baseMapper.update(null, new LambdaUpdateWrapper<SysOssConfig>()
|
||||
.set(SysOssConfig::getStatus, "1"));
|
||||
row += baseMapper.updateById(sysOssConfig);
|
||||
if (row > 0) {
|
||||
RedisUtils.setCacheObject(CloudConstant.CACHE_CONFIG_KEY, sysOssConfig.getConfigKey());
|
||||
}
|
||||
return row;
|
||||
}
|
||||
/**
|
||||
* 启用禁用状态
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateOssConfigStatus(SysOssConfigBo bo) {
|
||||
SysOssConfig sysOssConfig = BeanUtil.toBean(bo, SysOssConfig.class);
|
||||
int row = baseMapper.update(null, new LambdaUpdateWrapper<SysOssConfig>()
|
||||
.set(SysOssConfig::getStatus, "1"));
|
||||
row += baseMapper.updateById(sysOssConfig);
|
||||
if (row > 0) {
|
||||
RedisUtils.setCacheObject(CloudConstant.CACHE_CONFIG_KEY, sysOssConfig.getConfigKey());
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置cache key
|
||||
*
|
||||
* @param configKey 参数键
|
||||
* @return 缓存键key
|
||||
*/
|
||||
private String getCacheKey(String configKey) {
|
||||
return CloudConstant.SYS_OSS_KEY + configKey;
|
||||
}
|
||||
/**
|
||||
* 设置cache key
|
||||
*
|
||||
* @param configKey 参数键
|
||||
* @return 缓存键key
|
||||
*/
|
||||
private String getCacheKey(String configKey) {
|
||||
return CloudConstant.SYS_OSS_KEY + configKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果操作成功 则更新缓存
|
||||
* @param flag 操作状态
|
||||
* @param config 配置
|
||||
* @return 返回操作状态
|
||||
*/
|
||||
private boolean setConfigCache(boolean flag, SysOssConfig config) {
|
||||
if (flag) {
|
||||
RedisUtils.setCacheObject(
|
||||
getCacheKey(config.getConfigKey()),
|
||||
JsonUtils.toJsonString(config));
|
||||
RedisUtils.publish(CloudConstant.CACHE_CONFIG_KEY, config.getConfigKey(), msg -> {
|
||||
log.info("发布刷新OSS配置 => " + msg);
|
||||
});
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
/**
|
||||
* 如果操作成功 则更新缓存
|
||||
*
|
||||
* @param flag 操作状态
|
||||
* @param config 配置
|
||||
* @return 返回操作状态
|
||||
*/
|
||||
private boolean setConfigCache(boolean flag, SysOssConfig config) {
|
||||
if (flag) {
|
||||
RedisUtils.setCacheObject(
|
||||
getCacheKey(config.getConfigKey()),
|
||||
JsonUtils.toJsonString(config));
|
||||
RedisUtils.publish(CloudConstant.CACHE_CONFIG_KEY, config.getConfigKey(), msg -> {
|
||||
log.info("发布刷新OSS配置 => " + msg);
|
||||
});
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
|
@ -32,59 +32,59 @@ import java.util.Map;
|
||||
@Service
|
||||
public class SysOssServiceImpl extends ServicePlusImpl<SysOssMapper, SysOss, SysOssVo> implements ISysOssService {
|
||||
|
||||
@Override
|
||||
public TableDataInfo<SysOssVo> queryPageList(SysOssBo bo) {
|
||||
PagePlus<SysOss, SysOssVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo));
|
||||
return PageUtils.buildDataInfo(result);
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<SysOssVo> queryPageList(SysOssBo bo) {
|
||||
PagePlus<SysOss, SysOssVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo));
|
||||
return PageUtils.buildDataInfo(result);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<SysOss> buildQueryWrapper(SysOssBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<SysOss> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getFileName()), SysOss::getFileName, bo.getFileName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getOriginalName()), SysOss::getOriginalName, bo.getOriginalName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileSuffix()), SysOss::getFileSuffix, bo.getFileSuffix());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUrl()), SysOss::getUrl, bo.getUrl());
|
||||
lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
|
||||
SysOss::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"));
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCreateBy()), SysOss::getCreateBy, bo.getCreateBy());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getService()), SysOss::getService, bo.getService());
|
||||
return lqw;
|
||||
}
|
||||
private LambdaQueryWrapper<SysOss> buildQueryWrapper(SysOssBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<SysOss> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getFileName()), SysOss::getFileName, bo.getFileName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getOriginalName()), SysOss::getOriginalName, bo.getOriginalName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileSuffix()), SysOss::getFileSuffix, bo.getFileSuffix());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUrl()), SysOss::getUrl, bo.getUrl());
|
||||
lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
|
||||
SysOss::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"));
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCreateBy()), SysOss::getCreateBy, bo.getCreateBy());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getService()), SysOss::getService, bo.getService());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysOss upload(MultipartFile file) {
|
||||
String originalfileName = file.getOriginalFilename();
|
||||
String suffix = StringUtils.substring(originalfileName, originalfileName.lastIndexOf("."), originalfileName.length());
|
||||
ICloudStorageStrategy storage = OssFactory.instance();
|
||||
UploadResult uploadResult;
|
||||
try {
|
||||
uploadResult = storage.uploadSuffix(file.getBytes(), suffix, file.getContentType());
|
||||
} catch (IOException e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
// 保存文件信息
|
||||
SysOss oss = new SysOss()
|
||||
.setUrl(uploadResult.getUrl())
|
||||
.setFileSuffix(suffix)
|
||||
.setFileName(uploadResult.getFilename())
|
||||
.setOriginalName(originalfileName)
|
||||
.setService(storage.getServiceType());
|
||||
save(oss);
|
||||
return oss;
|
||||
}
|
||||
@Override
|
||||
public SysOss upload(MultipartFile file) {
|
||||
String originalfileName = file.getOriginalFilename();
|
||||
String suffix = StringUtils.substring(originalfileName, originalfileName.lastIndexOf("."), originalfileName.length());
|
||||
ICloudStorageStrategy storage = OssFactory.instance();
|
||||
UploadResult uploadResult;
|
||||
try {
|
||||
uploadResult = storage.uploadSuffix(file.getBytes(), suffix, file.getContentType());
|
||||
} catch (IOException e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
// 保存文件信息
|
||||
SysOss oss = new SysOss()
|
||||
.setUrl(uploadResult.getUrl())
|
||||
.setFileSuffix(suffix)
|
||||
.setFileName(uploadResult.getFilename())
|
||||
.setOriginalName(originalfileName)
|
||||
.setService(storage.getServiceType());
|
||||
save(oss);
|
||||
return oss;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
// 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
List<SysOss> list = listByIds(ids);
|
||||
for (SysOss sysOss : list) {
|
||||
ICloudStorageStrategy storage = OssFactory.instance(sysOss.getService());
|
||||
storage.delete(sysOss.getUrl());
|
||||
}
|
||||
return removeByIds(ids);
|
||||
}
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
// 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
List<SysOss> list = listByIds(ids);
|
||||
for (SysOss sysOss : list) {
|
||||
ICloudStorageStrategy storage = OssFactory.instance(sysOss.getService());
|
||||
storage.delete(sysOss.getUrl());
|
||||
}
|
||||
return removeByIds(ids);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ import java.util.List;
|
||||
/**
|
||||
* 岗位信息 服务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Service
|
||||
public class SysPostServiceImpl extends ServicePlusImpl<SysPostMapper, SysPost, SysPost> implements ISysPostService {
|
||||
@ -35,7 +35,7 @@ public class SysPostServiceImpl extends ServicePlusImpl<SysPostMapper, SysPost,
|
||||
.like(StringUtils.isNotBlank(post.getPostCode()), SysPost::getPostCode, post.getPostCode())
|
||||
.eq(StringUtils.isNotBlank(post.getStatus()), SysPost::getStatus, post.getStatus())
|
||||
.like(StringUtils.isNotBlank(post.getPostName()), SysPost::getPostName, post.getPostName());
|
||||
return PageUtils.buildDataInfo(page(PageUtils.buildPage(),lqw));
|
||||
return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -126,7 +126,7 @@ public class SysPostServiceImpl extends ServicePlusImpl<SysPostMapper, SysPost,
|
||||
*/
|
||||
@Override
|
||||
public long countUserPostById(Long postId) {
|
||||
return userPostMapper.selectCount(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getPostId,postId));
|
||||
return userPostMapper.selectCount(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getPostId, postId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,9 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
@ -29,7 +29,7 @@ import java.util.*;
|
||||
/**
|
||||
* 角色 业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Service
|
||||
public class SysRoleServiceImpl extends ServicePlusImpl<SysRoleMapper, SysRole, SysRole> implements ISysRoleService {
|
||||
@ -280,7 +280,7 @@ public class SysRoleServiceImpl extends ServicePlusImpl<SysRoleMapper, SysRole,
|
||||
list.add(rm);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
rows = roleMenuMapper.insertAll(list);
|
||||
rows = roleMenuMapper.insertAll(list);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
@ -301,7 +301,7 @@ public class SysRoleServiceImpl extends ServicePlusImpl<SysRoleMapper, SysRole,
|
||||
list.add(rd);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
rows = roleDeptMapper.insertAll(list);
|
||||
rows = roleDeptMapper.insertAll(list);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
@ -355,45 +355,45 @@ public class SysRoleServiceImpl extends ServicePlusImpl<SysRoleMapper, SysRole,
|
||||
@Override
|
||||
public int deleteAuthUser(SysUserRole userRole) {
|
||||
return userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>()
|
||||
.eq(SysUserRole::getRoleId, userRole.getRoleId())
|
||||
.eq(SysUserRole::getUserId, userRole.getUserId()));
|
||||
.eq(SysUserRole::getRoleId, userRole.getRoleId())
|
||||
.eq(SysUserRole::getUserId, userRole.getUserId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量取消授权用户角色
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @param roleId 角色ID
|
||||
* @param userIds 需要取消授权的用户数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAuthUsers(Long roleId, Long[] userIds) {
|
||||
return userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>()
|
||||
.eq(SysUserRole::getRoleId, roleId)
|
||||
.in(SysUserRole::getUserId, Arrays.asList(userIds)));
|
||||
return userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>()
|
||||
.eq(SysUserRole::getRoleId, roleId)
|
||||
.in(SysUserRole::getUserId, Arrays.asList(userIds)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量选择授权用户角色
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @param roleId 角色ID
|
||||
* @param userIds 需要删除的用户数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAuthUsers(Long roleId, Long[] userIds) {
|
||||
// 新增用户与角色管理
|
||||
int rows = 1;
|
||||
List<SysUserRole> list = new ArrayList<SysUserRole>();
|
||||
int rows = 1;
|
||||
List<SysUserRole> list = new ArrayList<SysUserRole>();
|
||||
for (Long userId : userIds) {
|
||||
SysUserRole ur = new SysUserRole();
|
||||
ur.setUserId(userId);
|
||||
ur.setRoleId(roleId);
|
||||
list.add(ur);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
rows = userRoleMapper.insertAll(list);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
rows = userRoleMapper.insertAll(list);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
}
|
||||
|
@ -9,10 +9,11 @@ import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 在线用户 服务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Service
|
||||
public class SysUserOnlineServiceImpl implements ISysUserOnlineService {
|
||||
|
||||
/**
|
||||
* 通过登录地址查询信息
|
||||
*
|
||||
|
@ -31,7 +31,7 @@ import java.util.List;
|
||||
/**
|
||||
* 用户 业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@ -79,7 +79,7 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
@Override
|
||||
@DataScope(deptAlias = "d", userAlias = "u", isUser = true)
|
||||
public TableDataInfo<SysUser> selectAllocatedList(SysUser user) {
|
||||
return PageUtils.buildDataInfo(baseMapper.selectAllocatedList(PageUtils.buildPage(), user));
|
||||
return PageUtils.buildDataInfo(baseMapper.selectAllocatedList(PageUtils.buildPage(), user));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -91,7 +91,7 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
@Override
|
||||
@DataScope(deptAlias = "d", userAlias = "u", isUser = true)
|
||||
public TableDataInfo<SysUser> selectUnallocatedList(SysUser user) {
|
||||
return PageUtils.buildDataInfo(baseMapper.selectUnallocatedList(PageUtils.buildPage(), user));
|
||||
return PageUtils.buildDataInfo(baseMapper.selectUnallocatedList(PageUtils.buildPage(), user));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -258,7 +258,7 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Override
|
||||
public boolean registerUser(SysUser user) {
|
||||
return baseMapper.insert(user) > 0;
|
||||
}
|
||||
@ -274,11 +274,11 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
public int updateUser(SysUser user) {
|
||||
Long userId = user.getUserId();
|
||||
// 删除用户与角色关联
|
||||
userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId,userId));
|
||||
userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, userId));
|
||||
// 新增用户与角色管理
|
||||
insertUserRole(user);
|
||||
// 删除用户与岗位关联
|
||||
userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getUserId,userId));
|
||||
userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getUserId, userId));
|
||||
// 新增用户与岗位管理
|
||||
insertUserPost(user);
|
||||
return baseMapper.updateById(user);
|
||||
@ -287,15 +287,14 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
/**
|
||||
* 用户授权角色
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param userId 用户ID
|
||||
* @param roleIds 角色组
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void insertUserAuth(Long userId, Long[] roleIds)
|
||||
{
|
||||
public void insertUserAuth(Long userId, Long[] roleIds) {
|
||||
userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>()
|
||||
.eq(SysUserRole::getUserId, userId));
|
||||
.eq(SysUserRole::getUserId, userId));
|
||||
insertUserRole(userId, roleIds);
|
||||
}
|
||||
|
||||
@ -325,15 +324,15 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
* 修改用户头像
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @param avatar 头像地址
|
||||
* @param avatar 头像地址
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean updateUserAvatar(String userName, String avatar) {
|
||||
return baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SysUser>()
|
||||
.set(SysUser::getAvatar,avatar)
|
||||
.eq(SysUser::getUserName,userName)) > 0;
|
||||
.set(SysUser::getAvatar, avatar)
|
||||
.eq(SysUser::getUserName, userName)) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -358,8 +357,8 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
public int resetUserPwd(String userName, String password) {
|
||||
return baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SysUser>()
|
||||
.set(SysUser::getPassword,password)
|
||||
.eq(SysUser::getUserName,userName));
|
||||
.set(SysUser::getPassword, password)
|
||||
.eq(SysUser::getUserName, userName));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -379,7 +378,7 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
list.add(ur);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
userRoleMapper.insertAll(list);
|
||||
userRoleMapper.insertAll(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -401,7 +400,7 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
list.add(up);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
userPostMapper.insertAll(list);
|
||||
userPostMapper.insertAll(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -409,7 +408,7 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
/**
|
||||
* 新增用户角色信息
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param userId 用户ID
|
||||
* @param roleIds 角色组
|
||||
*/
|
||||
public void insertUserRole(Long userId, Long[] roleIds) {
|
||||
@ -438,9 +437,9 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
@Transactional
|
||||
public int deleteUserById(Long userId) {
|
||||
// 删除用户与角色关联
|
||||
userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId,userId));
|
||||
userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, userId));
|
||||
// 删除用户与岗位表
|
||||
userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getUserId,userId));
|
||||
userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getUserId, userId));
|
||||
return baseMapper.deleteById(userId);
|
||||
}
|
||||
|
||||
@ -458,18 +457,18 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
}
|
||||
List<Long> ids = Arrays.asList(userIds);
|
||||
// 删除用户与角色关联
|
||||
userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().in(SysUserRole::getUserId,ids));
|
||||
userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().in(SysUserRole::getUserId, ids));
|
||||
// 删除用户与岗位表
|
||||
userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().in(SysUserPost::getUserId,ids));
|
||||
userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().in(SysUserPost::getUserId, ids));
|
||||
return baseMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入用户数据
|
||||
*
|
||||
* @param userList 用户数据列表
|
||||
* @param userList 用户数据列表
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
* @param operName 操作用户
|
||||
* @param operName 操作用户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
@ -49,16 +49,16 @@ public class TokenServiceImpl implements TokenService {
|
||||
// 获取请求携带的令牌
|
||||
String token = getToken(request);
|
||||
if (StringUtils.isNotEmpty(token)) {
|
||||
try {
|
||||
Claims claims = parseToken(token);
|
||||
// 解析对应的权限以及用户信息
|
||||
String uuid = (String) claims.get(Constants.LOGIN_USER_KEY);
|
||||
String userKey = getTokenKey(uuid);
|
||||
LoginUser user = RedisUtils.getCacheObject(userKey);
|
||||
return user;
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
Claims claims = parseToken(token);
|
||||
// 解析对应的权限以及用户信息
|
||||
String uuid = (String) claims.get(Constants.LOGIN_USER_KEY);
|
||||
String userKey = getTokenKey(uuid);
|
||||
LoginUser user = RedisUtils.getCacheObject(userKey);
|
||||
return user;
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user