feat(swagger): 升级Swagger至OpenAPI3并更新相关注解
This commit is contained in:
@@ -16,11 +16,10 @@
|
||||
|
||||
package cn.odboy.base;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 通用参数
|
||||
*
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ package cn.odboy.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -29,7 +29,7 @@ import java.util.Date;
|
||||
@Setter
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CsBaseCreateTimeTb extends CsObject {
|
||||
@Schema(name ="创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
private Date createTime;
|
||||
}
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ package cn.odboy.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -30,10 +30,10 @@ import java.util.Date;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CsBaseTimeTb extends CsObject {
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@Schema(name = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@Schema(name = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ package cn.odboy.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -29,7 +29,7 @@ import java.util.Date;
|
||||
@Setter
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CsBaseUpdateTimeTb extends CsObject {
|
||||
@Schema(name ="更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ package cn.odboy.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -35,11 +35,11 @@ public class CsBaseUserCreateTimeTb extends CsObject {
|
||||
|
||||
@CreatedBy
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建人", hidden = true)
|
||||
@Schema(name ="创建人", hidden = true)
|
||||
private String createBy;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@Schema(name ="创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
private Date createTime;
|
||||
|
||||
/* 分组校验 */
|
||||
|
||||
+6
-6
@@ -19,7 +19,7 @@ package cn.odboy.base;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.data.annotation.CreatedBy;
|
||||
@@ -38,19 +38,19 @@ import java.util.Date;
|
||||
public class CsBaseUserTimeLogicTb extends CsObject {
|
||||
@CreatedBy
|
||||
@TableField(value = "create_by", fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建人", hidden = true)
|
||||
@Schema(name ="创建人", hidden = true)
|
||||
private String createBy;
|
||||
@LastModifiedBy
|
||||
@TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新人", hidden = true)
|
||||
@Schema(name ="更新人", hidden = true)
|
||||
private String updateBy;
|
||||
@TableField(value = "create_time", fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
@Schema(name ="创建时间", hidden = true)
|
||||
private Date createTime;
|
||||
@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间", hidden = true)
|
||||
@Schema(name ="更新时间", hidden = true)
|
||||
private Date updateTime;
|
||||
@ApiModelProperty(value = "数据有效性", hidden = true)
|
||||
@Schema(name ="数据有效性", hidden = true)
|
||||
@TableLogic
|
||||
@TableField("available")
|
||||
private Integer available;
|
||||
|
||||
+5
-5
@@ -18,7 +18,7 @@ package cn.odboy.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -36,20 +36,20 @@ public class CsBaseUserTimeTb extends CsObject {
|
||||
|
||||
@CreatedBy
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建人", hidden = true)
|
||||
@Schema(name ="创建人", hidden = true)
|
||||
private String createBy;
|
||||
|
||||
@LastModifiedBy
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新人", hidden = true)
|
||||
@Schema(name ="更新人", hidden = true)
|
||||
private String updateBy;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@Schema(name ="创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@Schema(name ="更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
private Date updateTime;
|
||||
|
||||
/* 分组校验 */
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
package cn.odboy.base;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
@@ -37,11 +37,11 @@ import java.io.Serializable;
|
||||
public class CsPageArgs<T> implements Serializable {
|
||||
@NotNull(message = "参数page不能为空")
|
||||
@Min(value = 1, message = "参数page最小值为1")
|
||||
@ApiModelProperty(value = "页码", example = "1")
|
||||
@Schema(name ="页码", example = "1")
|
||||
private Integer page;
|
||||
@NotNull(message = "参数size不能为空")
|
||||
@Min(value = 1, message = "参数size最小值为1")
|
||||
@ApiModelProperty(value = "每页数据量", example = "10")
|
||||
@Schema(name ="每页数据量", example = "10")
|
||||
private Integer size;
|
||||
private T args;
|
||||
}
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ public class BootApplication {
|
||||
"Application is running! Access URLs:\n\t" +
|
||||
"Local: \t\thttp://localhost:" + port + path + "/\n\t" +
|
||||
"External: \thttp://" + ip + ":" + port + path + "/\n\t"
|
||||
// + "Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n"
|
||||
+ "Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n"
|
||||
+ "----------------------------------------------------------");
|
||||
}
|
||||
}
|
||||
+1
@@ -20,6 +20,7 @@ package cn.odboy.framework.context;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ package cn.odboy.framework.monitor.controller;
|
||||
|
||||
import cn.odboy.annotation.AnonymousGetMapping;
|
||||
import cn.odboy.framework.monitor.service.CsHealthCheckPointService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/healthCheck")
|
||||
@Api(tags = "系统:健康检查接口")
|
||||
@Tag(name = "系统:健康检查接口")
|
||||
public class HealthCheckController {
|
||||
@Autowired
|
||||
private CsHealthCheckPointService healthCheckPointService;
|
||||
|
||||
+3
-3
@@ -19,6 +19,9 @@ package cn.odboy.framework.mybatisplus.config;
|
||||
import com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure;
|
||||
import com.alibaba.druid.spring.boot3.autoconfigure.properties.DruidStatProperties;
|
||||
import com.alibaba.druid.util.Utils;
|
||||
import jakarta.servlet.*;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
||||
@@ -26,9 +29,6 @@ import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import jakarta.servlet.*;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
@Configuration
|
||||
|
||||
+2
-1
@@ -28,8 +28,9 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.odboy.base.CsObject;
|
||||
import cn.odboy.constant.CaptchaCodeEnum;
|
||||
import cn.odboy.framework.exception.BadRequestException;
|
||||
import cn.odboy.util.CsStringUtil;
|
||||
import com.wf.captcha.*;
|
||||
import com.wf.captcha.base.Captcha;
|
||||
import lombok.Getter;
|
||||
|
||||
-1
@@ -21,7 +21,6 @@ import com.alibaba.fastjson2.JSONFactory;
|
||||
import com.alibaba.fastjson2.JSONWriter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.digest.MurmurHash3;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.cache.Cache;
|
||||
|
||||
-1
@@ -31,7 +31,6 @@ import org.springframework.http.converter.StringHttpMessageConverter;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
import org.springframework.web.filter.CorsFilter;
|
||||
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
+3
-2
@@ -17,12 +17,13 @@
|
||||
package cn.odboy.framework.websocket.context;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import jakarta.websocket.*;
|
||||
import jakarta.websocket.server.PathParam;
|
||||
import jakarta.websocket.server.ServerEndpoint;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import jakarta.websocket.*;
|
||||
import jakarta.websocket.server.PathParam;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
+1
-1
@@ -18,10 +18,10 @@ package cn.odboy.util;
|
||||
|
||||
import cn.hutool.http.useragent.UserAgent;
|
||||
import cn.hutool.http.useragent.UserAgentUtil;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
|
||||
@@ -23,15 +23,15 @@ import cn.hutool.poi.excel.ExcelUtil;
|
||||
import cn.odboy.constant.FileTypeEnum;
|
||||
import cn.odboy.constant.SystemConst;
|
||||
import cn.odboy.framework.exception.BadRequestException;
|
||||
import jakarta.servlet.ServletOutputStream;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.apache.poi.xssf.streaming.SXSSFSheet;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.ServletOutputStream;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.nio.file.Files;
|
||||
import java.security.MessageDigest;
|
||||
|
||||
+2
-2
@@ -17,13 +17,13 @@
|
||||
package cn.odboy.util;
|
||||
|
||||
import cn.odboy.framework.exception.BadRequestException;
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
import jakarta.validation.ConstraintViolation;
|
||||
import jakarta.validation.Validation;
|
||||
import jakarta.validation.Validator;
|
||||
import jakarta.validation.ValidatorFactory;
|
||||
import jakarta.validation.groups.Default;
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
+8
-9
@@ -34,10 +34,9 @@ import cn.odboy.system.framework.permission.core.CsSecurityHelper;
|
||||
import cn.odboy.system.framework.permission.core.handler.TokenProvider;
|
||||
import cn.odboy.system.framework.permission.core.handler.UserDetailsHandler;
|
||||
import cn.odboy.util.CsRsaEncryptUtil;
|
||||
import cn.odboy.util.CsStringUtil;
|
||||
import com.wf.captcha.base.Captcha;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -62,7 +61,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/auth")
|
||||
@Api(tags = "系统:系统授权接口")
|
||||
@Tag(name = "系统:系统授权接口")
|
||||
public class SystemAuthController {
|
||||
@Autowired
|
||||
private CsRedisHelper redisHelper;
|
||||
@@ -77,7 +76,7 @@ public class SystemAuthController {
|
||||
@Autowired
|
||||
private UserDetailsHandler userDetailsService;
|
||||
|
||||
@ApiOperation("登录授权")
|
||||
@Operation(summary = "登录授权")
|
||||
@AnonymousPostMapping(value = "/login")
|
||||
public ResponseEntity<Map<String, Object>> login(@Validated @RequestBody SystemUserLoginArgs loginRequest, HttpServletRequest request) throws Exception {
|
||||
// 密码解密
|
||||
@@ -117,15 +116,15 @@ public class SystemAuthController {
|
||||
return ResponseEntity.ok(authInfo);
|
||||
}
|
||||
|
||||
@ApiOperation("获取用户信息")
|
||||
@Operation(summary = "获取用户信息")
|
||||
@PostMapping(value = "/info")
|
||||
public ResponseEntity<SystemUserInfoVo> getUserInfo() {
|
||||
SystemUserJwtVo jwtUser = (SystemUserJwtVo) CsSecurityHelper.getCurrentUser();
|
||||
SystemUserJwtVo jwtUser = (SystemUserJwtVo)CsSecurityHelper.getCurrentUser();
|
||||
SystemUserInfoVo userInfoVo = BeanUtil.copyProperties(jwtUser, SystemUserInfoVo.class);
|
||||
return ResponseEntity.ok(userInfoVo);
|
||||
}
|
||||
|
||||
@ApiOperation("获取验证码")
|
||||
@Operation(summary = "获取验证码")
|
||||
@AnonymousPostMapping(value = "/captcha/getImage")
|
||||
public ResponseEntity<Map<String, Object>> getCode() {
|
||||
// 获取运算的结果
|
||||
@@ -146,7 +145,7 @@ public class SystemAuthController {
|
||||
return ResponseEntity.ok(imgResult);
|
||||
}
|
||||
|
||||
@ApiOperation("退出登录")
|
||||
@Operation(summary = "退出登录")
|
||||
@AnonymousPostMapping(value = "/logout")
|
||||
public ResponseEntity<Void> logout(HttpServletRequest request) {
|
||||
String token = tokenProvider.getToken(request);
|
||||
|
||||
+6
-7
@@ -19,36 +19,35 @@ package cn.odboy.system.controller;
|
||||
import cn.odboy.system.constant.SystemCaptchaBizEnum;
|
||||
import cn.odboy.system.dal.model.SystemCheckEmailCaptchaArgs;
|
||||
import cn.odboy.system.service.SystemEmailService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/captcha")
|
||||
@Api(tags = "系统:验证码管理")
|
||||
@Tag(name = "系统:验证码管理")
|
||||
public class SystemCaptchaController {
|
||||
@Autowired
|
||||
private SystemEmailService systemEmailService;
|
||||
|
||||
@ApiOperation("重置邮箱, 发送验证码")
|
||||
@Operation(summary = "重置邮箱, 发送验证码")
|
||||
@PostMapping(value = "/sendResetEmailCaptcha")
|
||||
public ResponseEntity<Void> sendResetEmailCaptcha(@RequestParam String email) {
|
||||
systemEmailService.sendCaptcha(SystemCaptchaBizEnum.EMAIL_RESET_EMAIL_CODE, email);
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("重置密码,发送验证码")
|
||||
@Operation(summary = "重置密码,发送验证码")
|
||||
@PostMapping(value = "/sendResetPasswordCaptcha")
|
||||
public ResponseEntity<Void> sendResetPasswordCaptcha(@RequestParam String email) {
|
||||
systemEmailService.sendCaptcha(SystemCaptchaBizEnum.EMAIL_RESET_PWD_CODE, email);
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("验证码验证")
|
||||
@Operation(summary = "验证码验证")
|
||||
@PostMapping(value = "/checkEmailCaptcha")
|
||||
public ResponseEntity<Void> checkEmailCaptcha(@Validated @RequestBody SystemCheckEmailCaptchaArgs args) {
|
||||
SystemCaptchaBizEnum biEnum = SystemCaptchaBizEnum.getByBizCode(args.getBizCode());
|
||||
|
||||
+5
-5
@@ -17,8 +17,8 @@
|
||||
package cn.odboy.system.controller;
|
||||
|
||||
import cn.odboy.system.service.SystemDeptService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -27,20 +27,20 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "系统:组件数据源")
|
||||
@Tag(name = "系统:组件数据源")
|
||||
@RequestMapping("/api/component")
|
||||
public class SystemComponentController {
|
||||
@Autowired
|
||||
private SystemDeptService systemDeptService;
|
||||
|
||||
@ApiOperation("查询部门下拉选择数据源")
|
||||
@Operation(summary = "查询部门下拉选择数据源")
|
||||
@PostMapping(value = "/queryDeptSelectDataSource")
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<?> queryDeptSelectDataSource() {
|
||||
return ResponseEntity.ok(systemDeptService.queryDeptSelectDataSource());
|
||||
}
|
||||
|
||||
@ApiOperation("查询部门下拉选择Pro数据源")
|
||||
@Operation(summary = "查询部门下拉选择Pro数据源")
|
||||
@PostMapping(value = "/queryDeptSelectProDataSource")
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<?> queryDeptSelectProDataSource() {
|
||||
|
||||
+12
-12
@@ -23,16 +23,15 @@ import cn.odboy.system.dal.model.SystemCreateDeptArgs;
|
||||
import cn.odboy.system.dal.model.SystemQueryDeptArgs;
|
||||
import cn.odboy.system.service.SystemDeptService;
|
||||
import cn.odboy.util.CsPageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
@@ -40,20 +39,20 @@ import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "系统:部门管理")
|
||||
@Tag(name = "系统:部门管理")
|
||||
@RequestMapping("/api/dept")
|
||||
public class SystemDeptController {
|
||||
@Autowired
|
||||
private SystemDeptService systemDeptService;
|
||||
|
||||
@ApiOperation("导出部门数据")
|
||||
@Operation(summary = "导出部门数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('dept:list')")
|
||||
public void exportDept(HttpServletResponse response, SystemQueryDeptArgs criteria) throws Exception {
|
||||
systemDeptService.exportDeptExcel(systemDeptService.queryAllDept(criteria, false), response);
|
||||
}
|
||||
|
||||
@ApiOperation("查询部门")
|
||||
@Operation(summary = "查询部门")
|
||||
@PostMapping
|
||||
@PreAuthorize("@el.check('user:list','dept:list')")
|
||||
public ResponseEntity<CsPageResult<SystemDeptTb>> queryDept(@Validated @RequestBody CsPageArgs<SystemQueryDeptArgs> args) throws Exception {
|
||||
@@ -62,10 +61,11 @@ public class SystemDeptController {
|
||||
return ResponseEntity.ok(CsPageUtil.toPage(depts));
|
||||
}
|
||||
|
||||
@ApiOperation("查询部门:根据ID获取同级与上级数据")
|
||||
@Operation(summary = "查询部门:根据ID获取同级与上级数据")
|
||||
@PostMapping("/queryDeptSuperiorTree")
|
||||
@PreAuthorize("@el.check('user:list','dept:list')")
|
||||
public ResponseEntity<CsPageResult<SystemDeptTb>> queryDeptSuperiorTree(@RequestBody List<Long> ids, @RequestParam(defaultValue = "false") Boolean exclude) {
|
||||
public ResponseEntity<CsPageResult<SystemDeptTb>> queryDeptSuperiorTree(@RequestBody List<Long> ids,
|
||||
@RequestParam(defaultValue = "false") Boolean exclude) {
|
||||
Set<SystemDeptTb> deptSet = new LinkedHashSet<>();
|
||||
for (Long id : ids) {
|
||||
// 同级数据
|
||||
@@ -86,7 +86,7 @@ public class SystemDeptController {
|
||||
return ResponseEntity.ok(systemDeptService.buildDeptTree(new ArrayList<>(deptSet)));
|
||||
}
|
||||
|
||||
@ApiOperation("新增部门")
|
||||
@Operation(summary = "新增部门")
|
||||
@PostMapping(value = "/saveDept")
|
||||
@PreAuthorize("@el.check('dept:add')")
|
||||
public ResponseEntity<Void> saveDept(@Validated @RequestBody SystemCreateDeptArgs args) {
|
||||
@@ -94,7 +94,7 @@ public class SystemDeptController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("修改部门")
|
||||
@Operation(summary = "修改部门")
|
||||
@PostMapping(value = "/modifyDept")
|
||||
@PreAuthorize("@el.check('dept:edit')")
|
||||
public ResponseEntity<Void> modifyDept(@Validated(SystemDeptTb.Update.class) @RequestBody SystemDeptTb args) {
|
||||
@@ -102,7 +102,7 @@ public class SystemDeptController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("删除部门")
|
||||
@Operation(summary = "删除部门")
|
||||
@PostMapping(value = "/removeDeptByIds")
|
||||
@PreAuthorize("@el.check('dept:del')")
|
||||
public ResponseEntity<Void> removeDeptByIds(@RequestBody Set<Long> ids) {
|
||||
|
||||
+10
-11
@@ -23,42 +23,41 @@ import cn.odboy.system.dal.model.SystemCreateDictArgs;
|
||||
import cn.odboy.system.dal.model.SystemQueryDictArgs;
|
||||
import cn.odboy.system.service.SystemDictService;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "系统:字典管理")
|
||||
@Tag(name = "系统:字典管理")
|
||||
@RequestMapping("/api/dict")
|
||||
public class SystemDictController {
|
||||
@Autowired
|
||||
private SystemDictService systemDictService;
|
||||
|
||||
@ApiOperation("导出字典数据")
|
||||
@Operation(summary = "导出字典数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('dict:list')")
|
||||
public void exportDict(HttpServletResponse response, SystemQueryDictArgs criteria) throws IOException {
|
||||
systemDictService.exportDictExcel(systemDictService.queryDictByArgs(criteria), response);
|
||||
}
|
||||
|
||||
@ApiOperation("查询字典")
|
||||
@Operation(summary = "查询字典")
|
||||
@PostMapping(value = "/queryAllDict")
|
||||
@PreAuthorize("@el.check('dict:list')")
|
||||
public ResponseEntity<List<SystemDictTb>> queryAllDict() {
|
||||
return ResponseEntity.ok(systemDictService.queryDictByArgs(new SystemQueryDictArgs()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询字典")
|
||||
@Operation(summary = "查询字典")
|
||||
@PostMapping
|
||||
@PreAuthorize("@el.check('dict:list')")
|
||||
public ResponseEntity<CsPageResult<SystemDictTb>> queryDictByArgs(@Validated @RequestBody CsPageArgs<SystemQueryDictArgs> args) {
|
||||
@@ -72,7 +71,7 @@ public class SystemDictController {
|
||||
return ResponseEntity.ok(systemDictService.queryDictByArgs(criteria, page));
|
||||
}
|
||||
|
||||
@ApiOperation("新增字典")
|
||||
@Operation(summary = "新增字典")
|
||||
@PostMapping(value = "/saveDict")
|
||||
@PreAuthorize("@el.check('dict:add')")
|
||||
public ResponseEntity<Void> saveDict(@Validated @RequestBody SystemCreateDictArgs args) {
|
||||
@@ -80,7 +79,7 @@ public class SystemDictController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("修改字典")
|
||||
@Operation(summary = "修改字典")
|
||||
@PostMapping(value = "/modifyDictById")
|
||||
@PreAuthorize("@el.check('dict:edit')")
|
||||
public ResponseEntity<Void> modifyDictById(@Validated(SystemDictTb.Update.class) @RequestBody SystemDictTb args) {
|
||||
@@ -88,7 +87,7 @@ public class SystemDictController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("删除字典")
|
||||
@Operation(summary = "删除字典")
|
||||
@PostMapping(value = "/removeDictByIds")
|
||||
@PreAuthorize("@el.check('dict:del')")
|
||||
public ResponseEntity<Void> removeDictByIds(@RequestBody Set<Long> ids) {
|
||||
|
||||
+9
-9
@@ -23,8 +23,8 @@ import cn.odboy.system.dal.model.SystemCreateDictDetailArgs;
|
||||
import cn.odboy.system.dal.model.SystemQueryDictDetailArgs;
|
||||
import cn.odboy.system.service.SystemDictDetailService;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -36,19 +36,19 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "系统:字典详情管理")
|
||||
@Tag(name = "系统:字典详情管理")
|
||||
@RequestMapping("/api/dictDetail")
|
||||
public class SystemDictDetailController {
|
||||
@Autowired
|
||||
private SystemDictDetailService systemDictDetailService;
|
||||
|
||||
@ApiOperation("查询字典详情")
|
||||
@Operation(summary = "查询字典详情")
|
||||
@PostMapping
|
||||
public ResponseEntity<CsPageResult<SystemDictDetailTb>> queryDictDetailByCrud(@Validated @RequestBody CsPageArgs<SystemQueryDictDetailArgs> args) {
|
||||
return queryDictDetailByArgs(args);
|
||||
}
|
||||
|
||||
@ApiOperation("查询字典详情")
|
||||
@Operation(summary = "查询字典详情")
|
||||
@PostMapping(value = "/queryDictDetailByArgs")
|
||||
public ResponseEntity<CsPageResult<SystemDictDetailTb>> queryDictDetailByArgs(@Validated @RequestBody CsPageArgs<SystemQueryDictDetailArgs> args) {
|
||||
SystemQueryDictDetailArgs criteria = args.getArgs();
|
||||
@@ -56,7 +56,7 @@ public class SystemDictDetailController {
|
||||
return ResponseEntity.ok(systemDictDetailService.queryDictDetailByArgs(criteria, page));
|
||||
}
|
||||
|
||||
@ApiOperation("查询多个字典详情")
|
||||
@Operation(summary = "查询多个字典详情")
|
||||
@GetMapping(value = "/getDictDetailMaps")
|
||||
public ResponseEntity<Map<String, List<SystemDictDetailTb>>> getDictDetailMaps(@RequestParam String dictName) {
|
||||
String[] names = dictName.split("[,, ]");
|
||||
@@ -67,7 +67,7 @@ public class SystemDictDetailController {
|
||||
return ResponseEntity.ok(dictMap);
|
||||
}
|
||||
|
||||
@ApiOperation("新增字典详情")
|
||||
@Operation(summary = "新增字典详情")
|
||||
@PostMapping(value = "/saveDictDetail")
|
||||
@PreAuthorize("@el.check('dict:add')")
|
||||
public ResponseEntity<Void> saveDictDetail(@Validated @RequestBody SystemCreateDictDetailArgs args) {
|
||||
@@ -75,7 +75,7 @@ public class SystemDictDetailController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("修改字典详情")
|
||||
@Operation(summary = "修改字典详情")
|
||||
@PostMapping(value = "/modifyDictDetailById")
|
||||
@PreAuthorize("@el.check('dict:edit')")
|
||||
public ResponseEntity<Void> modifyDictDetailById(@Validated(SystemDictDetailTb.Update.class) @RequestBody SystemDictDetailTb args) {
|
||||
@@ -83,7 +83,7 @@ public class SystemDictDetailController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("删除字典详情")
|
||||
@Operation(summary = "删除字典详情")
|
||||
@PostMapping(value = "/removeDictDetailById")
|
||||
@PreAuthorize("@el.check('dict:del')")
|
||||
public ResponseEntity<Void> removeDictDetailById(@RequestBody SystemDictDetailTb args) {
|
||||
|
||||
+7
-9
@@ -19,10 +19,9 @@ package cn.odboy.system.controller;
|
||||
import cn.odboy.system.dal.dataobject.SystemEmailConfigTb;
|
||||
import cn.odboy.system.dal.model.SystemSendEmailArgs;
|
||||
import cn.odboy.system.service.SystemEmailService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -35,26 +34,25 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/email")
|
||||
@Api(tags = "工具:邮件管理")
|
||||
@Tag(name = "工具:邮件管理")
|
||||
public class SystemEmailController {
|
||||
@Autowired
|
||||
private SystemEmailService systemEmailService;
|
||||
|
||||
@ApiOperation("查询配置")
|
||||
@Operation(summary = "查询配置")
|
||||
@PostMapping(value = "/getLastEmailConfig")
|
||||
public ResponseEntity<SystemEmailConfigTb> getLastEmailConfig() {
|
||||
return ResponseEntity.ok(systemEmailService.getLastEmailConfig());
|
||||
}
|
||||
|
||||
@ApiOperation("配置邮件")
|
||||
@Operation(summary = "配置邮件")
|
||||
@PostMapping(value = "/modifyEmailConfig")
|
||||
public ResponseEntity<Void> modifyEmailConfig(@Validated @RequestBody SystemEmailConfigTb emailConfig)
|
||||
throws Exception {
|
||||
public ResponseEntity<Void> modifyEmailConfig(@Validated @RequestBody SystemEmailConfigTb emailConfig) throws Exception {
|
||||
systemEmailService.modifyEmailConfig(emailConfig);
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("发送邮件")
|
||||
@Operation(summary = "发送邮件")
|
||||
@PostMapping(value = "/sendEmail")
|
||||
public ResponseEntity<Void> sendEmail(@Validated @RequestBody SystemSendEmailArgs sendEmailRequest) {
|
||||
systemEmailService.sendEmail(sendEmailRequest);
|
||||
|
||||
+10
-11
@@ -23,34 +23,33 @@ import cn.odboy.system.dal.model.SystemCreateJobArgs;
|
||||
import cn.odboy.system.dal.model.SystemQueryJobArgs;
|
||||
import cn.odboy.system.service.SystemJobService;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Set;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "系统:岗位管理")
|
||||
@Tag(name = "系统:岗位管理")
|
||||
@RequestMapping("/api/job")
|
||||
public class SystemJobController {
|
||||
@Autowired
|
||||
private SystemJobService systemJobService;
|
||||
|
||||
@ApiOperation("导出岗位数据")
|
||||
@Operation(summary = "导出岗位数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('job:list')")
|
||||
public void exportJob(HttpServletResponse response, SystemQueryJobArgs criteria) throws IOException {
|
||||
systemJobService.exportJobExcel(systemJobService.queryJobByArgs(criteria), response);
|
||||
}
|
||||
|
||||
@ApiOperation("查询岗位")
|
||||
@Operation(summary = "查询岗位")
|
||||
@PostMapping(value = "/queryAllEnableJob")
|
||||
@PreAuthorize("@el.check('job:list','user:list')")
|
||||
public ResponseEntity<CsPageResult<SystemJobTb>> queryJobByArgs(@Validated @RequestBody CsPageArgs<SystemQueryJobArgs> args) {
|
||||
@@ -59,14 +58,14 @@ public class SystemJobController {
|
||||
return ResponseEntity.ok(systemJobService.queryJobByArgs(criteria, page));
|
||||
}
|
||||
|
||||
@ApiOperation("查询岗位")
|
||||
@Operation(summary = "查询岗位")
|
||||
@PostMapping
|
||||
@PreAuthorize("@el.check('job:list','user:list')")
|
||||
public ResponseEntity<CsPageResult<SystemJobTb>> queryJobByCrud(@Validated @RequestBody CsPageArgs<SystemQueryJobArgs> args) {
|
||||
return queryJobByArgs(args);
|
||||
}
|
||||
|
||||
@ApiOperation("新增岗位")
|
||||
@Operation(summary = "新增岗位")
|
||||
@PostMapping(value = "/saveJob")
|
||||
@PreAuthorize("@el.check('job:add')")
|
||||
public ResponseEntity<Void> saveJob(@Validated @RequestBody SystemCreateJobArgs args) {
|
||||
@@ -74,7 +73,7 @@ public class SystemJobController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("修改岗位")
|
||||
@Operation(summary = "修改岗位")
|
||||
@PostMapping(value = "/modifyJobById")
|
||||
@PreAuthorize("@el.check('job:edit')")
|
||||
public ResponseEntity<Void> modifyJobById(@Validated(SystemJobTb.Update.class) @RequestBody SystemJobTb args) {
|
||||
@@ -82,7 +81,7 @@ public class SystemJobController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("删除岗位")
|
||||
@Operation(summary = "删除岗位")
|
||||
@PostMapping(value = "/removeJobByIds")
|
||||
@PreAuthorize("@el.check('job:del')")
|
||||
public ResponseEntity<Void> removeJobByIds(@RequestBody Set<Long> ids) {
|
||||
|
||||
+10
-10
@@ -25,8 +25,9 @@ import cn.odboy.system.dal.model.SystemQueryStorageArgs;
|
||||
import cn.odboy.system.service.SystemLocalStorageService;
|
||||
import cn.odboy.util.CsFileUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -34,17 +35,16 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "工具:本地存储管理")
|
||||
@Tag(name = "工具:本地存储管理")
|
||||
@RequestMapping("/api/localStorage")
|
||||
public class SystemLocalStorageController {
|
||||
@Autowired
|
||||
private SystemLocalStorageService localStorageService;
|
||||
|
||||
@ApiOperation("查询文件")
|
||||
@Operation(summary = "查询文件")
|
||||
@PostMapping
|
||||
@PreAuthorize("@el.check('storage:list')")
|
||||
public ResponseEntity<CsPageResult<SystemLocalStorageTb>> queryLocalStorage(@Validated @RequestBody CsPageArgs<SystemQueryStorageArgs> args) {
|
||||
@@ -53,14 +53,14 @@ public class SystemLocalStorageController {
|
||||
return ResponseEntity.ok(localStorageService.queryLocalStorage(criteria, page));
|
||||
}
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@Operation(summary = "导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('storage:list')")
|
||||
public void exportFile(HttpServletResponse response, SystemQueryStorageArgs criteria) throws IOException {
|
||||
localStorageService.exportLocalStorageExcel(localStorageService.queryLocalStorage(criteria), response);
|
||||
}
|
||||
|
||||
@ApiOperation("上传文件")
|
||||
@Operation(summary = "上传文件")
|
||||
@PostMapping(value = "/uploadFile")
|
||||
@PreAuthorize("@el.check('storage:add')")
|
||||
public ResponseEntity<Void> uploadFile(@RequestParam String name, @RequestParam("file") MultipartFile file) {
|
||||
@@ -68,7 +68,7 @@ public class SystemLocalStorageController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("上传图片")
|
||||
@Operation(summary = "上传图片")
|
||||
@PostMapping("/uploadPicture")
|
||||
public ResponseEntity<SystemLocalStorageTb> uploadPicture(@RequestParam MultipartFile file) {
|
||||
// 判断文件是否为图片
|
||||
@@ -80,7 +80,7 @@ public class SystemLocalStorageController {
|
||||
return ResponseEntity.ok(localStorage);
|
||||
}
|
||||
|
||||
@ApiOperation("修改文件")
|
||||
@Operation(summary = "修改文件")
|
||||
@PostMapping(value = "/modifyLocalStorageById")
|
||||
@PreAuthorize("@el.check('storage:edit')")
|
||||
public ResponseEntity<Void> modifyLocalStorageById(@Validated @RequestBody SystemLocalStorageTb args) {
|
||||
@@ -88,7 +88,7 @@ public class SystemLocalStorageController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("多选删除")
|
||||
@Operation(summary = "多选删除")
|
||||
@PostMapping(value = "/removeFileByIds")
|
||||
public ResponseEntity<Void> deleteFileByIds(@RequestBody Long[] ids) {
|
||||
localStorageService.removeFileByIds(ids);
|
||||
|
||||
+14
-14
@@ -27,20 +27,20 @@ import cn.odboy.system.dal.mysql.SystemMenuMapper;
|
||||
import cn.odboy.system.framework.permission.core.CsSecurityHelper;
|
||||
import cn.odboy.system.service.SystemMenuService;
|
||||
import cn.odboy.util.CsPageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "系统:菜单管理")
|
||||
@Tag(name = "系统:菜单管理")
|
||||
@RequestMapping("/api/menu")
|
||||
public class SystemMenuController {
|
||||
@Autowired
|
||||
@@ -48,7 +48,7 @@ public class SystemMenuController {
|
||||
@Autowired
|
||||
private SystemMenuMapper systemMenuMapper;
|
||||
|
||||
@ApiOperation("导出菜单数据")
|
||||
@Operation(summary = "导出菜单数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('menu:list')")
|
||||
public void exportMenu(HttpServletResponse response, SystemQueryMenuArgs criteria) throws Exception {
|
||||
@@ -56,21 +56,21 @@ public class SystemMenuController {
|
||||
}
|
||||
|
||||
@PostMapping(value = "/buildMenus")
|
||||
@ApiOperation("获取前端所需菜单")
|
||||
@Operation(summary = "获取前端所需菜单")
|
||||
public ResponseEntity<List<SystemMenuVo>> buildMenus() {
|
||||
List<SystemMenuTb> menuList = systemMenuService.queryMenuListByUserId(CsSecurityHelper.getCurrentUserId());
|
||||
List<SystemMenuTb> menus = systemMenuService.buildMenuTree(menuList);
|
||||
return ResponseEntity.ok(systemMenuService.buildMenuVo(menus));
|
||||
}
|
||||
|
||||
@ApiOperation("返回全部的菜单")
|
||||
@Operation(summary = "返回全部的菜单")
|
||||
@PostMapping(value = "/queryMenuListByPid")
|
||||
@PreAuthorize("@el.check('menu:list','roles:list')")
|
||||
public ResponseEntity<List<SystemMenuTb>> queryMenuListByPid(@RequestParam Long pid) {
|
||||
return ResponseEntity.ok(systemMenuService.queryMenuByPid(pid));
|
||||
}
|
||||
|
||||
@ApiOperation("根据菜单ID返回所有子节点ID, 包含自身ID")
|
||||
@Operation(summary = "根据菜单ID返回所有子节点ID, 包含自身ID")
|
||||
@PostMapping(value = "/queryChildMenuSet")
|
||||
@PreAuthorize("@el.check('menu:list','roles:list')")
|
||||
public ResponseEntity<Set<Long>> queryChildMenuSet(@RequestParam Long id) {
|
||||
@@ -83,14 +83,14 @@ public class SystemMenuController {
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("查询菜单")
|
||||
@Operation(summary = "查询菜单")
|
||||
@PreAuthorize("@el.check('menu:list')")
|
||||
public ResponseEntity<CsPageResult<SystemMenuTb>> queryAllMenuByCrud(@Validated @RequestBody CsPageArgs<SystemQueryMenuArgs> args) throws Exception {
|
||||
return queryAllMenu(args);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/queryMenuByArgs")
|
||||
@ApiOperation("查询菜单")
|
||||
@Operation(summary = "查询菜单")
|
||||
@PreAuthorize("@el.check('menu:list')")
|
||||
public ResponseEntity<CsPageResult<SystemMenuTb>> queryAllMenu(@Validated @RequestBody CsPageArgs<SystemQueryMenuArgs> args) throws Exception {
|
||||
SystemQueryMenuArgs criteria = args.getArgs();
|
||||
@@ -98,7 +98,7 @@ public class SystemMenuController {
|
||||
return ResponseEntity.ok(CsPageUtil.toPage(menuList));
|
||||
}
|
||||
|
||||
@ApiOperation("查询菜单:根据ID获取同级与上级数据")
|
||||
@Operation(summary = "查询菜单:根据ID获取同级与上级数据")
|
||||
@PostMapping("/queryMenuSuperior")
|
||||
@PreAuthorize("@el.check('menu:list')")
|
||||
public ResponseEntity<List<SystemMenuTb>> queryMenuSuperior(@RequestBody List<Long> ids) {
|
||||
@@ -121,7 +121,7 @@ public class SystemMenuController {
|
||||
return ResponseEntity.ok(systemMenuService.queryMenuByPid(null));
|
||||
}
|
||||
|
||||
@ApiOperation("新增菜单")
|
||||
@Operation(summary = "新增菜单")
|
||||
@PostMapping(value = "/saveMenu")
|
||||
@PreAuthorize("@el.check('menu:add')")
|
||||
public ResponseEntity<Void> saveMenu(@Validated @RequestBody SystemMenuTb args) {
|
||||
@@ -132,7 +132,7 @@ public class SystemMenuController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("修改菜单")
|
||||
@Operation(summary = "修改菜单")
|
||||
@PostMapping(value = "/modifyMenuById")
|
||||
@PreAuthorize("@el.check('menu:edit')")
|
||||
public ResponseEntity<Void> modifyMenuById(@Validated(SystemMenuTb.Update.class) @RequestBody SystemMenuTb args) {
|
||||
@@ -140,7 +140,7 @@ public class SystemMenuController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("删除菜单")
|
||||
@Operation(summary = "删除菜单")
|
||||
@PostMapping(value = "/removeMenuByIds")
|
||||
@PreAuthorize("@el.check('menu:del')")
|
||||
public ResponseEntity<Void> removeMenuByIds(@RequestBody Set<Long> ids) {
|
||||
|
||||
+4
-4
@@ -17,8 +17,8 @@
|
||||
package cn.odboy.system.controller;
|
||||
|
||||
import cn.odboy.system.service.SystemMonitorService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -29,14 +29,14 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "系统-服务监控管理")
|
||||
@Tag(name = "系统-服务监控管理")
|
||||
@RequestMapping("/api/monitor")
|
||||
public class SystemMonitorController {
|
||||
@Autowired
|
||||
private SystemMonitorService systemMonitorService;
|
||||
|
||||
@PostMapping(value = "/queryServerMonitorInfo")
|
||||
@ApiOperation("查询服务监控")
|
||||
@Operation(summary = "查询服务监控")
|
||||
@PreAuthorize("@el.check('monitor:list')")
|
||||
public ResponseEntity<Map<String, Object>> queryServerMonitorInfo() {
|
||||
return ResponseEntity.ok(systemMonitorService.queryServerMonitorInfo());
|
||||
|
||||
+6
-6
@@ -23,8 +23,8 @@ import cn.odboy.system.dal.redis.SystemUserOnlineInfoDAO;
|
||||
import cn.odboy.util.CsDesEncryptUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -37,12 +37,12 @@ import java.util.Set;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/user/online")
|
||||
@Api(tags = "系统:在线用户管理")
|
||||
@Tag(name = "系统:在线用户管理")
|
||||
public class SystemOnlineController {
|
||||
@Autowired
|
||||
private SystemUserOnlineInfoDAO systemUserOnlineInfoDAO;
|
||||
|
||||
@ApiOperation("查询在线用户")
|
||||
@Operation(summary = "查询在线用户")
|
||||
@PostMapping
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<CsPageResult<SystemUserOnlineVo>> queryOnlineUser(@Validated @RequestBody CsPageArgs<SystemUserOnlineVo> args) {
|
||||
@@ -50,14 +50,14 @@ public class SystemOnlineController {
|
||||
return ResponseEntity.ok(systemUserOnlineInfoDAO.queryUserOnlineModelPage(args.getArgs(), page));
|
||||
}
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@Operation(summary = "导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check()")
|
||||
public void exportOnlineUser(HttpServletResponse response, String username) throws IOException {
|
||||
systemUserOnlineInfoDAO.downloadUserOnlineModelExcel(systemUserOnlineInfoDAO.queryUserOnlineModelListByUsername(username), response);
|
||||
}
|
||||
|
||||
@ApiOperation("踢出用户")
|
||||
@Operation(summary = "踢出用户")
|
||||
@PostMapping(value = "/kickOutUser")
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<Void> kickOutUser(@RequestBody Set<String> keys) throws Exception {
|
||||
|
||||
+8
-8
@@ -23,8 +23,9 @@ import cn.odboy.system.dal.model.SystemOssStorageVo;
|
||||
import cn.odboy.system.dal.model.SystemQueryStorageArgs;
|
||||
import cn.odboy.system.service.SystemOssStorageService;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -33,18 +34,17 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Api(tags = "工具:OSS存储管理")
|
||||
@Tag(name = "工具:OSS存储管理")
|
||||
@RequestMapping("/api/ossStorage")
|
||||
public class SystemOssStorageController {
|
||||
@Autowired
|
||||
private SystemOssStorageService systemOssStorageService;
|
||||
|
||||
@ApiOperation("查询文件")
|
||||
@Operation(summary = "查询文件")
|
||||
@PostMapping
|
||||
@PreAuthorize("@el.check('storage:list')")
|
||||
public ResponseEntity<CsPageResult<SystemOssStorageVo>> queryOssStorage(@Validated @RequestBody CsPageArgs<SystemQueryStorageArgs> args) {
|
||||
@@ -53,14 +53,14 @@ public class SystemOssStorageController {
|
||||
return ResponseEntity.ok(systemOssStorageService.queryOssStorage(criteria, page));
|
||||
}
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@Operation(summary = "导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('storage:list')")
|
||||
public void exportFile(HttpServletResponse response, SystemQueryStorageArgs criteria) throws IOException {
|
||||
systemOssStorageService.exportOssStorageExcel(systemOssStorageService.queryOssStorage(criteria), response);
|
||||
}
|
||||
|
||||
@ApiOperation("上传文件")
|
||||
@Operation(summary = "上传文件")
|
||||
@PostMapping(value = "/uploadFile")
|
||||
@PreAuthorize("@el.check('storage:add')")
|
||||
public ResponseEntity<String> uploadFile(@RequestParam("file") MultipartFile file) {
|
||||
@@ -68,7 +68,7 @@ public class SystemOssStorageController {
|
||||
return ResponseEntity.ok(fileUrl);
|
||||
}
|
||||
|
||||
@ApiOperation("多选删除")
|
||||
@Operation(summary = "多选删除")
|
||||
@PostMapping(value = "/removeFileByIds")
|
||||
public ResponseEntity<Void> removeFileByIds(@RequestBody Long[] ids) {
|
||||
systemOssStorageService.removeFileByIds(ids);
|
||||
|
||||
+13
-13
@@ -26,8 +26,9 @@ import cn.odboy.system.dal.model.SystemQueryQuartzJobArgs;
|
||||
import cn.odboy.system.dal.model.SystemUpdateQuartzJobArgs;
|
||||
import cn.odboy.system.service.SystemQuartzJobService;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -35,19 +36,18 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Set;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/quartzJob")
|
||||
@Api(tags = "系统:定时任务管理")
|
||||
@Tag(name = "系统:定时任务管理")
|
||||
public class SystemQuartzJobController {
|
||||
@Autowired
|
||||
private SystemQuartzJobService systemQuartzJobService;
|
||||
|
||||
@ApiOperation("查询定时任务")
|
||||
@Operation(summary = "查询定时任务")
|
||||
@PostMapping
|
||||
@PreAuthorize("@el.check('quartzJob:list')")
|
||||
public ResponseEntity<CsPageResult<SystemQuartzJobTb>> queryQuartzJobByCrud(@Validated @RequestBody CsPageArgs<SystemQueryQuartzJobArgs> args) {
|
||||
@@ -56,21 +56,21 @@ public class SystemQuartzJobController {
|
||||
return ResponseEntity.ok(systemQuartzJobService.queryQuartzJobByArgs(criteria, page));
|
||||
}
|
||||
|
||||
@ApiOperation("导出任务数据")
|
||||
@Operation(summary = "导出任务数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('quartzJob:list')")
|
||||
public void exportQuartzJob(HttpServletResponse response, SystemQueryQuartzJobArgs criteria) throws IOException {
|
||||
systemQuartzJobService.exportQuartzJobExcel(systemQuartzJobService.queryQuartzJobByArgs(criteria), response);
|
||||
}
|
||||
|
||||
@ApiOperation("导出日志数据")
|
||||
@Operation(summary = "导出日志数据")
|
||||
@GetMapping(value = "/logs/download")
|
||||
@PreAuthorize("@el.check('quartzJob:list')")
|
||||
public void exportQuartzJobLog(HttpServletResponse response, SystemQueryQuartzJobArgs criteria) throws IOException {
|
||||
systemQuartzJobService.exportQuartzLogExcel(systemQuartzJobService.queryQuartzLogByArgs(criteria), response);
|
||||
}
|
||||
|
||||
@ApiOperation("查询任务执行日志")
|
||||
@Operation(summary = "查询任务执行日志")
|
||||
@PostMapping(value = "/logs")
|
||||
@PreAuthorize("@el.check('quartzJob:list')")
|
||||
public ResponseEntity<CsPageResult<SystemQuartzLogTb>> queryQuartzJobLog(SystemQueryQuartzJobArgs args) {
|
||||
@@ -78,7 +78,7 @@ public class SystemQuartzJobController {
|
||||
return ResponseEntity.ok(systemQuartzJobService.queryQuartzLogByArgs(args, page));
|
||||
}
|
||||
|
||||
@ApiOperation("新增定时任务")
|
||||
@Operation(summary = "新增定时任务")
|
||||
@PostMapping(value = "/createQuartzJob")
|
||||
@PreAuthorize("@el.check('quartzJob:add')")
|
||||
public ResponseEntity<Void> createQuartzJob(@Validated @RequestBody SystemQuartzJobTb args) {
|
||||
@@ -91,7 +91,7 @@ public class SystemQuartzJobController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("修改定时任务")
|
||||
@Operation(summary = "修改定时任务")
|
||||
@PutMapping
|
||||
@PreAuthorize("@el.check('quartzJob:edit')")
|
||||
public ResponseEntity<Void> updateQuartzJob(@Validated(SystemQuartzJobTb.Update.class) @RequestBody SystemUpdateQuartzJobArgs args) {
|
||||
@@ -101,7 +101,7 @@ public class SystemQuartzJobController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("更改定时任务状态")
|
||||
@Operation(summary = "更改定时任务状态")
|
||||
@PostMapping(value = "/switchQuartzJobStatus/{id}")
|
||||
@PreAuthorize("@el.check('quartzJob:edit')")
|
||||
public ResponseEntity<Void> switchQuartzJobStatus(@PathVariable Long id) {
|
||||
@@ -109,7 +109,7 @@ public class SystemQuartzJobController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("执行定时任务")
|
||||
@Operation(summary = "执行定时任务")
|
||||
@PostMapping(value = "/startQuartzJob/{id}")
|
||||
@PreAuthorize("@el.check('quartzJob:edit')")
|
||||
public ResponseEntity<Void> startQuartzJob(@PathVariable Long id) {
|
||||
@@ -117,7 +117,7 @@ public class SystemQuartzJobController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("删除定时任务")
|
||||
@Operation(summary = "删除定时任务")
|
||||
@PostMapping(value = "/removeJobByIds")
|
||||
@PreAuthorize("@el.check('quartzJob:del')")
|
||||
public ResponseEntity<Void> removeJobByIds(@RequestBody Set<Long> ids) {
|
||||
|
||||
+14
-17
@@ -26,15 +26,15 @@ import cn.odboy.system.dal.model.SystemQueryRoleArgs;
|
||||
import cn.odboy.system.framework.permission.core.CsSecurityHelper;
|
||||
import cn.odboy.system.service.SystemRoleService;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -42,34 +42,34 @@ import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "系统:角色管理")
|
||||
@Tag(name = "系统:角色管理")
|
||||
@RequestMapping("/api/role")
|
||||
public class SystemRoleController {
|
||||
@Autowired
|
||||
private SystemRoleService systemRoleService;
|
||||
|
||||
@ApiOperation("获取单个role")
|
||||
@Operation(summary = "获取单个role")
|
||||
@PostMapping(value = "/queryRoleById")
|
||||
@PreAuthorize("@el.check('roles:list')")
|
||||
public ResponseEntity<SystemRoleTb> queryRoleById(@RequestBody SystemRoleTb args) {
|
||||
return ResponseEntity.ok(systemRoleService.getRoleById(args.getId()));
|
||||
}
|
||||
|
||||
@ApiOperation("导出角色数据")
|
||||
@Operation(summary = "导出角色数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('role:list')")
|
||||
public void exportRole(HttpServletResponse response, SystemQueryRoleArgs criteria) throws IOException {
|
||||
systemRoleService.exportRoleExcel(systemRoleService.queryRoleByArgs(criteria), response);
|
||||
}
|
||||
|
||||
@ApiOperation("返回全部的角色")
|
||||
@Operation(summary = "返回全部的角色")
|
||||
@PostMapping(value = "/queryRoleList")
|
||||
@PreAuthorize("@el.check('roles:list','user:add','user:edit')")
|
||||
public ResponseEntity<List<SystemRoleTb>> queryRoleList() {
|
||||
return ResponseEntity.ok(systemRoleService.queryAllRole());
|
||||
}
|
||||
|
||||
@ApiOperation("查询角色")
|
||||
@Operation(summary = "查询角色")
|
||||
@PostMapping
|
||||
@PreAuthorize("@el.check('roles:list')")
|
||||
public ResponseEntity<CsPageResult<SystemRoleTb>> queryRoleByArgs(@Validated @RequestBody CsPageArgs<SystemQueryRoleArgs> args) {
|
||||
@@ -78,13 +78,13 @@ public class SystemRoleController {
|
||||
return ResponseEntity.ok(systemRoleService.queryRoleByArgs(criteria, page));
|
||||
}
|
||||
|
||||
@ApiOperation("获取用户级别")
|
||||
@Operation(summary = "获取用户级别")
|
||||
@PostMapping(value = "/queryRoleLevel")
|
||||
public ResponseEntity<Dict> queryRoleLevel() {
|
||||
return ResponseEntity.ok(Dict.create().set("level", checkRoleLevels(null)));
|
||||
}
|
||||
|
||||
@ApiOperation("新增角色")
|
||||
@Operation(summary = "新增角色")
|
||||
@PostMapping(value = "/saveRole")
|
||||
@PreAuthorize("@el.check('roles:add')")
|
||||
public ResponseEntity<Void> saveRole(@Validated @RequestBody SystemCreateRoleArgs args) {
|
||||
@@ -93,7 +93,7 @@ public class SystemRoleController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("修改角色")
|
||||
@Operation(summary = "修改角色")
|
||||
@PostMapping(value = "/modifyRoleById")
|
||||
@PreAuthorize("@el.check('roles:edit')")
|
||||
public ResponseEntity<Void> modifyRoleById(@Validated(SystemRoleTb.Update.class) @RequestBody SystemRoleTb args) {
|
||||
@@ -102,7 +102,7 @@ public class SystemRoleController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("修改角色菜单")
|
||||
@Operation(summary = "修改角色菜单")
|
||||
@PostMapping(value = "/modifyBindMenuById")
|
||||
@PreAuthorize("@el.check('roles:edit')")
|
||||
public ResponseEntity<Void> modifyBindMenuById(@RequestBody SystemRoleTb args) {
|
||||
@@ -112,7 +112,7 @@ public class SystemRoleController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("删除角色")
|
||||
@Operation(summary = "删除角色")
|
||||
@PostMapping(value = "/removeRoleByIds")
|
||||
@PreAuthorize("@el.check('roles:del')")
|
||||
public ResponseEntity<Void> removeRoleByIds(@RequestBody Set<Long> ids) {
|
||||
@@ -133,10 +133,7 @@ public class SystemRoleController {
|
||||
*/
|
||||
private int checkRoleLevels(Integer level) {
|
||||
List<Integer> levels =
|
||||
systemRoleService.queryRoleByUsersId(CsSecurityHelper.getCurrentUserId())
|
||||
.stream()
|
||||
.map(SystemRoleTb::getLevel)
|
||||
.collect(Collectors.toList());
|
||||
systemRoleService.queryRoleByUsersId(CsSecurityHelper.getCurrentUserId()).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList());
|
||||
int min = Collections.min(levels);
|
||||
if (level != null) {
|
||||
if (level < min) {
|
||||
|
||||
+21
-18
@@ -34,8 +34,9 @@ import cn.odboy.util.CsPageUtil;
|
||||
import cn.odboy.util.CsRsaEncryptUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -46,12 +47,11 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Api(tags = "系统:用户管理")
|
||||
@Tag(name = "系统:用户管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/user")
|
||||
public class SystemUserController {
|
||||
@@ -70,14 +70,14 @@ public class SystemUserController {
|
||||
@Autowired
|
||||
private AppProperties properties;
|
||||
|
||||
@ApiOperation("导出用户数据")
|
||||
@Operation(summary = "导出用户数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('user:list')")
|
||||
public void exportUserExcel(HttpServletResponse response, SystemQueryUserArgs criteria) throws IOException {
|
||||
systemUserService.exportUserExcel(systemUserService.queryUserByArgs(criteria), response);
|
||||
}
|
||||
|
||||
@ApiOperation("查询用户")
|
||||
@Operation(summary = "查询用户")
|
||||
@PostMapping
|
||||
@PreAuthorize("@el.check('user:list')")
|
||||
public ResponseEntity<CsPageResult<SystemUserTb>> queryUserByArgs(@Validated @RequestBody CsPageArgs<SystemQueryUserArgs> args) {
|
||||
@@ -107,7 +107,7 @@ public class SystemUserController {
|
||||
return ResponseEntity.ok(CsPageUtil.emptyData());
|
||||
}
|
||||
|
||||
@ApiOperation("新增用户")
|
||||
@Operation(summary = "新增用户")
|
||||
@PostMapping(value = "/saveUser")
|
||||
@PreAuthorize("@el.check('user:add')")
|
||||
public ResponseEntity<Object> saveUser(@Validated @RequestBody SystemUserTb args) {
|
||||
@@ -118,7 +118,7 @@ public class SystemUserController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("修改用户")
|
||||
@Operation(summary = "修改用户")
|
||||
@PostMapping(value = "/modifyUserById")
|
||||
@PreAuthorize("@el.check('user:edit')")
|
||||
public ResponseEntity<Object> modifyUserById(@Validated(SystemUserTb.Update.class) @RequestBody SystemUserTb args) {
|
||||
@@ -127,7 +127,7 @@ public class SystemUserController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("修改用户:个人中心")
|
||||
@Operation(summary = "修改用户:个人中心")
|
||||
@PostMapping(value = "modifyUserCenterInfoById")
|
||||
public ResponseEntity<Object> modifyUserCenterInfoById(@Validated(SystemUserTb.Update.class) @RequestBody SystemUserTb args) {
|
||||
if (!args.getId().equals(CsSecurityHelper.getCurrentUserId())) {
|
||||
@@ -137,12 +137,13 @@ public class SystemUserController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("删除用户")
|
||||
@Operation(summary = "删除用户")
|
||||
@PostMapping(value = "/removeUserByIds")
|
||||
@PreAuthorize("@el.check('user:del')")
|
||||
public ResponseEntity<Object> removeUserByIds(@RequestBody Set<Long> ids) {
|
||||
for (Long id : ids) {
|
||||
Integer currentLevel = Collections.min(systemRoleService.queryRoleByUsersId(CsSecurityHelper.getCurrentUserId()).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
||||
Integer currentLevel = Collections.min(
|
||||
systemRoleService.queryRoleByUsersId(CsSecurityHelper.getCurrentUserId()).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
||||
Integer optLevel = Collections.min(systemRoleService.queryRoleByUsersId(id).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
||||
if (currentLevel > optLevel) {
|
||||
throw new BadRequestException("角色权限不足, 不能删除:" + systemUserService.getUserById(id).getUsername());
|
||||
@@ -152,7 +153,7 @@ public class SystemUserController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("修改密码")
|
||||
@Operation(summary = "修改密码")
|
||||
@PostMapping(value = "/modifyUserPasswordByUsername")
|
||||
public ResponseEntity<Object> modifyUserPasswordByUsername(@RequestBody SystemUpdateUserPasswordArgs passVo) throws Exception {
|
||||
String oldPass = CsRsaEncryptUtil.decryptByPrivateKey(properties.getRsa().getPrivateKey(), passVo.getOldPass());
|
||||
@@ -168,7 +169,7 @@ public class SystemUserController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("重置密码")
|
||||
@Operation(summary = "重置密码")
|
||||
@PostMapping(value = "/resetUserPasswordByIds")
|
||||
public ResponseEntity<Object> resetUserPasswordByIds(@RequestBody Set<Long> ids) {
|
||||
String defaultPwd = passwordEncoder.encode("123456");
|
||||
@@ -176,13 +177,13 @@ public class SystemUserController {
|
||||
return ResponseEntity.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation("修改头像")
|
||||
@Operation(summary = "修改头像")
|
||||
@PostMapping(value = "/modifyUserAvatar")
|
||||
public ResponseEntity<Object> modifyUserAvatar(@RequestParam MultipartFile avatar) {
|
||||
return ResponseEntity.ok(systemUserService.modifyUserAvatar(avatar));
|
||||
}
|
||||
|
||||
@ApiOperation("修改邮箱")
|
||||
@Operation(summary = "修改邮箱")
|
||||
@PostMapping(value = "/modifyUserEmailByUsername/{code}")
|
||||
public ResponseEntity<Object> modifyUserEmailByUsername(@PathVariable String code, @RequestBody SystemUserTb args) throws Exception {
|
||||
String password = CsRsaEncryptUtil.decryptByPrivateKey(properties.getRsa().getPrivateKey(), args.getPassword());
|
||||
@@ -201,14 +202,15 @@ public class SystemUserController {
|
||||
* @param args /
|
||||
*/
|
||||
private void checkLevel(SystemUserTb args) {
|
||||
Integer currentLevel = Collections.min(systemRoleService.queryRoleByUsersId(CsSecurityHelper.getCurrentUserId()).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
||||
Integer currentLevel = Collections.min(
|
||||
systemRoleService.queryRoleByUsersId(CsSecurityHelper.getCurrentUserId()).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
||||
Integer optLevel = systemRoleService.getDeptLevelByRoles(args.getRoles());
|
||||
if (currentLevel > optLevel) {
|
||||
throw new BadRequestException("角色权限不足");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("查询用户基础数据")
|
||||
@Operation(summary = "查询用户基础数据")
|
||||
@PostMapping(value = "/queryUserMetadataOptions")
|
||||
@PreAuthorize("@el.check('user:list')")
|
||||
public ResponseEntity<List<CsSelectOptionVo>> queryUserMetadataOptions(@Validated @RequestBody CsPageArgs<SystemQueryUserArgs> args) {
|
||||
@@ -224,7 +226,8 @@ public class SystemUserController {
|
||||
c.or();
|
||||
c.like(SystemUserTb::getNickName, criteria.getBlurry());
|
||||
});
|
||||
List<CsSelectOptionVo> collect = systemUserService.queryUserByBlurry(wrapper, new Page<>(criteria.getPage(), maxPageSize)).getRecords().stream().map(m -> {
|
||||
List<CsSelectOptionVo> collect =
|
||||
systemUserService.queryUserByBlurry(wrapper, new Page<>(criteria.getPage(), maxPageSize)).getRecords().stream().map(m -> {
|
||||
Map<String, Object> ext = new HashMap<>(1);
|
||||
ext.put("id", m.getId());
|
||||
ext.put("deptId", m.getDeptId());
|
||||
|
||||
+15
-15
@@ -22,12 +22,12 @@ 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 io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
@@ -39,33 +39,33 @@ public class SystemDeptTb extends CsBaseUserTimeTb {
|
||||
|
||||
@NotNull(groups = Update.class)
|
||||
@TableId(value = "dept_id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
@Schema(name ="ID", hidden = true)
|
||||
private Long id;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JSONField(serialize = false)
|
||||
@ApiModelProperty(value = "角色")
|
||||
@Schema(name ="角色")
|
||||
private Set<SystemRoleTb> roles;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "子部门")
|
||||
@Schema(name ="子部门")
|
||||
private List<SystemDeptTb> children;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
@Schema(name ="排序")
|
||||
private Integer deptSort;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
@Schema(name ="部门名称")
|
||||
private String name;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "是否启用")
|
||||
@Schema(name ="是否启用")
|
||||
private Boolean enabled;
|
||||
|
||||
@ApiModelProperty(value = "上级部门")
|
||||
@Schema(name ="上级部门")
|
||||
private Long pid;
|
||||
|
||||
@ApiModelProperty(value = "子节点数目", hidden = true)
|
||||
@Schema(name ="子节点数目", hidden = true)
|
||||
private Integer subCount = 0;
|
||||
|
||||
@Override
|
||||
@@ -76,7 +76,7 @@ public class SystemDeptTb extends CsBaseUserTimeTb {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SystemDeptTb dept = (SystemDeptTb) o;
|
||||
SystemDeptTb dept = (SystemDeptTb)o;
|
||||
return Objects.equals(id, dept.id) && Objects.equals(name, dept.name);
|
||||
}
|
||||
|
||||
@@ -85,17 +85,17 @@ public class SystemDeptTb extends CsBaseUserTimeTb {
|
||||
return Objects.hash(id, name);
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "是否有子节点")
|
||||
@Schema(name ="是否有子节点")
|
||||
public Boolean getHasChildren() {
|
||||
return subCount > 0;
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "是否为叶子")
|
||||
@Schema(name ="是否为叶子")
|
||||
public Boolean getLeaf() {
|
||||
return subCount <= 0;
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "标签名称")
|
||||
@Schema(name ="标签名称")
|
||||
public String getLabel() {
|
||||
return name;
|
||||
}
|
||||
|
||||
+8
-9
@@ -21,36 +21,35 @@ 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 io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("system_dict_detail")
|
||||
public class SystemDictDetailTb extends CsBaseUserTimeTb {
|
||||
|
||||
@NotNull(groups = Update.class)
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
@Schema(name = "ID", hidden = true)
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@TableField(value = "dict_id")
|
||||
@ApiModelProperty(hidden = true)
|
||||
@Schema(hidden = true)
|
||||
private Long dictId;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "字典")
|
||||
@Schema(name = "字典")
|
||||
private SystemDictTb dict;
|
||||
|
||||
@ApiModelProperty(value = "字典标签")
|
||||
@Schema(name = "字典标签")
|
||||
private String label;
|
||||
|
||||
@ApiModelProperty(value = "字典值")
|
||||
@Schema(name = "字典值")
|
||||
private String value;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
@Schema(name = "排序")
|
||||
private Integer dictSort = 999;
|
||||
}
|
||||
+6
-7
@@ -18,12 +18,11 @@ package cn.odboy.system.dal.dataobject;
|
||||
|
||||
import cn.odboy.base.CsBaseUserTimeTb;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -31,15 +30,15 @@ import jakarta.validation.constraints.NotNull;
|
||||
public class SystemDictTb extends CsBaseUserTimeTb {
|
||||
|
||||
@NotNull(groups = Update.class)
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
@Schema(name ="ID", hidden = true)
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "名称")
|
||||
@Schema(name ="名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
@Schema(name ="描述")
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String description;
|
||||
}
|
||||
+7
-8
@@ -19,12 +19,11 @@ package cn.odboy.system.dal.dataobject;
|
||||
import cn.odboy.base.CsObject;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 邮件配置类,数据存覆盖式存入数据存
|
||||
*/
|
||||
@@ -37,22 +36,22 @@ public class SystemEmailConfigTb extends CsObject {
|
||||
private Long id;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "邮件服务器SMTP地址")
|
||||
@Schema(name ="邮件服务器SMTP地址")
|
||||
private String host;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "邮件服务器 SMTP 端口")
|
||||
@Schema(name ="邮件服务器 SMTP 端口")
|
||||
private String port;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "发件者用户名")
|
||||
@Schema(name ="发件者用户名")
|
||||
private String user;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "密码")
|
||||
@Schema(name ="密码")
|
||||
private String password;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "收件人")
|
||||
@Schema(name ="收件人")
|
||||
private String fromUser;
|
||||
}
|
||||
|
||||
+8
-8
@@ -20,12 +20,12 @@ import cn.odboy.base.CsBaseUserTimeTb;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Objects;
|
||||
|
||||
@Getter
|
||||
@@ -35,19 +35,19 @@ public class SystemJobTb extends CsBaseUserTimeTb {
|
||||
|
||||
@NotNull(groups = Update.class)
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
@Schema(name ="ID", hidden = true)
|
||||
private Long id;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "岗位名称")
|
||||
@Schema(name ="岗位名称")
|
||||
private String name;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "岗位排序")
|
||||
@Schema(name ="岗位排序")
|
||||
private Long jobSort;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "是否启用")
|
||||
@Schema(name ="是否启用")
|
||||
private Boolean enabled;
|
||||
|
||||
@Override
|
||||
@@ -58,7 +58,7 @@ public class SystemJobTb extends CsBaseUserTimeTb {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SystemJobTb job = (SystemJobTb) o;
|
||||
SystemJobTb job = (SystemJobTb)o;
|
||||
return Objects.equals(id, job.id);
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -22,7 +22,7 @@ import cn.odboy.base.CsBaseUserTimeTb;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -32,28 +32,28 @@ import lombok.Setter;
|
||||
public class SystemLocalStorageTb extends CsBaseUserTimeTb {
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
@Schema(name ="ID", hidden = true)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "真实文件名")
|
||||
@Schema(name ="真实文件名")
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty(value = "文件名")
|
||||
@Schema(name ="文件名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "后缀")
|
||||
@Schema(name ="后缀")
|
||||
private String suffix;
|
||||
|
||||
@ApiModelProperty(value = "路径")
|
||||
@Schema(name ="路径")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
@Schema(name ="类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "大小")
|
||||
@Schema(name ="大小")
|
||||
private String size;
|
||||
|
||||
@ApiModelProperty(value = "日期分组")
|
||||
@Schema(name ="日期分组")
|
||||
private String dateGroup;
|
||||
|
||||
public void copy(SystemLocalStorageTb source) {
|
||||
|
||||
+21
-21
@@ -22,11 +22,11 @@ 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 io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
@@ -38,55 +38,55 @@ public class SystemMenuTb extends CsBaseUserTimeTb {
|
||||
|
||||
@NotNull(groups = {Update.class})
|
||||
@TableId(value = "menu_id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
@Schema(name ="ID", hidden = true)
|
||||
private Long id;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JSONField(serialize = false)
|
||||
@ApiModelProperty(value = "菜单角色")
|
||||
@Schema(name ="菜单角色")
|
||||
private Set<SystemRoleTb> roles;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<SystemMenuTb> children;
|
||||
|
||||
@ApiModelProperty(value = "菜单标题")
|
||||
@Schema(name ="菜单标题")
|
||||
private String title;
|
||||
|
||||
@TableField(value = "name")
|
||||
@ApiModelProperty(value = "菜单组件名称")
|
||||
@Schema(name ="菜单组件名称")
|
||||
private String componentName;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
@Schema(name ="排序")
|
||||
private Integer menuSort = 999;
|
||||
|
||||
@ApiModelProperty(value = "组件路径")
|
||||
@Schema(name ="组件路径")
|
||||
private String component;
|
||||
|
||||
@ApiModelProperty(value = "路由地址")
|
||||
@Schema(name ="路由地址")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty(value = "菜单类型,目录、菜单、按钮")
|
||||
@Schema(name ="菜单类型,目录、菜单、按钮")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "权限标识")
|
||||
@Schema(name ="权限标识")
|
||||
private String permission;
|
||||
|
||||
@ApiModelProperty(value = "菜单图标")
|
||||
@Schema(name ="菜单图标")
|
||||
private String icon;
|
||||
|
||||
@ApiModelProperty(value = "缓存")
|
||||
@Schema(name ="缓存")
|
||||
private Boolean cache;
|
||||
|
||||
@ApiModelProperty(value = "是否隐藏")
|
||||
@Schema(name ="是否隐藏")
|
||||
private Boolean hidden;
|
||||
|
||||
@ApiModelProperty(value = "上级菜单")
|
||||
@Schema(name ="上级菜单")
|
||||
private Long pid;
|
||||
|
||||
@ApiModelProperty(value = "子节点数目", hidden = true)
|
||||
@Schema(name ="子节点数目", hidden = true)
|
||||
private Integer subCount = 0;
|
||||
|
||||
@ApiModelProperty(value = "外链菜单")
|
||||
@Schema(name ="外链菜单")
|
||||
private Boolean iFrame;
|
||||
|
||||
@Override
|
||||
@@ -97,7 +97,7 @@ public class SystemMenuTb extends CsBaseUserTimeTb {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SystemMenuTb menu = (SystemMenuTb) o;
|
||||
SystemMenuTb menu = (SystemMenuTb)o;
|
||||
return Objects.equals(id, menu.id);
|
||||
}
|
||||
|
||||
@@ -106,17 +106,17 @@ public class SystemMenuTb extends CsBaseUserTimeTb {
|
||||
return Objects.hash(id);
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "是否有子节点")
|
||||
@Schema(name ="是否有子节点")
|
||||
public Boolean getHasChildren() {
|
||||
return subCount > 0;
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "是否为叶子")
|
||||
@Schema(name ="是否为叶子")
|
||||
public Boolean getLeaf() {
|
||||
return subCount <= 0;
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "标签名称")
|
||||
@Schema(name ="标签名称")
|
||||
public String getLabel() {
|
||||
return title;
|
||||
}
|
||||
|
||||
+3
-4
@@ -18,8 +18,7 @@ package cn.odboy.system.dal.dataobject;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
@@ -38,13 +37,13 @@ import java.util.Date;
|
||||
@Setter
|
||||
@ToString
|
||||
@TableName("system_operation_log")
|
||||
@ApiModel(value = "SystemOperationLog对象", description = "审计日志")
|
||||
@Schema(name = "SystemOperationLog对象", description = "审计日志")
|
||||
public class SystemOperationLogTb extends CsObject {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty("id")
|
||||
@Schema(name = "id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
|
||||
+15
-16
@@ -21,8 +21,7 @@ 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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -37,45 +36,45 @@ import lombok.Setter;
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("system_oss_storage")
|
||||
@ApiModel(value = "SystemOssStorage对象", description = "OSS存储")
|
||||
@Schema(name = "SystemOssStorage对象", description = "OSS存储")
|
||||
public class SystemOssStorageTb extends CsBaseUserTimeTb {
|
||||
@ApiModelProperty("ID")
|
||||
@Schema(name="ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@TableField("service_type")
|
||||
@ApiModelProperty("类型,比如minio")
|
||||
@Schema(name="类型,比如minio")
|
||||
private String serviceType;
|
||||
@TableField("endpoint")
|
||||
@ApiModelProperty("服务地址")
|
||||
@Schema(name="服务地址")
|
||||
private String endpoint;
|
||||
@TableField("bucket_name")
|
||||
@ApiModelProperty("存储桶名称")
|
||||
@Schema(name="存储桶名称")
|
||||
private String bucketName;
|
||||
@TableField("file_name")
|
||||
@ApiModelProperty("完整文件名称")
|
||||
@Schema(name="完整文件名称")
|
||||
private String fileName;
|
||||
@TableField("file_size")
|
||||
@ApiModelProperty("文件大小, 单位:字节")
|
||||
@Schema(name="文件大小, 单位:字节")
|
||||
private Long fileSize;
|
||||
@TableField("file_mime")
|
||||
@ApiModelProperty("文件类型")
|
||||
@Schema(name="文件类型")
|
||||
private String fileMime;
|
||||
@ApiModelProperty("短文件名")
|
||||
@Schema(name="短文件名")
|
||||
@TableField("file_prefix")
|
||||
private String filePrefix;
|
||||
@ApiModelProperty("文件后缀")
|
||||
@Schema(name="文件后缀")
|
||||
@TableField("file_suffix")
|
||||
private String fileSuffix;
|
||||
@TableField("file_md5")
|
||||
@ApiModelProperty("文件md5")
|
||||
@Schema(name="文件md5")
|
||||
private String fileMd5;
|
||||
@TableField("file_url")
|
||||
@ApiModelProperty("文件链接")
|
||||
@Schema(name="文件链接")
|
||||
private String fileUrl;
|
||||
@TableField("file_code")
|
||||
@ApiModelProperty("文件编码")
|
||||
@Schema(name="文件编码")
|
||||
private String fileCode;
|
||||
@TableField("object_name")
|
||||
@ApiModelProperty("对象路径")
|
||||
@Schema(name="对象路径")
|
||||
private String objectName;
|
||||
}
|
||||
|
||||
+15
-16
@@ -18,12 +18,11 @@ package cn.odboy.system.dal.dataobject;
|
||||
|
||||
import cn.odboy.base.CsBaseUserTimeTb;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -37,44 +36,44 @@ public class SystemQuartzJobTb extends CsBaseUserTimeTb {
|
||||
private Long id;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "用于子任务唯一标识", hidden = true)
|
||||
@Schema(name = "用于子任务唯一标识", hidden = true)
|
||||
private String uuid;
|
||||
|
||||
@ApiModelProperty(value = "定时器名称")
|
||||
@Schema(name = "定时器名称")
|
||||
private String jobName;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "Bean名称")
|
||||
@Schema(name = "Bean名称")
|
||||
private String beanName;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "方法名称")
|
||||
@Schema(name = "方法名称")
|
||||
private String methodName;
|
||||
|
||||
@ApiModelProperty(value = "参数")
|
||||
@Schema(name = "参数")
|
||||
private String params;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "cron表达式")
|
||||
@Schema(name = "cron表达式")
|
||||
private String cronExpression;
|
||||
|
||||
@ApiModelProperty(value = "状态:暂停或启动")
|
||||
@Schema(name = "状态:暂停或启动")
|
||||
private Boolean isPause = false;
|
||||
|
||||
@ApiModelProperty(value = "负责人")
|
||||
@Schema(name = "负责人")
|
||||
private String personInCharge;
|
||||
|
||||
@ApiModelProperty(value = "报警邮箱")
|
||||
@Schema(name = "报警邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "子任务")
|
||||
@Schema(name = "子任务")
|
||||
private String subTask;
|
||||
|
||||
@ApiModelProperty(value = "失败后暂停")
|
||||
@Schema(name = "失败后暂停")
|
||||
private Boolean pauseAfterFailure;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(name = "备注")
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String description;
|
||||
}
|
||||
+11
-11
@@ -18,7 +18,7 @@ package cn.odboy.system.dal.dataobject;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -30,34 +30,34 @@ import java.util.Date;
|
||||
public class SystemQuartzLogTb extends CsObject {
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
@Schema(name = "ID", hidden = true)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "任务名称", hidden = true)
|
||||
@Schema(name = "任务名称", hidden = true)
|
||||
private String jobName;
|
||||
|
||||
@ApiModelProperty(value = "bean名称", hidden = true)
|
||||
@Schema(name = "bean名称", hidden = true)
|
||||
private String beanName;
|
||||
|
||||
@ApiModelProperty(value = "方法名称", hidden = true)
|
||||
@Schema(name = "方法名称", hidden = true)
|
||||
private String methodName;
|
||||
|
||||
@ApiModelProperty(value = "参数", hidden = true)
|
||||
@Schema(name = "参数", hidden = true)
|
||||
private String params;
|
||||
|
||||
@ApiModelProperty(value = "cron表达式", hidden = true)
|
||||
@Schema(name = "cron表达式", hidden = true)
|
||||
private String cronExpression;
|
||||
|
||||
@ApiModelProperty(value = "状态", hidden = true)
|
||||
@Schema(name = "状态", hidden = true)
|
||||
private Boolean isSuccess;
|
||||
|
||||
@ApiModelProperty(value = "异常详情", hidden = true)
|
||||
@Schema(name = "异常详情", hidden = true)
|
||||
private String exceptionDetail;
|
||||
|
||||
@ApiModelProperty(value = "执行耗时", hidden = true)
|
||||
@Schema(name = "执行耗时", hidden = true)
|
||||
private Long time;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
@Schema(name = "创建时间", hidden = true)
|
||||
private Date createTime;
|
||||
}
|
||||
|
||||
+11
-11
@@ -19,12 +19,12 @@ package cn.odboy.system.dal.dataobject;
|
||||
import cn.odboy.base.CsBaseUserTimeTb;
|
||||
import cn.odboy.system.constant.SystemDataScopeEnum;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -38,32 +38,32 @@ public class SystemRoleTb extends CsBaseUserTimeTb {
|
||||
|
||||
@NotNull(groups = {Update.class})
|
||||
@TableId(value = "role_id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
@Schema(name = "ID", hidden = true)
|
||||
private Long id;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "用户", hidden = true)
|
||||
@Schema(name = "用户", hidden = true)
|
||||
private Set<SystemUserTb> users;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "菜单", hidden = true)
|
||||
@Schema(name = "菜单", hidden = true)
|
||||
private Set<SystemMenuTb> menus;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "部门", hidden = true)
|
||||
@Schema(name = "部门", hidden = true)
|
||||
private Set<SystemDeptTb> depts;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "名称", hidden = true)
|
||||
@Schema(name = "名称", hidden = true)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "数据权限,全部 、 本级 、 自定义")
|
||||
@Schema(name = "数据权限,全部 、 本级 、 自定义")
|
||||
private String dataScope = SystemDataScopeEnum.THIS_LEVEL.getValue();
|
||||
|
||||
@ApiModelProperty(value = "级别,数值越小,级别越大")
|
||||
@Schema(name = "级别,数值越小,级别越大")
|
||||
private Integer level = 3;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
@Schema(name = "描述")
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String description;
|
||||
|
||||
|
||||
+20
-20
@@ -21,13 +21,13 @@ 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 io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
@@ -39,62 +39,62 @@ public class SystemUserTb extends CsBaseUserTimeTb {
|
||||
|
||||
@NotNull(groups = Update.class)
|
||||
@TableId(value = "user_id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
@Schema(name = "ID", hidden = true)
|
||||
private Long id;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "用户角色")
|
||||
@Schema(name = "用户角色")
|
||||
private Set<SystemRoleTb> roles;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "用户岗位")
|
||||
@Schema(name = "用户岗位")
|
||||
private Set<SystemJobTb> jobs;
|
||||
|
||||
@TableField(value = "dept_id")
|
||||
@ApiModelProperty(hidden = true)
|
||||
@Schema(hidden = true)
|
||||
private Long deptId;
|
||||
|
||||
@ApiModelProperty(value = "用户部门")
|
||||
@Schema(name = "用户部门")
|
||||
@TableField(exist = false)
|
||||
private SystemDeptTb dept;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "用户名称")
|
||||
@Schema(name = "用户名称")
|
||||
private String username;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
@Schema(name = "用户昵称")
|
||||
private String nickName;
|
||||
|
||||
@Email
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
@Schema(name = "邮箱")
|
||||
private String email;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "电话号码")
|
||||
@Schema(name = "电话号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "用户性别")
|
||||
@Schema(name = "用户性别")
|
||||
private String gender;
|
||||
|
||||
@ApiModelProperty(value = "头像真实名称", hidden = true)
|
||||
@Schema(name = "头像真实名称", hidden = true)
|
||||
private String avatarName;
|
||||
|
||||
@ApiModelProperty(value = "头像存储的路径", hidden = true)
|
||||
@Schema(name = "头像存储的路径", hidden = true)
|
||||
private String avatarPath;
|
||||
|
||||
@ApiModelProperty(value = "密码")
|
||||
@Schema(name = "密码")
|
||||
private String password;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "是否启用")
|
||||
@Schema(name = "是否启用")
|
||||
private Boolean enabled;
|
||||
|
||||
@ApiModelProperty(value = "是否为admin账号", hidden = true)
|
||||
@Schema(name = "是否为admin账号", hidden = true)
|
||||
private Boolean isAdmin = false;
|
||||
|
||||
@ApiModelProperty(value = "最后修改密码的时间", hidden = true)
|
||||
@Schema(name = "最后修改密码的时间", hidden = true)
|
||||
private Date pwdResetTime;
|
||||
|
||||
@Override
|
||||
|
||||
+1
-2
@@ -17,11 +17,10 @@
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class SystemCheckEmailCaptchaArgs extends CsObject {
|
||||
|
||||
+2
-3
@@ -17,11 +17,10 @@
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
|
||||
+1
-2
@@ -17,11 +17,10 @@
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class SystemCreateDictArgs extends CsObject {
|
||||
|
||||
+2
-3
@@ -18,11 +18,10 @@ package cn.odboy.system.dal.model;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import cn.odboy.system.dal.dataobject.SystemDictTb;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
|
||||
+2
-3
@@ -17,11 +17,10 @@
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
|
||||
+2
-2
@@ -18,11 +18,11 @@ package cn.odboy.system.dal.model;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import cn.odboy.system.dal.dataobject.SystemDeptTb;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
|
||||
+4
-4
@@ -17,7 +17,7 @@
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -27,12 +27,12 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class SystemMenuMetaVo extends CsObject {
|
||||
|
||||
@ApiModelProperty(value = "菜单标题")
|
||||
@Schema(name = "菜单标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "菜单图标")
|
||||
@Schema(name = "菜单图标")
|
||||
private String icon;
|
||||
|
||||
@ApiModelProperty(value = "缓存")
|
||||
@Schema(name = "缓存")
|
||||
private Boolean noCache;
|
||||
}
|
||||
|
||||
+9
-9
@@ -17,7 +17,7 @@
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -30,27 +30,27 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class SystemMenuVo extends CsObject {
|
||||
|
||||
@ApiModelProperty(value = "菜单名称")
|
||||
@Schema(name = "菜单名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "路径")
|
||||
@Schema(name = "路径")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty(value = "隐藏状态")
|
||||
@Schema(name = "隐藏状态")
|
||||
private Boolean hidden;
|
||||
|
||||
@ApiModelProperty(value = "重定向")
|
||||
@Schema(name = "重定向")
|
||||
private String redirect;
|
||||
|
||||
@ApiModelProperty(value = "组件")
|
||||
@Schema(name = "组件")
|
||||
private String component;
|
||||
|
||||
@ApiModelProperty(value = "总是显示")
|
||||
@Schema(name = "总是显示")
|
||||
private Boolean alwaysShow;
|
||||
|
||||
@ApiModelProperty(value = "元数据")
|
||||
@Schema(name = "元数据")
|
||||
private SystemMenuMetaVo meta;
|
||||
|
||||
@ApiModelProperty(value = "子路由")
|
||||
@Schema(name = "子路由")
|
||||
private List<SystemMenuVo> children;
|
||||
}
|
||||
|
||||
+7
-7
@@ -16,7 +16,7 @@
|
||||
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -25,21 +25,21 @@ import java.util.List;
|
||||
@Data
|
||||
public class SystemQueryDeptArgs {
|
||||
|
||||
@ApiModelProperty(value = "部门id集合")
|
||||
@Schema(name = "部门id集合")
|
||||
private List<Long> ids;
|
||||
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
@Schema(name = "部门名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "是否启用")
|
||||
@Schema(name = "是否启用")
|
||||
private Boolean enabled;
|
||||
|
||||
@ApiModelProperty(value = "上级部门")
|
||||
@Schema(name = "上级部门")
|
||||
private Long pid;
|
||||
|
||||
@ApiModelProperty(value = "PID为空查询")
|
||||
@Schema(name = "PID为空查询")
|
||||
private Boolean pidIsNull;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(name = "创建时间")
|
||||
private List<Date> createTime;
|
||||
}
|
||||
|
||||
+4
-4
@@ -16,18 +16,18 @@
|
||||
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SystemQueryDictArgs {
|
||||
|
||||
@ApiModelProperty(value = "模糊查询")
|
||||
@Schema(name = "模糊查询")
|
||||
private String blurry;
|
||||
|
||||
@ApiModelProperty(value = "页码", example = "1")
|
||||
@Schema(name = "页码", example = "1")
|
||||
private Integer page = 1;
|
||||
|
||||
@ApiModelProperty(value = "每页数据量", example = "10")
|
||||
@Schema(name = "每页数据量", example = "10")
|
||||
private Integer size = 10;
|
||||
}
|
||||
|
||||
+3
-3
@@ -17,16 +17,16 @@
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class SystemQueryDictDetailArgs extends CsObject {
|
||||
@ApiModelProperty(value = "标签")
|
||||
@Schema(name = "标签")
|
||||
private String label;
|
||||
|
||||
@ApiModelProperty(value = "字典名称")
|
||||
@Schema(name = "字典名称")
|
||||
private String dictName;
|
||||
}
|
||||
+6
-6
@@ -16,7 +16,7 @@
|
||||
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@@ -27,18 +27,18 @@ import java.util.List;
|
||||
@NoArgsConstructor
|
||||
public class SystemQueryJobArgs {
|
||||
|
||||
@ApiModelProperty(value = "岗位名称")
|
||||
@Schema(name = "岗位名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "是否启用")
|
||||
@Schema(name = "是否启用")
|
||||
private Boolean enabled;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(name = "创建时间")
|
||||
private List<Date> createTime;
|
||||
|
||||
@ApiModelProperty(value = "页码", example = "1")
|
||||
@Schema(name = "页码", example = "1")
|
||||
private Integer page = 1;
|
||||
|
||||
@ApiModelProperty(value = "每页数据量", example = "10")
|
||||
@Schema(name = "每页数据量", example = "10")
|
||||
private Integer size = 10;
|
||||
}
|
||||
|
||||
+5
-5
@@ -16,7 +16,7 @@
|
||||
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -25,15 +25,15 @@ import java.util.List;
|
||||
@Data
|
||||
public class SystemQueryMenuArgs {
|
||||
|
||||
@ApiModelProperty(value = "模糊查询")
|
||||
@Schema(name = "模糊查询")
|
||||
private String blurry;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(name = "创建时间")
|
||||
private List<Date> createTime;
|
||||
|
||||
@ApiModelProperty(value = "PID为空查询")
|
||||
@Schema(name = "PID为空查询")
|
||||
private Boolean pidIsNull;
|
||||
|
||||
@ApiModelProperty(value = "PID")
|
||||
@Schema(name = "PID")
|
||||
private Long pid;
|
||||
}
|
||||
|
||||
+6
-6
@@ -16,7 +16,7 @@
|
||||
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -25,18 +25,18 @@ import java.util.List;
|
||||
@Data
|
||||
public class SystemQueryQuartzJobArgs {
|
||||
|
||||
@ApiModelProperty(value = "定时任务名称")
|
||||
@Schema(name = "定时任务名称")
|
||||
private String jobName;
|
||||
|
||||
@ApiModelProperty(value = "是否成功")
|
||||
@Schema(name = "是否成功")
|
||||
private Boolean isSuccess;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(name = "创建时间")
|
||||
private List<Date> createTime;
|
||||
|
||||
@ApiModelProperty(value = "页码", example = "1")
|
||||
@Schema(name = "页码", example = "1")
|
||||
private Integer page = 1;
|
||||
|
||||
@ApiModelProperty(value = "每页数据量", example = "10")
|
||||
@Schema(name = "每页数据量", example = "10")
|
||||
private Integer size = 10;
|
||||
}
|
||||
|
||||
+6
-6
@@ -16,7 +16,7 @@
|
||||
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -25,18 +25,18 @@ import java.util.List;
|
||||
@Data
|
||||
public class SystemQueryRoleArgs {
|
||||
|
||||
@ApiModelProperty(value = "模糊查询")
|
||||
@Schema(name = "模糊查询")
|
||||
private String blurry;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(name = "创建时间")
|
||||
private List<Date> createTime;
|
||||
|
||||
@ApiModelProperty(value = "页码", example = "1")
|
||||
@Schema(name = "页码", example = "1")
|
||||
private Integer page = 1;
|
||||
|
||||
@ApiModelProperty(value = "每页数据量", example = "10")
|
||||
@Schema(name = "每页数据量", example = "10")
|
||||
private Integer size = 10;
|
||||
|
||||
@ApiModelProperty(value = "偏移量", hidden = true)
|
||||
@Schema(name = "偏移量", hidden = true)
|
||||
private long offset;
|
||||
}
|
||||
|
||||
+5
-5
@@ -16,7 +16,7 @@
|
||||
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -25,15 +25,15 @@ import java.util.List;
|
||||
@Data
|
||||
public class SystemQueryStorageArgs {
|
||||
|
||||
@ApiModelProperty(value = "模糊查询")
|
||||
@Schema(name = "模糊查询")
|
||||
private String blurry;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(name = "创建时间")
|
||||
private List<Date> createTime;
|
||||
|
||||
@ApiModelProperty(value = "页码", example = "1")
|
||||
@Schema(name = "页码", example = "1")
|
||||
private Integer page = 1;
|
||||
|
||||
@ApiModelProperty(value = "每页数据量", example = "10")
|
||||
@Schema(name = "每页数据量", example = "10")
|
||||
private Integer size = 10;
|
||||
}
|
||||
|
||||
+9
-9
@@ -17,7 +17,7 @@
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -30,27 +30,27 @@ import java.util.Set;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class SystemQueryUserArgs extends CsObject {
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(name = "ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "多个ID")
|
||||
@Schema(name = "多个ID")
|
||||
private Set<Long> deptIds = new HashSet<>();
|
||||
|
||||
@ApiModelProperty(value = "模糊查询")
|
||||
@Schema(name = "模糊查询")
|
||||
private String blurry;
|
||||
|
||||
@ApiModelProperty(value = "是否启用")
|
||||
@Schema(name = "是否启用")
|
||||
private Boolean enabled;
|
||||
|
||||
@ApiModelProperty(value = "部门ID")
|
||||
@Schema(name = "部门ID")
|
||||
private Long deptId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(name = "创建时间")
|
||||
private List<Date> createTime;
|
||||
|
||||
@ApiModelProperty(value = "页码", example = "1")
|
||||
@Schema(name = "页码", example = "1")
|
||||
private Integer page = 1;
|
||||
|
||||
@ApiModelProperty(value = "每页数据量", example = "10")
|
||||
@Schema(name = "每页数据量", example = "10")
|
||||
private Integer size = 10;
|
||||
}
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -30,6 +30,6 @@ import org.springframework.security.core.GrantedAuthority;
|
||||
@AllArgsConstructor
|
||||
public class SystemRoleCodeVo implements GrantedAuthority {
|
||||
|
||||
@ApiModelProperty(value = "角色名")
|
||||
@Schema(name = "角色名")
|
||||
private String authority;
|
||||
}
|
||||
|
||||
+6
-6
@@ -16,13 +16,13 @@
|
||||
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -34,14 +34,14 @@ import java.util.List;
|
||||
public class SystemSendEmailArgs {
|
||||
|
||||
@NotEmpty
|
||||
@ApiModelProperty(value = "收件人")
|
||||
@Schema(name = "收件人")
|
||||
private List<String> tos;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "主题")
|
||||
@Schema(name = "主题")
|
||||
private String subject;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "内容")
|
||||
@Schema(name = "内容")
|
||||
private String content;
|
||||
}
|
||||
|
||||
+12
-12
@@ -21,7 +21,7 @@ import cn.odboy.system.dal.dataobject.SystemDeptTb;
|
||||
import cn.odboy.system.dal.dataobject.SystemJobTb;
|
||||
import cn.odboy.system.dal.dataobject.SystemRoleTb;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -30,29 +30,29 @@ import java.util.Set;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class SystemSimpleUserVo extends CsObject {
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
@Schema(name = "ID", hidden = true)
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "用户角色")
|
||||
@Schema(name = "用户角色")
|
||||
private Set<SystemRoleTb> roles;
|
||||
@ApiModelProperty(value = "用户岗位")
|
||||
@Schema(name = "用户岗位")
|
||||
private Set<SystemJobTb> jobs;
|
||||
private Long deptId;
|
||||
@TableField(exist = false)
|
||||
private SystemDeptTb dept;
|
||||
@ApiModelProperty(value = "用户名称")
|
||||
@Schema(name = "用户名称")
|
||||
private String username;
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
@Schema(name = "用户昵称")
|
||||
private String nickName;
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
@Schema(name = "邮箱")
|
||||
private String email;
|
||||
@ApiModelProperty(value = "电话号码")
|
||||
@Schema(name = "电话号码")
|
||||
private String phone;
|
||||
@ApiModelProperty(value = "用户性别")
|
||||
@Schema(name = "用户性别")
|
||||
private String gender;
|
||||
@ApiModelProperty(value = "头像真实名称", hidden = true)
|
||||
@Schema(name = "头像真实名称", hidden = true)
|
||||
private String avatarName;
|
||||
@ApiModelProperty(value = "是否启用")
|
||||
@Schema(name = "是否启用")
|
||||
private Boolean enabled;
|
||||
@ApiModelProperty(value = "是否为admin账号", hidden = true)
|
||||
@Schema(name = "是否为admin账号", hidden = true)
|
||||
private Boolean isAdmin = false;
|
||||
}
|
||||
+2
-3
@@ -17,11 +17,10 @@
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import cn.odboy.base.CsObject;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@
|
||||
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -25,9 +25,9 @@ import lombok.Data;
|
||||
@Data
|
||||
public class SystemUpdateUserPasswordArgs {
|
||||
|
||||
@ApiModelProperty(value = "旧密码")
|
||||
@Schema(name = "旧密码")
|
||||
private String oldPass;
|
||||
|
||||
@ApiModelProperty(value = "新密码")
|
||||
@Schema(name = "新密码")
|
||||
private String newPass;
|
||||
}
|
||||
|
||||
+4
-4
@@ -18,7 +18,7 @@ package cn.odboy.system.dal.model;
|
||||
|
||||
import cn.odboy.system.dal.dataobject.SystemUserTb;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
@@ -31,13 +31,13 @@ import java.util.stream.Collectors;
|
||||
@AllArgsConstructor
|
||||
public class SystemUserJwtVo implements UserDetails {
|
||||
|
||||
@ApiModelProperty(value = "用户")
|
||||
@Schema(name = "用户")
|
||||
private final SystemUserTb user;
|
||||
|
||||
@ApiModelProperty(value = "数据权限")
|
||||
@Schema(name = "数据权限")
|
||||
private final List<Long> dataScopes;
|
||||
|
||||
@ApiModelProperty(value = "角色")
|
||||
@Schema(name = "角色")
|
||||
private final List<SystemRoleCodeVo> authorities;
|
||||
|
||||
public Set<String> getRoles() {
|
||||
|
||||
+6
-7
@@ -16,27 +16,26 @@
|
||||
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class SystemUserLoginArgs {
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@Schema(name = "用户名")
|
||||
private String username;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "密码")
|
||||
@Schema(name = "密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "验证码")
|
||||
@Schema(name = "验证码")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "验证码的key")
|
||||
@Schema(name = "验证码的key")
|
||||
private String uuid = "";
|
||||
}
|
||||
|
||||
+10
-10
@@ -16,7 +16,7 @@
|
||||
|
||||
package cn.odboy.system.dal.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -26,30 +26,30 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
public class SystemUserOnlineVo {
|
||||
@ApiModelProperty(value = "Token编号")
|
||||
@Schema(name = "Token编号")
|
||||
private String uid;
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@Schema(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@Schema(name = "昵称")
|
||||
private String nickName;
|
||||
|
||||
@ApiModelProperty(value = "岗位")
|
||||
@Schema(name = "岗位")
|
||||
private String dept;
|
||||
|
||||
@ApiModelProperty(value = "浏览器")
|
||||
@Schema(name = "浏览器")
|
||||
private String browser;
|
||||
|
||||
@ApiModelProperty(value = "IP")
|
||||
@Schema(name = "IP")
|
||||
private String ip;
|
||||
|
||||
@ApiModelProperty(value = "地址")
|
||||
@Schema(name = "地址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "token")
|
||||
@Schema(name = "token")
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty(value = "登录时间")
|
||||
@Schema(name = "登录时间")
|
||||
private Date loginTime;
|
||||
}
|
||||
|
||||
-1
@@ -4,7 +4,6 @@ import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.odboy.framework.redis.CsRedisHelper;
|
||||
import cn.odboy.system.dal.model.SystemUserJwtVo;
|
||||
import cn.odboy.util.CsStringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
+2
-2
@@ -9,12 +9,12 @@ import cn.odboy.system.dal.model.SystemUserOnlineVo;
|
||||
import cn.odboy.system.framework.permission.core.handler.TokenProvider;
|
||||
import cn.odboy.util.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
+4
-4
@@ -27,7 +27,8 @@ import cn.odboy.system.framework.permission.core.CsSecurityHelper;
|
||||
import cn.odboy.util.CsBrowserUtil;
|
||||
import cn.odboy.util.CsIPUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
@@ -36,7 +37,6 @@ import org.aspectj.lang.reflect.MethodSignature;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
@@ -90,9 +90,9 @@ public class OperationLogAspect {
|
||||
String bizName = annotation.bizName();
|
||||
if (StrUtil.isBlank(bizName)) {
|
||||
Method method = signature.getMethod();
|
||||
ApiOperation apiOperation = method.getAnnotation(ApiOperation.class);
|
||||
Operation apiOperation = method.getAnnotation(Operation.class);
|
||||
if (apiOperation != null) {
|
||||
bizName = apiOperation.value();
|
||||
bizName = apiOperation.summary();
|
||||
}
|
||||
}
|
||||
if (StrUtil.isBlank(bizName)) {
|
||||
|
||||
+4
-4
@@ -27,7 +27,8 @@ import cn.odboy.system.framework.permission.core.CsSecurityHelper;
|
||||
import cn.odboy.util.CsBrowserUtil;
|
||||
import cn.odboy.util.CsIPUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
@@ -36,7 +37,6 @@ import org.aspectj.lang.reflect.MethodSignature;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
@@ -92,9 +92,9 @@ public class SystemOperationLogAspect {
|
||||
String bizName = annotation.bizName();
|
||||
if (StrUtil.isBlank(bizName)) {
|
||||
Method method = signature.getMethod();
|
||||
ApiOperation apiOperation = method.getAnnotation(ApiOperation.class);
|
||||
Operation apiOperation = method.getAnnotation(Operation.class);
|
||||
if (apiOperation != null) {
|
||||
bizName = apiOperation.value();
|
||||
bizName = apiOperation.summary();
|
||||
}
|
||||
}
|
||||
if (StrUtil.isBlank(bizName)) {
|
||||
|
||||
+3
-3
@@ -92,9 +92,9 @@ public class SpringSecurityConfig {
|
||||
.authorizeHttpRequests(authorizeRequests -> authorizeRequests
|
||||
// 静态资源等等
|
||||
.requestMatchers(HttpMethod.GET, "*.html", "*.css", "*.js", "/websocket/**").permitAll()
|
||||
// // Knife4j 和 OpenAPI 相关路径
|
||||
// .requestMatchers("/doc.html", "/webjars/**", "/v3/api-docs", "/v3/api-docs/**", "/swagger-resources", "/swagger-resources/**",
|
||||
// "/configuration/ui", "/configuration/security").permitAll()
|
||||
// Knife4j 和 OpenAPI 相关路径
|
||||
.requestMatchers("/doc.html", "/webjars/**", "/v3/api-docs", "/v3/api-docs/**", "/swagger-resources", "/swagger-resources/**",
|
||||
"/configuration/ui", "/configuration/security").permitAll()
|
||||
// 文件
|
||||
.requestMatchers("/avatar/**").permitAll().requestMatchers("/file/**").permitAll()
|
||||
// 阿里巴巴 druid
|
||||
|
||||
+1
-1
@@ -25,6 +25,7 @@ import cn.odboy.system.constant.SystemDataScopeEnum;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
@@ -32,7 +33,6 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
+2
-2
@@ -18,13 +18,13 @@ package cn.odboy.system.framework.permission.core.handler;
|
||||
|
||||
import cn.odboy.framework.exception.handler.ApiError;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.web.access.AccessDeniedHandler;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
@Component
|
||||
|
||||
+2
-2
@@ -18,14 +18,14 @@ package cn.odboy.system.framework.permission.core.handler;
|
||||
|
||||
import cn.odboy.framework.exception.handler.ApiError;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
|
||||
+5
-5
@@ -20,17 +20,17 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.odboy.constant.SystemConst;
|
||||
import cn.odboy.system.dal.model.SystemUserOnlineVo;
|
||||
import cn.odboy.system.dal.redis.SystemUserOnlineInfoDAO;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.ServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.filter.GenericFilterBean;
|
||||
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.ServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
|
||||
+1
-1
@@ -29,6 +29,7 @@ import io.jsonwebtoken.JwtParser;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.io.Decoders;
|
||||
import io.jsonwebtoken.security.Keys;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -38,7 +39,6 @@ import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.crypto.SecretKey;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
||||
-1
@@ -31,7 +31,6 @@ import cn.odboy.system.dal.model.SystemSendEmailArgs;
|
||||
import cn.odboy.system.dal.mysql.SystemQuartzLogMapper;
|
||||
import cn.odboy.system.service.SystemEmailService;
|
||||
import cn.odboy.system.service.SystemQuartzJobService;
|
||||
import cn.odboy.util.CsStringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
+1
@@ -23,6 +23,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.quartz.*;
|
||||
import org.quartz.impl.triggers.CronTriggerImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Slf4j
|
||||
|
||||
+1
-1
@@ -18,6 +18,7 @@ package cn.odboy.system.framework.storage.local;
|
||||
|
||||
import cn.odboy.framework.exception.BadRequestException;
|
||||
import cn.odboy.framework.properties.AppProperties;
|
||||
import jakarta.servlet.MultipartConfigElement;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -26,7 +27,6 @@ import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.util.unit.DataSize;
|
||||
|
||||
import jakarta.servlet.MultipartConfigElement;
|
||||
import java.io.File;
|
||||
|
||||
@Slf4j
|
||||
|
||||
+2
-2
@@ -34,13 +34,13 @@ import io.minio.*;
|
||||
import io.minio.http.Method;
|
||||
import io.minio.messages.Bucket;
|
||||
import io.minio.messages.Item;
|
||||
import jakarta.servlet.ServletOutputStream;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.ServletOutputStream;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
+1
-2
@@ -35,13 +35,12 @@ import cn.odboy.system.dal.mysql.SystemUserMapper;
|
||||
import cn.odboy.system.framework.permission.core.CsSecurityHelper;
|
||||
import cn.odboy.util.CsClassUtil;
|
||||
import cn.odboy.util.CsFileUtil;
|
||||
import cn.odboy.util.CsStringUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
|
||||
-1
@@ -23,7 +23,6 @@ import cn.odboy.system.dal.model.SystemCreateDictDetailArgs;
|
||||
import cn.odboy.system.dal.model.SystemQueryDictDetailArgs;
|
||||
import cn.odboy.system.dal.mysql.SystemDictDetailMapper;
|
||||
import cn.odboy.util.CsPageUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
+1
-1
@@ -29,11 +29,11 @@ import cn.odboy.system.dal.mysql.SystemDictMapper;
|
||||
import cn.odboy.util.CsFileUtil;
|
||||
import cn.odboy.util.CsPageUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
+1
-1
@@ -27,11 +27,11 @@ import cn.odboy.system.dal.mysql.SystemUserMapper;
|
||||
import cn.odboy.util.CsFileUtil;
|
||||
import cn.odboy.util.CsPageUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
+1
-2
@@ -29,14 +29,13 @@ import cn.odboy.system.dal.model.SystemQueryStorageArgs;
|
||||
import cn.odboy.system.dal.mysql.SystemLocalStorageMapper;
|
||||
import cn.odboy.util.CsFileUtil;
|
||||
import cn.odboy.util.CsPageUtil;
|
||||
import cn.odboy.util.CsStringUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
+1
-2
@@ -33,13 +33,12 @@ import cn.odboy.system.dal.mysql.SystemMenuMapper;
|
||||
import cn.odboy.system.dal.mysql.SystemRoleMenuMapper;
|
||||
import cn.odboy.util.CsClassUtil;
|
||||
import cn.odboy.util.CsFileUtil;
|
||||
import cn.odboy.util.CsStringUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
|
||||
+1
-1
@@ -22,9 +22,9 @@ import cn.odboy.system.dal.model.SystemOssStorageVo;
|
||||
import cn.odboy.system.dal.model.SystemQueryStorageArgs;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
+1
-2
@@ -31,14 +31,13 @@ import cn.odboy.system.dal.mysql.SystemQuartzLogMapper;
|
||||
import cn.odboy.system.framework.quartz.QuartzManage;
|
||||
import cn.odboy.util.CsFileUtil;
|
||||
import cn.odboy.util.CsPageUtil;
|
||||
import cn.odboy.util.CsStringUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.quartz.CronExpression;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
+1
-2
@@ -34,13 +34,12 @@ import cn.odboy.system.dal.mysql.SystemRoleMenuMapper;
|
||||
import cn.odboy.system.dal.mysql.SystemUserMapper;
|
||||
import cn.odboy.util.CsFileUtil;
|
||||
import cn.odboy.util.CsPageUtil;
|
||||
import cn.odboy.util.CsStringUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
-1
@@ -32,7 +32,6 @@ import cn.odboy.system.dal.redis.SystemUserOnlineInfoDAO;
|
||||
import cn.odboy.system.framework.permission.core.CsSecurityHelper;
|
||||
import cn.odboy.util.CsFileUtil;
|
||||
import cn.odboy.util.CsPageUtil;
|
||||
import cn.odboy.util.CsStringUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
+1
-1
@@ -35,12 +35,12 @@ import cn.odboy.util.CsPageUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
+12
-13
@@ -20,8 +20,7 @@ import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
@@ -40,16 +39,16 @@ import java.util.Date;
|
||||
@Setter
|
||||
@ToString
|
||||
@TableName("task_instance_detail")
|
||||
@ApiModel(value = "TaskInstanceDetailTb对象", description = "任务实例明细")
|
||||
@Schema(name = "TaskInstanceDetailTb对象", description = "任务实例明细")
|
||||
public class TaskInstanceDetailTb extends CsObject {
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@Schema(name = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty("id")
|
||||
@Schema(name="id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@JSONField(format = "string")
|
||||
@@ -59,20 +58,20 @@ public class TaskInstanceDetailTb extends CsObject {
|
||||
* 任务实例id
|
||||
*/
|
||||
@TableField("instance_id")
|
||||
@ApiModelProperty("任务实例id")
|
||||
@Schema(name="任务实例id")
|
||||
private Long instanceId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ApiModelProperty("开始时间")
|
||||
@Schema(name="开始时间")
|
||||
@TableField("start_time")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ApiModelProperty("结束时间")
|
||||
@Schema(name="结束时间")
|
||||
@TableField("finish_time")
|
||||
private Date finishTime;
|
||||
|
||||
@@ -80,27 +79,27 @@ public class TaskInstanceDetailTb extends CsObject {
|
||||
* 业务编码
|
||||
*/
|
||||
@TableField("biz_code")
|
||||
@ApiModelProperty("业务编码")
|
||||
@Schema(name="业务编码")
|
||||
private String bizCode;
|
||||
|
||||
/**
|
||||
* 业务名称(步骤)
|
||||
*/
|
||||
@TableField("biz_name")
|
||||
@ApiModelProperty("业务名称(步骤)")
|
||||
@Schema(name="业务名称(步骤)")
|
||||
private String bizName;
|
||||
|
||||
/**
|
||||
* 执行参数
|
||||
*/
|
||||
@ApiModelProperty("执行参数")
|
||||
@Schema(name="执行参数")
|
||||
@TableField("execute_params")
|
||||
private String executeParams;
|
||||
|
||||
/**
|
||||
* 执行信息
|
||||
*/
|
||||
@ApiModelProperty("执行信息")
|
||||
@Schema(name="执行信息")
|
||||
@TableField("execute_info")
|
||||
private String executeInfo;
|
||||
|
||||
@@ -108,6 +107,6 @@ public class TaskInstanceDetailTb extends CsObject {
|
||||
* 执行状态(running进行中 success成功 fail失败)
|
||||
*/
|
||||
@TableField("execute_status")
|
||||
@ApiModelProperty("执行状态(running进行中 success成功 fail失败)")
|
||||
@Schema(name="执行状态(running进行中 success成功 fail失败)")
|
||||
private String executeStatus;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user