update 格式化代码结构 统一编码格式
This commit is contained in:
parent
3fef2b68dc
commit
868942e202
@ -7,8 +7,8 @@ import cn.hutool.core.util.IdUtil;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.CaptchaType;
|
||||
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import com.ruoyi.common.utils.reflect.ReflectUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.framework.config.properties.CaptchaProperties;
|
||||
@ -16,7 +16,6 @@ import com.ruoyi.system.service.ISysConfigService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@ -30,7 +29,7 @@ import java.util.concurrent.TimeUnit;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Api(value = "验证码操作处理", tags = {"验证码管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
public class CaptchaController {
|
||||
|
||||
|
@ -6,7 +6,6 @@ import com.ruoyi.common.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.connection.RedisServerCommands;
|
||||
import org.springframework.data.redis.core.RedisCallback;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
@ -22,7 +21,7 @@ import java.util.*;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Api(value = "缓存监控", tags = {"缓存监控管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/monitor/cache")
|
||||
public class CacheController {
|
||||
|
@ -13,7 +13,6 @@ import com.ruoyi.system.service.ISysLogininforService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -27,7 +26,7 @@ import java.util.List;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "系统访问记录", tags = {"系统访问记录管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/monitor/logininfor")
|
||||
public class SysLogininforController extends BaseController {
|
||||
|
@ -13,7 +13,6 @@ import com.ruoyi.system.service.ISysOperLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -27,7 +26,7 @@ import java.util.List;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "操作日志记录", tags = {"操作日志记录管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/monitor/operlog")
|
||||
public class SysOperlogController extends BaseController {
|
||||
|
@ -2,7 +2,6 @@ package com.ruoyi.web.controller.monitor;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.exception.NotLoginException;
|
||||
import cn.dev33.satoken.stp.StpLogic;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
@ -12,13 +11,12 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.dto.UserOnlineDTO;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import com.ruoyi.system.domain.SysUserOnline;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -32,7 +30,7 @@ import java.util.stream.Collectors;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Api(value = "在线用户监控", tags = {"在线用户监控管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/monitor/online")
|
||||
public class SysUserOnlineController extends BaseController {
|
||||
|
@ -15,7 +15,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -29,7 +28,7 @@ import java.util.List;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "参数配置控制器", tags = {"参数配置管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/config")
|
||||
public class SysConfigController extends BaseController {
|
||||
|
@ -15,7 +15,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -30,7 +29,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "部门控制器", tags = {"部门管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/dept")
|
||||
public class SysDeptController extends BaseController {
|
||||
|
@ -16,7 +16,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -31,7 +30,7 @@ import java.util.List;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "数据字典信息控制器", tags = {"数据字典信息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/dict/data")
|
||||
public class SysDictDataController extends BaseController {
|
||||
|
@ -15,7 +15,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -29,7 +28,7 @@ import java.util.List;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "数据字典信息控制器", tags = {"数据字典信息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/dict/type")
|
||||
public class SysDictTypeController extends BaseController {
|
||||
|
@ -5,7 +5,6 @@ import com.ruoyi.common.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@ -15,7 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Api(value = "首页控制器", tags = {"首页管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
public class SysIndexController {
|
||||
|
||||
|
@ -17,7 +17,6 @@ import com.ruoyi.system.service.SysPermissionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -36,7 +35,7 @@ import java.util.Set;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "登录验证控制器", tags = {"登录验证管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
public class SysLoginController {
|
||||
|
||||
|
@ -14,7 +14,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -29,7 +28,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "菜单信息控制器", tags = {"菜单信息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/menu")
|
||||
public class SysMenuController extends BaseController {
|
||||
|
@ -9,13 +9,12 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.SysNotice;
|
||||
import com.ruoyi.system.service.ISysNoticeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 公告 信息操作处理
|
||||
@ -24,7 +23,7 @@ import lombok.RequiredArgsConstructor;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "公告信息控制器", tags = {"公告信息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/notice")
|
||||
public class SysNoticeController extends BaseController {
|
||||
|
@ -18,7 +18,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -35,7 +34,7 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "对象存储配置控制器", tags = {"对象存储配置管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/oss/config")
|
||||
public class SysOssConfigController extends BaseController {
|
||||
|
@ -26,7 +26,6 @@ import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.system.service.ISysOssService;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -47,7 +46,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "OSS对象存储控制器", tags = {"OSS对象存储管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/oss")
|
||||
public class SysOssController extends BaseController {
|
||||
|
@ -15,7 +15,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -29,7 +28,7 @@ import java.util.List;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "岗位信息控制器", tags = {"岗位信息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/post")
|
||||
public class SysPostController extends BaseController {
|
||||
|
@ -19,7 +19,6 @@ import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@ -35,7 +34,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "个人信息控制器", tags = {"个人信息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/user/profile")
|
||||
public class SysProfileController extends BaseController {
|
||||
|
@ -9,7 +9,6 @@ import com.ruoyi.system.service.SysRegisterService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@ -22,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "注册验证控制器", tags = {"注册验证管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
public class SysRegisterController extends BaseController {
|
||||
|
||||
|
@ -20,7 +20,6 @@ import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.system.service.SysPermissionService;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -34,7 +33,7 @@ import java.util.List;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "角色信息控制器", tags = {"角色信息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/role")
|
||||
public class SysRoleController extends BaseController {
|
||||
|
@ -26,7 +26,6 @@ import com.ruoyi.system.service.ISysRoleService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@ -45,7 +44,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "用户信息控制器", tags = {"用户信息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/user")
|
||||
public class SysUserController extends BaseController {
|
||||
|
@ -12,6 +12,7 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 数据脱敏注解
|
||||
*
|
||||
* @author zhujie
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
@ -15,7 +15,7 @@ public class UnsignedMathGenerator implements CodeGenerator {
|
||||
|
||||
private static final long serialVersionUID = -5514819971774091076L;
|
||||
|
||||
private static final String operators = "+-*";
|
||||
private static final String OPERATORS = "+-*";
|
||||
|
||||
/**
|
||||
* 参与计算数字最大长度
|
||||
@ -48,7 +48,7 @@ public class UnsignedMathGenerator implements CodeGenerator {
|
||||
number1 = StringUtils.rightPad(number1, this.numberLength, CharUtil.SPACE);
|
||||
number2 = StringUtils.rightPad(number2, this.numberLength, CharUtil.SPACE);
|
||||
|
||||
return number1 + RandomUtil.randomChar(operators) + number2 + '=';
|
||||
return number1 + RandomUtil.randomChar(OPERATORS) + number2 + '=';
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,9 +6,9 @@ import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 数据权限类型
|
||||
*
|
||||
* <p>
|
||||
* 语法支持 spel 模板表达式
|
||||
*
|
||||
* <p>
|
||||
* 内置数据 user 当前用户 内容参考 SysUser
|
||||
* 如需扩展数据 可使用 {@link com.ruoyi.common.helper.DataPermissionHelper} 操作
|
||||
* 内置服务 sdss 系统数据权限服务 内容参考 SysDataScopeService
|
||||
|
@ -2,7 +2,9 @@ package com.ruoyi.common.exception.base;
|
||||
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import lombok.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 基础异常
|
||||
|
@ -24,7 +24,6 @@ public class DataPermissionHelper {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void setVariable(String key, Object value) {
|
||||
Map<String, Object> context = getContext();
|
||||
context.put(key, value);
|
||||
|
@ -16,6 +16,7 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 数据脱敏json序列化工具
|
||||
*
|
||||
* @author Yjoioooo
|
||||
*/
|
||||
public class SensitiveJsonSerializer extends JsonSerializer<String> implements ContextualSerializer {
|
||||
|
@ -6,6 +6,8 @@ import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.enums.DeviceType;
|
||||
import com.ruoyi.common.enums.UserType;
|
||||
import com.ruoyi.common.exception.UtilException;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 登录鉴权工具
|
||||
@ -13,13 +15,15 @@ import com.ruoyi.common.exception.UtilException;
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class LoginUtils {
|
||||
|
||||
private final static String LOGIN_USER_KEY = "loginUser";
|
||||
private static final String LOGIN_USER_KEY = "loginUser";
|
||||
|
||||
/**
|
||||
* 登录系统
|
||||
* 针对两套用户体系
|
||||
*
|
||||
* @param loginUser 登录用户信息
|
||||
*/
|
||||
public static void login(LoginUser loginUser, UserType userType) {
|
||||
@ -30,6 +34,7 @@ public class LoginUtils {
|
||||
/**
|
||||
* 登录系统 基于 设备类型
|
||||
* 针对一套用户体系
|
||||
*
|
||||
* @param loginUser 登录用户信息
|
||||
*/
|
||||
public static void loginByDevice(LoginUser loginUser, UserType userType, DeviceType deviceType) {
|
||||
|
@ -130,7 +130,7 @@ public class RedisUtils {
|
||||
|
||||
/**
|
||||
* 注册对象监听器
|
||||
*
|
||||
* <p>
|
||||
* key 监听器需开启 `notify-keyspace-events` 等 redis 相关配置
|
||||
*
|
||||
* @param key 缓存的键值
|
||||
@ -223,7 +223,7 @@ public class RedisUtils {
|
||||
|
||||
/**
|
||||
* 注册List监听器
|
||||
*
|
||||
* <p>
|
||||
* key 监听器需开启 `notify-keyspace-events` 等 redis 相关配置
|
||||
*
|
||||
* @param key 缓存的键值
|
||||
@ -259,7 +259,7 @@ public class RedisUtils {
|
||||
|
||||
/**
|
||||
* 注册Set监听器
|
||||
*
|
||||
* <p>
|
||||
* key 监听器需开启 `notify-keyspace-events` 等 redis 相关配置
|
||||
*
|
||||
* @param key 缓存的键值
|
||||
@ -296,7 +296,7 @@ public class RedisUtils {
|
||||
|
||||
/**
|
||||
* 注册Map监听器
|
||||
*
|
||||
* <p>
|
||||
* key 监听器需开启 `notify-keyspace-events` 等 redis 相关配置
|
||||
*
|
||||
* @param key 缓存的键值
|
||||
|
@ -16,7 +16,7 @@ public class SqlUtil {
|
||||
/**
|
||||
* 定义常用的 sql关键字
|
||||
*/
|
||||
public static String SQL_REGEX = "select |insert |delete |update |drop |count |exec |chr |mid |master |truncate |char |and |declare ";
|
||||
public static final String SQL_REGEX = "select |insert |delete |update |drop |count |exec |chr |mid |master |truncate |char |and |declare ";
|
||||
|
||||
/**
|
||||
* 仅支持字母、数字、下划线、空格、逗号、小数点(支持多个字段排序)
|
||||
|
@ -5,7 +5,6 @@ import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.CachePut;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
@ -23,7 +22,7 @@ import java.util.concurrent.TimeUnit;
|
||||
// 类级别 缓存统一配置
|
||||
//@CacheConfig(cacheNames = "redissonCacheMap")
|
||||
@Api(value = "spring-cache 演示案例", tags = {"spring-cache 演示案例"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/demo/cache")
|
||||
public class RedisCacheController {
|
||||
|
@ -6,7 +6,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -17,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Api(value = "Redis发布订阅 演示案例", tags = {"Redis发布订阅"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/demo/redis/pubsub")
|
||||
public class RedisPubSubController {
|
||||
|
@ -8,7 +8,6 @@ import com.ruoyi.demo.mapper.TestDemoMapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@ -24,7 +23,7 @@ import java.util.List;
|
||||
* @date 2021-05-30
|
||||
*/
|
||||
@Api(value = "测试批量方法", tags = {"测试批量方法"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/demo/batch")
|
||||
public class TestBatchController extends BaseController {
|
||||
@ -36,7 +35,7 @@ public class TestBatchController extends BaseController {
|
||||
|
||||
/**
|
||||
* 新增批量方法 可完美替代 saveBatch 秒级插入上万数据 (对mysql负荷较大)
|
||||
*
|
||||
* <p>
|
||||
* 3.5.0 版本 增加 rewriteBatchedStatements=true 批处理参数 使 MP 原生批处理可以达到同样的速度
|
||||
*/
|
||||
@ApiOperation(value = "新增批量方法")
|
||||
@ -52,7 +51,7 @@ public class TestBatchController extends BaseController {
|
||||
|
||||
/**
|
||||
* 新增或更新 可完美替代 saveOrUpdateBatch 高性能
|
||||
*
|
||||
* <p>
|
||||
* 3.5.0 版本 增加 rewriteBatchedStatements=true 批处理参数 使 MP 原生批处理可以达到同样的速度
|
||||
*/
|
||||
@ApiOperation(value = "新增或更新批量方法")
|
||||
|
@ -12,8 +12,8 @@ import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.ValidatorUtils;
|
||||
import com.ruoyi.common.excel.ExcelResult;
|
||||
import com.ruoyi.common.utils.ValidatorUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.demo.domain.TestDemo;
|
||||
import com.ruoyi.demo.domain.bo.TestDemoBo;
|
||||
@ -22,7 +22,6 @@ import com.ruoyi.demo.domain.vo.TestDemoVo;
|
||||
import com.ruoyi.demo.service.ITestDemoService;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@ -42,7 +41,7 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "测试单表控制器", tags = {"测试单表管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/demo/demo")
|
||||
public class TestDemoController extends BaseController {
|
||||
|
@ -14,13 +14,13 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 测试数据脱敏控制器
|
||||
*
|
||||
* <p>
|
||||
* 默认管理员不过滤
|
||||
* 需自行根据业务重写实现
|
||||
*
|
||||
* @see com.ruoyi.common.core.service.SensitiveService
|
||||
* @author Lion Li
|
||||
* @version 3.6.0
|
||||
* @see com.ruoyi.common.core.service.SensitiveService
|
||||
*/
|
||||
@Api(value = "测试数据脱敏控制器", tags = {"测试数据脱敏管理"})
|
||||
@RestController
|
||||
|
@ -17,7 +17,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -35,7 +34,7 @@ import java.util.List;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "测试树表控制器", tags = {"测试树表管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/demo/tree")
|
||||
public class TestTreeController extends BaseController {
|
||||
|
@ -7,7 +7,6 @@ import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -25,7 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(value = "有界队列 演示案例", tags = {"有界队列"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/demo/queue/bounded")
|
||||
public class BoundedQueueController {
|
||||
|
@ -7,7 +7,6 @@ import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -28,7 +27,7 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(value = "延迟队列 演示案例", tags = {"延迟队列"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/demo/queue/delayed")
|
||||
public class DelayedQueueController {
|
||||
|
@ -8,7 +8,6 @@ import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -26,7 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(value = "优先队列 演示案例", tags = {"优先队列"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/demo/queue/priority")
|
||||
public class PriorityQueueController {
|
||||
|
@ -3,8 +3,8 @@ package com.ruoyi.framework.aspectj;
|
||||
import com.ruoyi.common.annotation.RateLimiter;
|
||||
import com.ruoyi.common.enums.LimitType;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
|
@ -6,16 +6,15 @@ import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.JsonUtils;
|
||||
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import com.ruoyi.framework.config.properties.RepeatSubmitProperties;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Before;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@ -32,7 +31,7 @@ import java.util.concurrent.TimeUnit;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@Aspect
|
||||
@Component
|
||||
public class RepeatSubmitAspect {
|
||||
|
@ -91,7 +91,6 @@ public class PlusSaTokenDao implements SaTokenDao {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取Object,如无返空
|
||||
*/
|
||||
|
@ -16,7 +16,6 @@ import com.ruoyi.generator.service.IGenTableService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -33,7 +32,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "代码生成", tags = {"代码生成管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/tool/gen")
|
||||
public class GenController extends BaseController {
|
||||
|
@ -10,7 +10,9 @@ import com.ruoyi.common.constant.GenConstants;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.*;
|
||||
import com.ruoyi.common.utils.JsonUtils;
|
||||
import com.ruoyi.common.utils.LoginUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.generator.domain.GenTable;
|
||||
import com.ruoyi.generator.domain.GenTableColumn;
|
||||
|
@ -8,7 +8,6 @@ import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
@ -40,7 +39,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "${functionName}控制器", tags = {"${functionName}管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/${moduleName}/${businessName}")
|
||||
public class ${ClassName}Controller extends BaseController {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.ruoyi.oss.factory;
|
||||
|
||||
import com.ruoyi.common.utils.JsonUtils;
|
||||
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import com.ruoyi.common.utils.reflect.ReflectUtils;
|
||||
import com.ruoyi.oss.constant.OssConstant;
|
||||
import com.ruoyi.oss.enumd.OssEnumd;
|
||||
|
@ -6,7 +6,6 @@ import com.ruoyi.system.service.ISysDictTypeService;
|
||||
import com.ruoyi.system.service.ISysOssConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -17,7 +16,7 @@ import org.springframework.stereotype.Component;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@Component
|
||||
public class SystemApplicationRunner implements ApplicationRunner {
|
||||
|
||||
|
@ -9,6 +9,7 @@ public interface ISysDataScopeService {
|
||||
|
||||
/**
|
||||
* 获取角色自定义权限
|
||||
*
|
||||
* @param roleId 角色id
|
||||
* @return 部门id组
|
||||
*/
|
||||
@ -16,6 +17,7 @@ public interface ISysDataScopeService {
|
||||
|
||||
/**
|
||||
* 获取部门及以下权限
|
||||
*
|
||||
* @param deptId 部门id
|
||||
* @return 部门id组
|
||||
*/
|
||||
|
@ -12,7 +12,6 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.service.UserService;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.LoginUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.system.domain.SysPost;
|
||||
|
Loading…
x
Reference in New Issue
Block a user