chore(build): 更新项目依赖版本并优化代码格式
- 升级 Spring Boot 父项目版本至 3.5.9 - 更新 MySQL 连接器版本至 9.4.0 - 更新 MyBatis-Plus 版本至 3.5.14 - 更新 Fastjson2 版本至 2.0.59 - 更新 Hutool 版本至 5.8.41 - 更新 JJWT 版本至 0.12.6 - 更新 Knife4j 版本至 4.5.0 - 更新 Undertow 版本至 2.3.20.Final - 更新 Oshi 版本至 6.6.5 - 更新 Guava 版本至 33.5.0-jre - 格式化注解文件中的代码缩进 - 移除多余的空行和注释格式调整
This commit is contained in:
@@ -27,15 +27,20 @@ import lombok.Setter;
|
|||||||
* @date 2025-07-23
|
* @date 2025-07-23
|
||||||
*/
|
*/
|
||||||
public class KitArgs {
|
public class KitArgs {
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public static class FindByLongId extends KitObject {
|
public static class FindByLongId extends KitObject {
|
||||||
@NotNull(message = "id必填") private Long id;
|
|
||||||
|
@NotNull(message = "id必填")
|
||||||
|
private Long id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public static class DeleteById extends KitObject {
|
public static class DeleteById extends KitObject {
|
||||||
@NotNull(message = "id必填") private Long id;
|
|
||||||
|
@NotNull(message = "id必填")
|
||||||
|
private Long id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -28,6 +28,9 @@ import lombok.Setter;
|
|||||||
@Setter
|
@Setter
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class KitBaseCreateTimeTb extends KitObject {
|
public class KitBaseCreateTimeTb extends KitObject {
|
||||||
@Schema(name = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true) @TableField(fill = FieldFill.INSERT) private Date
|
|
||||||
|
@Schema(name = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date
|
||||||
createTime;
|
createTime;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-2
@@ -28,9 +28,13 @@ import lombok.Setter;
|
|||||||
@Setter
|
@Setter
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class KitBaseTimeTb extends KitObject {
|
public class KitBaseTimeTb extends KitObject {
|
||||||
@TableField(fill = FieldFill.INSERT) @Schema(name = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true) private Date
|
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@Schema(name = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||||
|
private Date
|
||||||
createTime;
|
createTime;
|
||||||
|
|
||||||
@TableField(fill = FieldFill.INSERT_UPDATE) @Schema(name = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@Schema(name = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -28,6 +28,8 @@ import lombok.Setter;
|
|||||||
@Setter
|
@Setter
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class KitBaseUpdateTimeTb extends KitObject {
|
public class KitBaseUpdateTimeTb extends KitObject {
|
||||||
@Schema(name = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true) @TableField(fill = FieldFill.INSERT_UPDATE)
|
|
||||||
|
@Schema(name = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-4
@@ -32,9 +32,14 @@ import org.springframework.data.annotation.CreatedBy;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class KitBaseUserCreateTimeTb extends KitObject {
|
public class KitBaseUserCreateTimeTb extends KitObject {
|
||||||
|
|
||||||
@CreatedBy @TableField(fill = FieldFill.INSERT) @Schema(name = "创建人", hidden = true) private String createBy;
|
@CreatedBy
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@Schema(name = "创建人", hidden = true)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
@TableField(fill = FieldFill.INSERT) @Schema(name = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true) private Date
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@Schema(name = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||||
|
private Date
|
||||||
createTime;
|
createTime;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -53,8 +58,12 @@ public class KitBaseUserCreateTimeTb extends KitObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 分组校验 */
|
/* 分组校验 */
|
||||||
public @interface Create {}
|
public @interface Create {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* 分组校验 */
|
/* 分组校验 */
|
||||||
public @interface Update {}
|
public @interface Update {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-6
@@ -35,13 +35,24 @@ import org.springframework.data.annotation.LastModifiedBy;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class KitBaseUserTimeLogicTb extends KitObject {
|
public class KitBaseUserTimeLogicTb extends KitObject {
|
||||||
@CreatedBy @TableField(value = "create_by", fill = FieldFill.INSERT) @Schema(name = "创建人", hidden = true)
|
|
||||||
|
@CreatedBy
|
||||||
|
@TableField(value = "create_by", fill = FieldFill.INSERT)
|
||||||
|
@Schema(name = "创建人", hidden = true)
|
||||||
private String createBy;
|
private String createBy;
|
||||||
@LastModifiedBy @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
|
@LastModifiedBy
|
||||||
@Schema(name = "更新人", hidden = true) private String updateBy;
|
@TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
|
||||||
@TableField(value = "create_time", fill = FieldFill.INSERT) @Schema(name = "创建时间", hidden = true) private Date
|
@Schema(name = "更新人", hidden = true)
|
||||||
|
private String updateBy;
|
||||||
|
@TableField(value = "create_time", fill = FieldFill.INSERT)
|
||||||
|
@Schema(name = "创建时间", hidden = true)
|
||||||
|
private Date
|
||||||
createTime;
|
createTime;
|
||||||
@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE) @Schema(name = "更新时间", hidden = true)
|
@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@Schema(name = "更新时间", hidden = true)
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
@Schema(name = "数据有效性", hidden = true) @TableLogic @TableField("available") private Integer available;
|
@Schema(name = "数据有效性", hidden = true)
|
||||||
|
@TableLogic
|
||||||
|
@TableField("available")
|
||||||
|
private Integer available;
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-6
@@ -33,15 +33,24 @@ import org.springframework.data.annotation.LastModifiedBy;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class KitBaseUserTimeTb extends KitObject {
|
public class KitBaseUserTimeTb extends KitObject {
|
||||||
|
|
||||||
@CreatedBy @TableField(fill = FieldFill.INSERT) @Schema(name = "创建人", hidden = true) private String createBy;
|
@CreatedBy
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@Schema(name = "创建人", hidden = true)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
@LastModifiedBy @TableField(fill = FieldFill.INSERT_UPDATE) @Schema(name = "更新人", hidden = true) private String
|
@LastModifiedBy
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@Schema(name = "更新人", hidden = true)
|
||||||
|
private String
|
||||||
updateBy;
|
updateBy;
|
||||||
|
|
||||||
@TableField(fill = FieldFill.INSERT) @Schema(name = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true) private Date
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@Schema(name = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||||
|
private Date
|
||||||
createTime;
|
createTime;
|
||||||
|
|
||||||
@TableField(fill = FieldFill.INSERT_UPDATE) @Schema(name = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@Schema(name = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -60,8 +69,12 @@ public class KitBaseUserTimeTb extends KitObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 分组校验 */
|
/* 分组校验 */
|
||||||
public @interface Create {}
|
public @interface Create {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* 分组校验 */
|
/* 分组校验 */
|
||||||
public @interface Update {}
|
public @interface Update {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,5 +26,7 @@ import java.io.Serializable;
|
|||||||
* @date 2022-01-12
|
* @date 2022-01-12
|
||||||
*/
|
*/
|
||||||
public class KitObject implements Serializable {
|
public class KitObject implements Serializable {
|
||||||
@Serial private static final long serialVersionUID = 1L;
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-4
@@ -34,9 +34,14 @@ import lombok.NoArgsConstructor;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class KitPageArgs<T> implements Serializable {
|
public class KitPageArgs<T> implements Serializable {
|
||||||
@NotNull(message = "参数page不能为空") @Min(value = 1, message = "参数page最小值为1")
|
|
||||||
@Schema(name = "页码", example = "1") private Integer page;
|
@NotNull(message = "参数page不能为空")
|
||||||
@NotNull(message = "参数size不能为空") @Min(value = 1, message = "参数size最小值为1")
|
@Min(value = 1, message = "参数page最小值为1")
|
||||||
@Schema(name = "每页数据量", example = "10") private Integer size;
|
@Schema(name = "页码", example = "1")
|
||||||
|
private Integer page;
|
||||||
|
@NotNull(message = "参数size不能为空")
|
||||||
|
@Min(value = 1, message = "参数size最小值为1")
|
||||||
|
@Schema(name = "每页数据量", example = "10")
|
||||||
|
private Integer size;
|
||||||
private T args;
|
private T args;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class KitPageResult<T> extends KitObject {
|
public class KitPageResult<T> extends KitObject {
|
||||||
|
|
||||||
private List<T> content;
|
private List<T> content;
|
||||||
private long totalElements;
|
private long totalElements;
|
||||||
|
|
||||||
|
|||||||
+1
@@ -35,6 +35,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class KitSelectOptionVo extends KitObject {
|
public class KitSelectOptionVo extends KitObject {
|
||||||
|
|
||||||
private String label;
|
private String label;
|
||||||
private String value;
|
private String value;
|
||||||
private Map<String, Object> ext;
|
private Map<String, Object> ext;
|
||||||
|
|||||||
+1
@@ -20,6 +20,7 @@ package cn.odboy.constant;
|
|||||||
* 常用静态常量
|
* 常用静态常量
|
||||||
*/
|
*/
|
||||||
public interface SystemConst {
|
public interface SystemConst {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* win 系统
|
* win 系统
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -30,6 +30,7 @@ import org.springframework.stereotype.Component;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class BeanLoadFinishListener implements ApplicationListener<ContextRefreshedEvent> {
|
public class BeanLoadFinishListener implements ApplicationListener<ContextRefreshedEvent> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||||
log.info("所有的Bean都加载完毕了");
|
log.info("所有的Bean都加载完毕了");
|
||||||
|
|||||||
+1
@@ -32,6 +32,7 @@ import org.springframework.core.env.Environment;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class BootApplication {
|
public class BootApplication {
|
||||||
|
|
||||||
protected static void inited(ConfigurableApplicationContext application) throws UnknownHostException {
|
protected static void inited(ConfigurableApplicationContext application) throws UnknownHostException {
|
||||||
Environment env = application.getEnvironment();
|
Environment env = application.getEnvironment();
|
||||||
String ip = InetAddress.getLocalHost().getHostAddress();
|
String ip = InetAddress.getLocalHost().getHostAddress();
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
|||||||
public class KitRequestHolder {
|
public class KitRequestHolder {
|
||||||
|
|
||||||
public static HttpServletRequest getHttpServletRequest() {
|
public static HttpServletRequest getHttpServletRequest() {
|
||||||
return ((ServletRequestAttributes)Objects.requireNonNull(
|
return ((ServletRequestAttributes) Objects.requireNonNull(
|
||||||
RequestContextHolder.getRequestAttributes())).getRequest();
|
RequestContextHolder.getRequestAttributes())).getRequest();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -31,6 +31,7 @@ import org.springframework.stereotype.Component;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class KitScriptHelper {
|
public class KitScriptHelper {
|
||||||
|
|
||||||
public Object evalObj(String script, Map<String, Object> args) {
|
public Object evalObj(String script, Map<String, Object> args) {
|
||||||
try (Context rhino = Context.enter()) {
|
try (Context rhino = Context.enter()) {
|
||||||
Scriptable scope = rhino.initStandardObjects();
|
Scriptable scope = rhino.initStandardObjects();
|
||||||
|
|||||||
+1
-1
@@ -54,7 +54,7 @@ public class KitSpringBeanHolder implements ApplicationContextAware, DisposableB
|
|||||||
*/
|
*/
|
||||||
public static <T> T getBean(String name) {
|
public static <T> T getBean(String name) {
|
||||||
assertContextInjected();
|
assertContextInjected();
|
||||||
return (T)applicationContext.getBean(name);
|
return (T) applicationContext.getBean(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-2
@@ -16,11 +16,11 @@
|
|||||||
|
|
||||||
package cn.odboy.framework.exception;
|
package cn.odboy.framework.exception;
|
||||||
|
|
||||||
|
import static org.springframework.http.HttpStatus.BAD_REQUEST;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
import static org.springframework.http.HttpStatus.BAD_REQUEST;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统一异常处理
|
* 统一异常处理
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-2
@@ -16,11 +16,11 @@
|
|||||||
|
|
||||||
package cn.odboy.framework.exception;
|
package cn.odboy.framework.exception;
|
||||||
|
|
||||||
|
import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public class ServerException extends RuntimeException {
|
public class ServerException extends RuntimeException {
|
||||||
|
|
||||||
|
|||||||
+1
@@ -33,6 +33,7 @@ import java.lang.annotation.Target;
|
|||||||
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
|
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface ExecutionTimeStatisticsFace {
|
public @interface ExecutionTimeStatisticsFace {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口描述
|
* 接口描述
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -33,6 +33,7 @@ import org.springframework.stereotype.Component;
|
|||||||
@Aspect
|
@Aspect
|
||||||
@Component
|
@Component
|
||||||
public class ExecutionTimeStatisticsFaceAspect {
|
public class ExecutionTimeStatisticsFaceAspect {
|
||||||
|
|
||||||
@Around("@annotation(executionTimeStatisticsFace)")
|
@Around("@annotation(executionTimeStatisticsFace)")
|
||||||
public Object aroundFace(ProceedingJoinPoint joinPoint, ExecutionTimeStatisticsFace executionTimeStatisticsFace)
|
public Object aroundFace(ProceedingJoinPoint joinPoint, ExecutionTimeStatisticsFace executionTimeStatisticsFace)
|
||||||
throws Throwable {
|
throws Throwable {
|
||||||
|
|||||||
+3
-1
@@ -31,7 +31,9 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RequestMapping("/healthCheck")
|
@RequestMapping("/healthCheck")
|
||||||
@Tag(name = "系统:健康检查接口")
|
@Tag(name = "系统:健康检查接口")
|
||||||
public class HealthCheckController {
|
public class HealthCheckController {
|
||||||
@Autowired private KitHealthCheckPointService kitHealthCheckPointService;
|
|
||||||
|
@Autowired
|
||||||
|
private KitHealthCheckPointService kitHealthCheckPointService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 就绪检查
|
* 就绪检查
|
||||||
|
|||||||
+1
@@ -19,6 +19,7 @@ package cn.odboy.framework.monitor.service;
|
|||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
|
||||||
public interface KitHealthCheckPointService {
|
public interface KitHealthCheckPointService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 就绪检查
|
* 就绪检查
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@ import java.lang.annotation.Target;
|
|||||||
@Target(ElementType.FIELD)
|
@Target(ElementType.FIELD)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface KitMpQuery {
|
public @interface KitMpQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基本对象的属性名
|
* 基本对象的属性名
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -25,6 +25,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class MpCustomP6SpyLogger implements MessageFormattingStrategy {
|
public class MpCustomP6SpyLogger implements MessageFormattingStrategy {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置颜色
|
* 重置颜色
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -32,6 +32,7 @@ import org.apache.ibatis.session.Configuration;
|
|||||||
* @date 2025-01-11
|
* @date 2025-01-11
|
||||||
*/
|
*/
|
||||||
public class MpInsertBatchSqlInjector extends DefaultSqlInjector {
|
public class MpInsertBatchSqlInjector extends DefaultSqlInjector {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AbstractMethod> getMethodList(Configuration configuration, Class<?> mapperClass, TableInfo tableInfo) {
|
public List<AbstractMethod> getMethodList(Configuration configuration, Class<?> mapperClass, TableInfo tableInfo) {
|
||||||
List<AbstractMethod> methodList = super.getMethodList(configuration, mapperClass, tableInfo);
|
List<AbstractMethod> methodList = super.getMethodList(configuration, mapperClass, tableInfo);
|
||||||
|
|||||||
+1
@@ -28,6 +28,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|||||||
@Configuration
|
@Configuration
|
||||||
@EnableTransactionManagement
|
@EnableTransactionManagement
|
||||||
public class MybatisPlusConfig {
|
public class MybatisPlusConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public MybatisPlusInterceptor paginationInterceptor() {
|
public MybatisPlusInterceptor paginationInterceptor() {
|
||||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||||
|
|||||||
+2
-2
@@ -69,8 +69,8 @@ public class RemoveDruidAdConfig {
|
|||||||
@Override
|
@Override
|
||||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
||||||
throws IOException, ServletException {
|
throws IOException, ServletException {
|
||||||
HttpServletRequest httpRequest = (HttpServletRequest)request;
|
HttpServletRequest httpRequest = (HttpServletRequest) request;
|
||||||
HttpServletResponse httpResponse = (HttpServletResponse)response;
|
HttpServletResponse httpResponse = (HttpServletResponse) response;
|
||||||
if (httpRequest.getRequestURI().endsWith("js/common.js")) {
|
if (httpRequest.getRequestURI().endsWith("js/common.js")) {
|
||||||
// 获取common.js
|
// 获取common.js
|
||||||
String text = Utils.readFromResource(filePath);
|
String text = Utils.readFromResource(filePath);
|
||||||
|
|||||||
+1
@@ -30,6 +30,7 @@ import java.util.List;
|
|||||||
* @date 2025-05-15
|
* @date 2025-05-15
|
||||||
*/
|
*/
|
||||||
public class KitMpAnyQUtil {
|
public class KitMpAnyQUtil {
|
||||||
|
|
||||||
public static <T> T selectOne(BaseMapper<T> baseMapper, Object queryParams) {
|
public static <T> T selectOne(BaseMapper<T> baseMapper, Object queryParams) {
|
||||||
QueryWrapper<T> queryWrapper = KitMpQUtil.build(queryParams);
|
QueryWrapper<T> queryWrapper = KitMpQUtil.build(queryParams);
|
||||||
return baseMapper.selectOne(queryWrapper);
|
return baseMapper.selectOne(queryWrapper);
|
||||||
|
|||||||
+1
@@ -49,6 +49,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class KitMpCmdGenUtil {
|
public class KitMpCmdGenUtil {
|
||||||
|
|
||||||
// 项目根路径。生成结果 C:\Users\Administrator\Documents\GitHub\cutejava\cutejava
|
// 项目根路径。生成结果 C:\Users\Administrator\Documents\GitHub\cutejava\cutejava
|
||||||
private static final String projectRootPath = System.getProperty("user.dir") + "/";
|
private static final String projectRootPath = System.getProperty("user.dir") + "/";
|
||||||
/**
|
/**
|
||||||
|
|||||||
+13
-6
@@ -42,6 +42,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class KitMpQUtil {
|
public class KitMpQUtil {
|
||||||
|
|
||||||
public static <R, Q> QueryWrapper<R> build(Q query) {
|
public static <R, Q> QueryWrapper<R> build(Q query) {
|
||||||
QueryWrapper<R> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<R> queryWrapper = new QueryWrapper<>();
|
||||||
if (query == null) {
|
if (query == null) {
|
||||||
@@ -103,7 +104,7 @@ public class KitMpQUtil {
|
|||||||
|
|
||||||
private static <R> void handleInOrNotQuery(boolean b, QueryWrapper<R> queryWrapper, String attributeName,
|
private static <R> void handleInOrNotQuery(boolean b, QueryWrapper<R> queryWrapper, String attributeName,
|
||||||
Object fieldVal) {
|
Object fieldVal) {
|
||||||
Collection<?> wrapNotInVal = (Collection<?>)fieldVal;
|
Collection<?> wrapNotInVal = (Collection<?>) fieldVal;
|
||||||
if (CollectionUtil.isNotEmpty(wrapNotInVal)) {
|
if (CollectionUtil.isNotEmpty(wrapNotInVal)) {
|
||||||
Optional<?> anyValOptional = wrapNotInVal.stream().findAny();
|
Optional<?> anyValOptional = wrapNotInVal.stream().findAny();
|
||||||
if (anyValOptional.isPresent()) {
|
if (anyValOptional.isPresent()) {
|
||||||
@@ -130,7 +131,7 @@ public class KitMpQUtil {
|
|||||||
private static <R> void handleBetweenQuery(QueryWrapper<R> queryWrapper, Object fieldVal,
|
private static <R> void handleBetweenQuery(QueryWrapper<R> queryWrapper, Object fieldVal,
|
||||||
String finalAttributeName) {
|
String finalAttributeName) {
|
||||||
if (fieldVal instanceof List) {
|
if (fieldVal instanceof List) {
|
||||||
List<Object> between = new ArrayList<>((List<?>)fieldVal);
|
List<Object> between = new ArrayList<>((List<?>) fieldVal);
|
||||||
int minLength = 2;
|
int minLength = 2;
|
||||||
if (CollectionUtil.isNotEmpty(between) && between.size() >= minLength) {
|
if (CollectionUtil.isNotEmpty(between) && between.size() >= minLength) {
|
||||||
queryWrapper.between(finalAttributeName, between.get(0), between.get(1));
|
queryWrapper.between(finalAttributeName, between.get(0), between.get(1));
|
||||||
@@ -188,10 +189,16 @@ public class KitMpQUtil {
|
|||||||
|
|
||||||
@TableName("test_domain")
|
@TableName("test_domain")
|
||||||
private static class TestDomain {
|
private static class TestDomain {
|
||||||
@NotNull(groups = KitBaseUserTimeTb.Update.class) @TableId(value = "user_id", type = IdType.AUTO) private Long
|
|
||||||
|
@NotNull(groups = KitBaseUserTimeTb.Update.class)
|
||||||
|
@TableId(value = "user_id", type = IdType.AUTO)
|
||||||
|
private Long
|
||||||
id;
|
id;
|
||||||
@TableField(value = "dept_id") private Long deptId;
|
@TableField(value = "dept_id")
|
||||||
@NotBlank private String username;
|
private Long deptId;
|
||||||
@NotBlank private String nickName;
|
@NotBlank
|
||||||
|
private String username;
|
||||||
|
@NotBlank
|
||||||
|
private String nickName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -42,6 +42,7 @@ import org.springframework.data.domain.Pageable;
|
|||||||
* @date 2022-04-03
|
* @date 2022-04-03
|
||||||
*/
|
*/
|
||||||
public interface KitMpMapper<E> extends BaseMapper<E> {
|
public interface KitMpMapper<E> extends BaseMapper<E> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量插入
|
* 批量插入
|
||||||
*
|
*
|
||||||
|
|||||||
+1
@@ -32,6 +32,7 @@ import java.util.List;
|
|||||||
* @date 2022-04-03
|
* @date 2022-04-03
|
||||||
*/
|
*/
|
||||||
public interface KitMpService<T> extends IService<T> {
|
public interface KitMpService<T> extends IService<T> {
|
||||||
|
|
||||||
<G> int saveFeatureClazz(G resources);
|
<G> int saveFeatureClazz(G resources);
|
||||||
|
|
||||||
<G> int saveFeatureClazzList(List<G> resources);
|
<G> int saveFeatureClazzList(List<G> resources);
|
||||||
|
|||||||
+1
@@ -39,6 +39,7 @@ import org.apache.ibatis.binding.MapperMethod;
|
|||||||
* @date 2022-04-03
|
* @date 2022-04-03
|
||||||
*/
|
*/
|
||||||
public class KitMpServiceImpl<M extends KitMpMapper<T>, T> extends ServiceImpl<M, T> {
|
public class KitMpServiceImpl<M extends KitMpMapper<T>, T> extends ServiceImpl<M, T> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 快速插入
|
* 快速插入
|
||||||
*
|
*
|
||||||
|
|||||||
+1
@@ -36,6 +36,7 @@ import org.springframework.stereotype.Component;
|
|||||||
@Component
|
@Component
|
||||||
@ConfigurationProperties(prefix = "app")
|
@ConfigurationProperties(prefix = "app")
|
||||||
public class AppProperties {
|
public class AppProperties {
|
||||||
|
|
||||||
private ContentRsaEncodeSettingModel rsa;
|
private ContentRsaEncodeSettingModel rsa;
|
||||||
private JwtAuthSettingModel jwt;
|
private JwtAuthSettingModel jwt;
|
||||||
private UserLoginSettingModel login;
|
private UserLoginSettingModel login;
|
||||||
|
|||||||
+1
@@ -23,6 +23,7 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class CaptchaModel extends KitObject {
|
public class CaptchaModel extends KitObject {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证码有效时间, 单位: 秒
|
* 验证码有效时间, 单位: 秒
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -26,5 +26,6 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class ContentRsaEncodeSettingModel extends KitObject {
|
public class ContentRsaEncodeSettingModel extends KitObject {
|
||||||
|
|
||||||
private String privateKey;
|
private String privateKey;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -26,6 +26,7 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class JwtAuthSettingModel extends KitObject {
|
public class JwtAuthSettingModel extends KitObject {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 必须使用最少88位的Base64对该令牌进行编码
|
* 必须使用最少88位的Base64对该令牌进行编码
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -23,6 +23,7 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class OSSConfigModel extends KitObject {
|
public class OSSConfigModel extends KitObject {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务地址
|
* 服务地址
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -22,6 +22,7 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class StorageOSSModel {
|
public class StorageOSSModel {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传大小, 单位: M
|
* 上传大小, 单位: M
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class ThreadPoolSettingModel extends KitObject {
|
public class ThreadPoolSettingModel extends KitObject {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 核心线程池大小
|
* 核心线程池大小
|
||||||
*/
|
*/
|
||||||
|
|||||||
+3
-1
@@ -38,6 +38,7 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class UserLoginCaptchaSettingModel extends KitObject {
|
public class UserLoginCaptchaSettingModel extends KitObject {
|
||||||
|
|
||||||
private CaptchaCodeEnum codeType;
|
private CaptchaCodeEnum codeType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -109,6 +110,7 @@ public class UserLoginCaptchaSettingModel extends KitObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static class FixedArithmeticCaptcha extends ArithmeticCaptcha {
|
static class FixedArithmeticCaptcha extends ArithmeticCaptcha {
|
||||||
|
|
||||||
public FixedArithmeticCaptcha(int width, int height) {
|
public FixedArithmeticCaptcha(int width, int height) {
|
||||||
super(width, height);
|
super(width, height);
|
||||||
}
|
}
|
||||||
@@ -120,7 +122,7 @@ public class UserLoginCaptchaSettingModel extends KitObject {
|
|||||||
int opt = num(3);
|
int opt = num(3);
|
||||||
|
|
||||||
// 计算结果
|
// 计算结果
|
||||||
int res = new int[] {n1 + n2, n1 - n2, n1 * n2}[opt];
|
int res = new int[]{n1 + n2, n1 - n2, n1 * n2}[opt];
|
||||||
// 转换为字符运算符
|
// 转换为字符运算符
|
||||||
char optChar = "+-x".charAt(opt);
|
char optChar = "+-x".charAt(opt);
|
||||||
|
|
||||||
|
|||||||
+1
@@ -28,6 +28,7 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class UserLoginSettingModel extends KitObject {
|
public class UserLoginSettingModel extends KitObject {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 账号单用户 登录
|
* 账号单用户 登录
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -33,6 +33,7 @@ import org.springframework.stereotype.Component;
|
|||||||
@Configuration
|
@Configuration
|
||||||
@Scope("singleton")
|
@Scope("singleton")
|
||||||
public class QuartzConfig {
|
public class QuartzConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解决Job中注入Spring Bean为null的问题
|
* 解决Job中注入Spring Bean为null的问题
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -28,6 +28,7 @@ import org.springframework.util.ReflectionUtils;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class QuartzRunnable implements Callable<Object> {
|
public class QuartzRunnable implements Callable<Object> {
|
||||||
|
|
||||||
private final Object target;
|
private final Object target;
|
||||||
private final Method method;
|
private final Method method;
|
||||||
private final String params;
|
private final String params;
|
||||||
|
|||||||
+2
-1
@@ -45,6 +45,7 @@ import org.springframework.stereotype.Component;
|
|||||||
@Component
|
@Component
|
||||||
@SuppressWarnings({"unchecked", "all"})
|
@SuppressWarnings({"unchecked", "all"})
|
||||||
public class KitRedisHelper {
|
public class KitRedisHelper {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(KitRedisHelper.class);
|
private static final Logger log = LoggerFactory.getLogger(KitRedisHelper.class);
|
||||||
|
|
||||||
private RedisTemplate<Object, Object> redisTemplate;
|
private RedisTemplate<Object, Object> redisTemplate;
|
||||||
@@ -214,7 +215,7 @@ public class KitRedisHelper {
|
|||||||
public void scanDel(String pattern) {
|
public void scanDel(String pattern) {
|
||||||
ScanOptions options = ScanOptions.scanOptions().match(pattern).build();
|
ScanOptions options = ScanOptions.scanOptions().match(pattern).build();
|
||||||
try (Cursor<byte[]> cursor = redisTemplate.executeWithStickyConnection(
|
try (Cursor<byte[]> cursor = redisTemplate.executeWithStickyConnection(
|
||||||
(RedisCallback<Cursor<byte[]>>)connection -> (Cursor<byte[]>)new ConvertingCursor<>(
|
(RedisCallback<Cursor<byte[]>>) connection -> (Cursor<byte[]>) new ConvertingCursor<>(
|
||||||
connection.scan(options), redisTemplate.getKeySerializer()::deserialize))) {
|
connection.scan(options), redisTemplate.getKeySerializer()::deserialize))) {
|
||||||
while (cursor.hasNext()) {
|
while (cursor.hasNext()) {
|
||||||
redisTemplate.delete(cursor.next());
|
redisTemplate.delete(cursor.next());
|
||||||
|
|||||||
+1
@@ -48,6 +48,7 @@ import org.springframework.data.redis.serializer.StringRedisSerializer;
|
|||||||
@EnableCaching
|
@EnableCaching
|
||||||
@AutoConfigureBefore(RedisAutoConfiguration.class)
|
@AutoConfigureBefore(RedisAutoConfiguration.class)
|
||||||
public class RedisConfiguration {
|
public class RedisConfiguration {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自动识别json对象白名单配置(仅允许解析的包名, 范围越小越安全)<br/> 未配置可能导致, 登录失败, 反复登录等问题
|
* 自动识别json对象白名单配置(仅允许解析的包名, 范围越小越安全)<br/> 未配置可能导致, 登录失败, 反复登录等问题
|
||||||
*/
|
*/
|
||||||
|
|||||||
+3
-1
@@ -38,7 +38,9 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|||||||
@EnableAsync
|
@EnableAsync
|
||||||
@Configuration
|
@Configuration
|
||||||
public class AsyncTheadPoolConfig implements AsyncConfigurer {
|
public class AsyncTheadPoolConfig implements AsyncConfigurer {
|
||||||
@Autowired private AppProperties properties;
|
|
||||||
|
@Autowired
|
||||||
|
private AppProperties properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义线程池, 用法 @Async
|
* 自定义线程池, 用法 @Async
|
||||||
|
|||||||
+1
@@ -27,6 +27,7 @@ import org.springframework.stereotype.Component;
|
|||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class DateStringArraysToListDateConverter implements Converter<String[], List<Date>> {
|
public class DateStringArraysToListDateConverter implements Converter<String[], List<Date>> {
|
||||||
|
|
||||||
private static final ThreadLocal<SimpleDateFormat> SDF =
|
private static final ThreadLocal<SimpleDateFormat> SDF =
|
||||||
ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
||||||
|
|
||||||
|
|||||||
+1
@@ -25,6 +25,7 @@ import org.springframework.stereotype.Component;
|
|||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class DateStringToDateConverter implements Converter<String, Date> {
|
public class DateStringToDateConverter implements Converter<String, Date> {
|
||||||
|
|
||||||
private static final ThreadLocal<SimpleDateFormat> SDF =
|
private static final ThreadLocal<SimpleDateFormat> SDF =
|
||||||
ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
||||||
|
|
||||||
|
|||||||
+7
-3
@@ -47,9 +47,13 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||||||
@Configuration
|
@Configuration
|
||||||
@EnableWebMvc
|
@EnableWebMvc
|
||||||
public class ConfigurerAdapter implements WebMvcConfigurer {
|
public class ConfigurerAdapter implements WebMvcConfigurer {
|
||||||
@Autowired private DateStringArraysToListDateConverter dateStringArraysToListDateConverter;
|
|
||||||
@Autowired private DateStringToDateConverter dateStringToDateConverter;
|
@Autowired
|
||||||
@Autowired private KitFileLocalUploadHelper fileUploadPathHelper;
|
private DateStringArraysToListDateConverter dateStringArraysToListDateConverter;
|
||||||
|
@Autowired
|
||||||
|
private DateStringToDateConverter dateStringToDateConverter;
|
||||||
|
@Autowired
|
||||||
|
private KitFileLocalUploadHelper fileUploadPathHelper;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public CorsFilter corsFilter() {
|
public CorsFilter corsFilter() {
|
||||||
|
|||||||
+3
-1
@@ -28,6 +28,7 @@ import org.springframework.stereotype.Component;
|
|||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class KitFileLocalUploadHelper {
|
public class KitFileLocalUploadHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单位MB
|
* 单位MB
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +36,8 @@ public class KitFileLocalUploadHelper {
|
|||||||
private static final String PATH_WINDOWS = "C:\\${appName}\\file\\";
|
private static final String PATH_WINDOWS = "C:\\${appName}\\file\\";
|
||||||
private static final String PATH_MAC = "/Users${username}/${appName}/file/";
|
private static final String PATH_MAC = "/Users${username}/${appName}/file/";
|
||||||
private static final String PATH_LINUX = "/home/${appName}/file/";
|
private static final String PATH_LINUX = "/home/${appName}/file/";
|
||||||
@Value("${spring.application.name}") private String appName;
|
@Value("${spring.application.name}")
|
||||||
|
private String appName;
|
||||||
|
|
||||||
public String getPath() {
|
public String getPath() {
|
||||||
String os = System.getProperty("os.name");
|
String os = System.getProperty("os.name");
|
||||||
|
|||||||
+2
-2
@@ -7,14 +7,14 @@ import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解决启动io.undertow.websockets.jsr UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be
|
* 解决启动io.undertow.websockets.jsr UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used的警告
|
||||||
* used的警告
|
|
||||||
*
|
*
|
||||||
* @author odboy
|
* @author odboy
|
||||||
* @date 2025-10-30
|
* @date 2025-10-30
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class UndertowWebSocketConfig implements WebServerFactoryCustomizer<UndertowServletWebServerFactory> {
|
public class UndertowWebSocketConfig implements WebServerFactoryCustomizer<UndertowServletWebServerFactory> {
|
||||||
|
|
||||||
private int calculateThreadLocalCacheSize(int processorCount) {
|
private int calculateThreadLocalCacheSize(int processorCount) {
|
||||||
// 每个I/O线程缓存2-4个缓冲区
|
// 每个I/O线程缓存2-4个缓冲区
|
||||||
return Math.max(2, processorCount / 2);
|
return Math.max(2, processorCount / 2);
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class KitWsClientManager {
|
public class KitWsClientManager {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* concurrent包的线程安全Map, 用来存放每个客户端对应的MyWebSocket对象。(分布式必出问题)
|
* concurrent包的线程安全Map, 用来存放每个客户端对应的MyWebSocket对象。(分布式必出问题)
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -23,6 +23,7 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class KitWsMessage extends KitObject {
|
public class KitWsMessage extends KitObject {
|
||||||
|
|
||||||
private String bizCode;
|
private String bizCode;
|
||||||
private String data;
|
private String data;
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -35,6 +35,7 @@ import org.springframework.stereotype.Component;
|
|||||||
@ServerEndpoint("/websocket/{sid}")
|
@ServerEndpoint("/websocket/{sid}")
|
||||||
@Getter
|
@Getter
|
||||||
public class KitWsServer {
|
public class KitWsServer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 与某个客户端的连接会话, 需要通过它来给客户端发送数据
|
* 与某个客户端的连接会话, 需要通过它来给客户端发送数据
|
||||||
*/
|
*/
|
||||||
@@ -139,7 +140,7 @@ public class KitWsServer {
|
|||||||
if (o == null || getClass() != o.getClass()) {
|
if (o == null || getClass() != o.getClass()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
KitWsServer that = (KitWsServer)o;
|
KitWsServer that = (KitWsServer) o;
|
||||||
return Objects.equals(session, that.session) && Objects.equals(sid, that.sid);
|
return Objects.equals(session, that.session) && Objects.equals(sid, that.sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
@@ -23,6 +23,7 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class WsSidVo extends KitObject {
|
public class WsSidVo extends KitObject {
|
||||||
|
|
||||||
private String username;
|
private String username;
|
||||||
private String bizCode;
|
private String bizCode;
|
||||||
private String param;
|
private String param;
|
||||||
|
|||||||
+1
@@ -28,6 +28,7 @@ import lombok.experimental.UtilityClass;
|
|||||||
*/
|
*/
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public class WsMessageUtil {
|
public class WsMessageUtil {
|
||||||
|
|
||||||
public static WsSidVo parseSid(String sid) {
|
public static WsSidVo parseSid(String sid) {
|
||||||
// sid {username}_{bizCode}_{param}
|
// sid {username}_{bizCode}_{param}
|
||||||
String[] sids = sid.split("_");
|
String[] sids = sid.split("_");
|
||||||
|
|||||||
+1
@@ -30,6 +30,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public final class KitBrowserUtil {
|
public final class KitBrowserUtil {
|
||||||
|
|
||||||
private static final String UNKNOWN = "unknown";
|
private static final String UNKNOWN = "unknown";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import lombok.experimental.UtilityClass;
|
|||||||
*/
|
*/
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public final class KitClassUtil {
|
public final class KitClassUtil {
|
||||||
|
|
||||||
@SuppressWarnings({"unchecked", "all"})
|
@SuppressWarnings({"unchecked", "all"})
|
||||||
public static List<Field> getAllFields(Class clazz, List<Field> fields) {
|
public static List<Field> getAllFields(Class clazz, List<Field> fields) {
|
||||||
if (clazz != null) {
|
if (clazz != null) {
|
||||||
|
|||||||
+2
-1
@@ -40,6 +40,7 @@ import lombok.experimental.UtilityClass;
|
|||||||
*/
|
*/
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public final class KitCollUtil extends cn.hutool.core.collection.CollUtil {
|
public final class KitCollUtil extends cn.hutool.core.collection.CollUtil {
|
||||||
|
|
||||||
private static <T, K> Predicate<T> distinctPredicate(Function<? super T, ? extends K> keyMapper) {
|
private static <T, K> Predicate<T> distinctPredicate(Function<? super T, ? extends K> keyMapper) {
|
||||||
Map<Object, Boolean> map = new HashMap<>(3);
|
Map<Object, Boolean> map = new HashMap<>(3);
|
||||||
return (t) -> null == map.putIfAbsent(keyMapper.apply(t), true);
|
return (t) -> null == map.putIfAbsent(keyMapper.apply(t), true);
|
||||||
@@ -150,7 +151,7 @@ public final class KitCollUtil extends cn.hutool.core.collection.CollUtil {
|
|||||||
try {
|
try {
|
||||||
Field field = m.getClass().getDeclaredField(elementName);
|
Field field = m.getClass().getDeclaredField(elementName);
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
that = (BigDecimal)field.get(m);
|
that = (BigDecimal) field.get(m);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// 忽略异常
|
// 忽略异常
|
||||||
that = BigDecimal.ZERO;
|
that = BigDecimal.ZERO;
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import lombok.experimental.UtilityClass;
|
|||||||
*/
|
*/
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public class KitDateUtil {
|
public class KitDateUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前时间毫秒数
|
* 获取当前时间毫秒数
|
||||||
*
|
*
|
||||||
|
|||||||
+1
-1
@@ -88,7 +88,7 @@ public final class KitDesEncryptUtil {
|
|||||||
byte[] b2 = new byte[b.length / 2];
|
byte[] b2 = new byte[b.length / 2];
|
||||||
for (int n = 0; n < b.length; n += size) {
|
for (int n = 0; n < b.length; n += size) {
|
||||||
String item = new String(b, n, 2);
|
String item = new String(b, n, 2);
|
||||||
b2[n / 2] = (byte)Integer.parseInt(item, 16);
|
b2[n / 2] = (byte) Integer.parseInt(item, 16);
|
||||||
}
|
}
|
||||||
return b2;
|
return b2;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -26,6 +26,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
|||||||
* @date 2025-04-05
|
* @date 2025-04-05
|
||||||
*/
|
*/
|
||||||
public final class KitDistributedIdUtil {
|
public final class KitDistributedIdUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 起始毫秒时间戳, 2020-12-30
|
* 起始毫秒时间戳, 2020-12-30
|
||||||
*/
|
*/
|
||||||
@@ -197,6 +198,7 @@ public final class KitDistributedIdUtil {
|
|||||||
* 单例实例持有者类
|
* 单例实例持有者类
|
||||||
*/
|
*/
|
||||||
private static class InstanceHolder {
|
private static class InstanceHolder {
|
||||||
|
|
||||||
private static final KitDistributedIdUtil INSTANCE = new KitDistributedIdUtil(20, 12, 5, 5, 12);
|
private static final KitDistributedIdUtil INSTANCE = new KitDistributedIdUtil(20, 12, 5, 5, 12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-10
@@ -16,6 +16,11 @@
|
|||||||
|
|
||||||
package cn.odboy.util;
|
package cn.odboy.util;
|
||||||
|
|
||||||
|
import static cn.odboy.constant.SystemConst.SYMBOL_ADD;
|
||||||
|
import static cn.odboy.constant.SystemConst.SYMBOL_AT;
|
||||||
|
import static cn.odboy.constant.SystemConst.SYMBOL_EQUAL;
|
||||||
|
import static cn.odboy.constant.SystemConst.SYMBOL_SUBTRACT;
|
||||||
|
|
||||||
import cn.hutool.core.io.IoUtil;
|
import cn.hutool.core.io.IoUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.poi.excel.BigExcelWriter;
|
import cn.hutool.poi.excel.BigExcelWriter;
|
||||||
@@ -45,11 +50,6 @@ import org.apache.poi.util.IOUtils;
|
|||||||
import org.apache.poi.xssf.streaming.SXSSFSheet;
|
import org.apache.poi.xssf.streaming.SXSSFSheet;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import static cn.odboy.constant.SystemConst.SYMBOL_ADD;
|
|
||||||
import static cn.odboy.constant.SystemConst.SYMBOL_AT;
|
|
||||||
import static cn.odboy.constant.SystemConst.SYMBOL_EQUAL;
|
|
||||||
import static cn.odboy.constant.SystemConst.SYMBOL_SUBTRACT;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File工具类, 扩展 hutool 工具包
|
* File工具类, 扩展 hutool 工具包
|
||||||
*/
|
*/
|
||||||
@@ -113,13 +113,13 @@ public final class KitFileUtil extends cn.hutool.core.io.FileUtil {
|
|||||||
String resultSize;
|
String resultSize;
|
||||||
if (size / GB >= 1) {
|
if (size / GB >= 1) {
|
||||||
//如果当前Byte的值大于等于1GB
|
//如果当前Byte的值大于等于1GB
|
||||||
resultSize = DF.format(size / (float)GB) + " GB";
|
resultSize = DF.format(size / (float) GB) + " GB";
|
||||||
} else if (size / MB >= 1) {
|
} else if (size / MB >= 1) {
|
||||||
//如果当前Byte的值大于等于1MB
|
//如果当前Byte的值大于等于1MB
|
||||||
resultSize = DF.format(size / (float)MB) + " MB";
|
resultSize = DF.format(size / (float) MB) + " MB";
|
||||||
} else if (size / KB >= 1) {
|
} else if (size / KB >= 1) {
|
||||||
//如果当前Byte的值大于等于1KB
|
//如果当前Byte的值大于等于1KB
|
||||||
resultSize = DF.format(size / (float)KB) + " KB";
|
resultSize = DF.format(size / (float) KB) + " KB";
|
||||||
} else {
|
} else {
|
||||||
resultSize = size + " B";
|
resultSize = size + " B";
|
||||||
}
|
}
|
||||||
@@ -209,7 +209,7 @@ public final class KitFileUtil extends cn.hutool.core.io.FileUtil {
|
|||||||
}).toList();
|
}).toList();
|
||||||
// 一次性写出内容, 使用默认样式,强制输出标题
|
// 一次性写出内容, 使用默认样式,强制输出标题
|
||||||
writer.write(sanitizedList, true);
|
writer.write(sanitizedList, true);
|
||||||
SXSSFSheet sheet = (SXSSFSheet)writer.getSheet();
|
SXSSFSheet sheet = (SXSSFSheet) writer.getSheet();
|
||||||
//上面需要强转SXSSFSheet 不然没有trackAllColumnsForAutoSizing方法
|
//上面需要强转SXSSFSheet 不然没有trackAllColumnsForAutoSizing方法
|
||||||
sheet.trackAllColumnsForAutoSizing();
|
sheet.trackAllColumnsForAutoSizing();
|
||||||
//列宽自适应
|
//列宽自适应
|
||||||
@@ -281,7 +281,7 @@ public final class KitFileUtil extends cn.hutool.core.io.FileUtil {
|
|||||||
* 获取文件字节数组
|
* 获取文件字节数组
|
||||||
*/
|
*/
|
||||||
private static byte[] getByte(File file) {
|
private static byte[] getByte(File file) {
|
||||||
byte[] b = new byte[(int)file.length()];
|
byte[] b = new byte[(int) file.length()];
|
||||||
InputStream in = null;
|
InputStream in = null;
|
||||||
try {
|
try {
|
||||||
in = Files.newInputStream(file.toPath());
|
in = Files.newInputStream(file.toPath());
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import net.dreamlu.mica.ip2region.core.IpInfo;
|
|||||||
*/
|
*/
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public final class KitIPUtil {
|
public final class KitIPUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注入bean
|
* 注入bean
|
||||||
*/
|
*/
|
||||||
|
|||||||
+5
-2
@@ -30,12 +30,15 @@ import lombok.experimental.UtilityClass;
|
|||||||
*/
|
*/
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public final class KitJsonUtil {
|
public final class KitJsonUtil {
|
||||||
|
|
||||||
public static <K, V> Map<K, V> toMap(String jsonStr, Class<K> kClass, Class<V> vClass) {
|
public static <K, V> Map<K, V> toMap(String jsonStr, Class<K> kClass, Class<V> vClass) {
|
||||||
return JSON.parseObject(jsonStr, new TypeReference<>() {});
|
return JSON.parseObject(jsonStr, new TypeReference<>() {
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <V> List<V> toList(String jsonStr, Class<V> vClass) {
|
public static <V> List<V> toList(String jsonStr, Class<V> vClass) {
|
||||||
return JSON.parseObject(jsonStr, new TypeReference<>() {});
|
return JSON.parseObject(jsonStr, new TypeReference<>() {
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
+3
-3
@@ -32,6 +32,7 @@ import lombok.experimental.UtilityClass;
|
|||||||
*/
|
*/
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public final class KitListUtil {
|
public final class KitListUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据对象T的属性去重
|
* 根据对象T的属性去重
|
||||||
*
|
*
|
||||||
@@ -44,9 +45,8 @@ public final class KitListUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* list转map, 保留新值 -> Map<String, User> userMap = items.stream().collect(Collectors.toMap(User::getName, user ->
|
* list转map, 保留新值 -> Map<String, User> userMap = items.stream().collect(Collectors.toMap(User::getName, user -> user)) <br> list转map, 保留旧值 -> Map<String,
|
||||||
* user)) <br> list转map, 保留旧值 -> Map<String, User> userMap = users.stream().collect(Collectors.toMap(User::getName,
|
* User> userMap = users.stream().collect(Collectors.toMap(User::getName, user -> user, (existing, replacement) -> existing));
|
||||||
* user -> user, (existing, replacement) -> existing));
|
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
List<KitBaseUserTimeTb> entities = new ArrayList<>();
|
List<KitBaseUserTimeTb> entities = new ArrayList<>();
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import lombok.experimental.UtilityClass;
|
|||||||
*/
|
*/
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public final class KitLogFmtUtil {
|
public final class KitLogFmtUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 替换字符串中的占位符 {} 为传入的参数
|
* 替换字符串中的占位符 {} 为传入的参数
|
||||||
*
|
*
|
||||||
|
|||||||
+1
@@ -32,6 +32,7 @@ import lombok.experimental.UtilityClass;
|
|||||||
*/
|
*/
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public class KitResourceTemplateUtil {
|
public class KitResourceTemplateUtil {
|
||||||
|
|
||||||
public static String render(String moduleName, String filename, Dict params) {
|
public static String render(String moduleName, String filename, Dict params) {
|
||||||
String path = StrUtil.isBlank(moduleName) ? "template" : "template/" + moduleName;
|
String path = StrUtil.isBlank(moduleName) ? "template" : "template/" + moduleName;
|
||||||
TemplateEngine engine =
|
TemplateEngine engine =
|
||||||
|
|||||||
+2
-1
@@ -32,8 +32,9 @@ import org.aspectj.lang.reflect.MethodSignature;
|
|||||||
* @date 2025-05-08
|
* @date 2025-05-08
|
||||||
*/
|
*/
|
||||||
public class KitReturnValueHandleUtil {
|
public class KitReturnValueHandleUtil {
|
||||||
|
|
||||||
public static Object getDefaultValue(ProceedingJoinPoint joinPoint) {
|
public static Object getDefaultValue(ProceedingJoinPoint joinPoint) {
|
||||||
MethodSignature signature = (MethodSignature)joinPoint.getSignature();
|
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
|
||||||
Method method = signature.getMethod();
|
Method method = signature.getMethod();
|
||||||
// 获取目标方法的返回值类型
|
// 获取目标方法的返回值类型
|
||||||
Class<?> returnType = method.getReturnType();
|
Class<?> returnType = method.getReturnType();
|
||||||
|
|||||||
+2
-2
@@ -187,8 +187,8 @@ public final class KitRsaEncryptUtil {
|
|||||||
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
|
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
|
||||||
keyPairGenerator.initialize(1024);
|
keyPairGenerator.initialize(1024);
|
||||||
KeyPair keyPair = keyPairGenerator.generateKeyPair();
|
KeyPair keyPair = keyPairGenerator.generateKeyPair();
|
||||||
RSAPublicKey rsaPublicKey = (RSAPublicKey)keyPair.getPublic();
|
RSAPublicKey rsaPublicKey = (RSAPublicKey) keyPair.getPublic();
|
||||||
RSAPrivateKey rsaPrivateKey = (RSAPrivateKey)keyPair.getPrivate();
|
RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) keyPair.getPrivate();
|
||||||
String publicKeyString = Base64.encodeBase64String(rsaPublicKey.getEncoded());
|
String publicKeyString = Base64.encodeBase64String(rsaPublicKey.getEncoded());
|
||||||
String privateKeyString = Base64.encodeBase64String(rsaPrivateKey.getEncoded());
|
String privateKeyString = Base64.encodeBase64String(rsaPrivateKey.getEncoded());
|
||||||
return new RsaKeyPair(publicKeyString, privateKeyString);
|
return new RsaKeyPair(publicKeyString, privateKeyString);
|
||||||
|
|||||||
+3
-6
@@ -34,8 +34,7 @@ public final class KitStringUtil {
|
|||||||
/**
|
/**
|
||||||
* 驼峰命名法工具
|
* 驼峰命名法工具
|
||||||
*
|
*
|
||||||
* @return toCamelCase(" hello_world ") == "helloWorld" toCapitalizeCamelCase("hello_world") == "HelloWorld"
|
* @return toCamelCase(" hello_world ") == "helloWorld" toCapitalizeCamelCase("hello_world") == "HelloWorld" toUnderScoreCase("helloWorld") = "hello_world"
|
||||||
* toUnderScoreCase("helloWorld") = "hello_world"
|
|
||||||
*/
|
*/
|
||||||
public static String toCamelCase(String s) {
|
public static String toCamelCase(String s) {
|
||||||
if (s == null) {
|
if (s == null) {
|
||||||
@@ -65,8 +64,7 @@ public final class KitStringUtil {
|
|||||||
/**
|
/**
|
||||||
* 驼峰命名法工具
|
* 驼峰命名法工具
|
||||||
*
|
*
|
||||||
* @return toCamelCase(" hello_world ") == "helloWorld" toCapitalizeCamelCase("hello_world") == "HelloWorld"
|
* @return toCamelCase(" hello_world ") == "helloWorld" toCapitalizeCamelCase("hello_world") == "HelloWorld" toUnderScoreCase("helloWorld") = "hello_world"
|
||||||
* toUnderScoreCase("helloWorld") = "hello_world"
|
|
||||||
*/
|
*/
|
||||||
public static String toCapitalizeCamelCase(String s) {
|
public static String toCapitalizeCamelCase(String s) {
|
||||||
if (s == null) {
|
if (s == null) {
|
||||||
@@ -79,8 +77,7 @@ public final class KitStringUtil {
|
|||||||
/**
|
/**
|
||||||
* 驼峰命名法工具
|
* 驼峰命名法工具
|
||||||
*
|
*
|
||||||
* @return toCamelCase(" hello_world ") == "helloWorld" toCapitalizeCamelCase("hello_world") == "HelloWorld"
|
* @return toCamelCase(" hello_world ") == "helloWorld" toCapitalizeCamelCase("hello_world") == "HelloWorld" toUnderScoreCase("helloWorld") = "hello_world"
|
||||||
* toUnderScoreCase("helloWorld") = "hello_world"
|
|
||||||
*/
|
*/
|
||||||
public static String toUnderScoreCase(String s) {
|
public static String toUnderScoreCase(String s) {
|
||||||
if (s == null) {
|
if (s == null) {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import oshi.hardware.CentralProcessor;
|
|||||||
* @date 2025-08-11
|
* @date 2025-08-11
|
||||||
*/
|
*/
|
||||||
public class KitSystemUtil {
|
public class KitSystemUtil {
|
||||||
|
|
||||||
public static int getCpuCount() {
|
public static int getCpuCount() {
|
||||||
SystemInfo systemInfo = new SystemInfo();
|
SystemInfo systemInfo = new SystemInfo();
|
||||||
CentralProcessor processor = systemInfo.getHardware().getProcessor();
|
CentralProcessor processor = systemInfo.getHardware().getProcessor();
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import lombok.experimental.UtilityClass;
|
|||||||
*/
|
*/
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public final class KitValidUtil {
|
public final class KitValidUtil {
|
||||||
|
|
||||||
private static final Validator VALIDATOR;
|
private static final Validator VALIDATOR;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|||||||
+1
-1
@@ -21,8 +21,8 @@ import cn.odboy.system.dal.model.SystemUserLoginArgs;
|
|||||||
import cn.odboy.system.service.SystemAuthService;
|
import cn.odboy.system.service.SystemAuthService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import java.util.Map;
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.Map;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
|||||||
+1
-1
@@ -24,9 +24,9 @@ import cn.odboy.system.service.SystemDeptService;
|
|||||||
import cn.odboy.util.KitPageUtil;
|
import cn.odboy.util.KitPageUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
|||||||
+1
-1
@@ -24,10 +24,10 @@ import cn.odboy.system.service.SystemDictService;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
|||||||
+1
-1
@@ -24,9 +24,9 @@ import cn.odboy.system.service.SystemJobService;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
|||||||
+1
-1
@@ -23,8 +23,8 @@ import cn.odboy.system.service.SystemLocalStorageService;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import java.io.IOException;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
|||||||
-3
@@ -21,7 +21,6 @@ import cn.odboy.framework.exception.BadRequestException;
|
|||||||
import cn.odboy.system.dal.dataobject.SystemMenuTb;
|
import cn.odboy.system.dal.dataobject.SystemMenuTb;
|
||||||
import cn.odboy.system.dal.model.SystemMenuVo;
|
import cn.odboy.system.dal.model.SystemMenuVo;
|
||||||
import cn.odboy.system.dal.model.SystemQueryMenuArgs;
|
import cn.odboy.system.dal.model.SystemQueryMenuArgs;
|
||||||
import cn.odboy.system.dal.mysql.SystemMenuMapper;
|
|
||||||
import cn.odboy.system.service.SystemMenuService;
|
import cn.odboy.system.service.SystemMenuService;
|
||||||
import cn.odboy.util.KitPageUtil;
|
import cn.odboy.util.KitPageUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -47,8 +46,6 @@ public class SystemMenuController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SystemMenuService systemMenuService;
|
private SystemMenuService systemMenuService;
|
||||||
@Autowired
|
|
||||||
private SystemMenuMapper systemMenuMapper;
|
|
||||||
|
|
||||||
@ApiOperation("导出菜单数据")
|
@ApiOperation("导出菜单数据")
|
||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
|
|||||||
+1
-1
@@ -23,10 +23,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
|||||||
+1
-1
@@ -24,8 +24,8 @@ import cn.odboy.system.service.SystemOssStorageService;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import java.io.IOException;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
|||||||
+1
-1
@@ -25,9 +25,9 @@ import cn.odboy.system.service.SystemQuartzJobService;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
|||||||
+1
-1
@@ -26,10 +26,10 @@ import cn.odboy.system.service.SystemRoleService;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
|||||||
+1
-7
@@ -23,16 +23,14 @@ import cn.odboy.system.dal.model.SystemQueryUserArgs;
|
|||||||
import cn.odboy.system.dal.model.SystemUpdateUserPasswordArgs;
|
import cn.odboy.system.dal.model.SystemUpdateUserPasswordArgs;
|
||||||
import cn.odboy.system.dal.model.SystemUserVo;
|
import cn.odboy.system.dal.model.SystemUserVo;
|
||||||
import cn.odboy.system.framework.permission.core.KitSecurityHelper;
|
import cn.odboy.system.framework.permission.core.KitSecurityHelper;
|
||||||
import cn.odboy.system.service.SystemDataService;
|
|
||||||
import cn.odboy.system.service.SystemDeptService;
|
|
||||||
import cn.odboy.system.service.SystemUserService;
|
import cn.odboy.system.service.SystemUserService;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -53,10 +51,6 @@ public class SystemUserController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SystemUserService systemUserService;
|
private SystemUserService systemUserService;
|
||||||
@Autowired
|
|
||||||
private SystemDataService systemDataService;
|
|
||||||
@Autowired
|
|
||||||
private SystemDeptService systemDeptService;
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("导出用户数据")
|
@ApiOperation("导出用户数据")
|
||||||
|
|||||||
+24
-10
@@ -35,16 +35,30 @@ import lombok.Setter;
|
|||||||
@TableName("system_dept")
|
@TableName("system_dept")
|
||||||
public class SystemDeptTb extends KitBaseUserTimeTb {
|
public class SystemDeptTb extends KitBaseUserTimeTb {
|
||||||
|
|
||||||
@NotNull(groups = Update.class) @TableId(value = "dept_id", type = IdType.AUTO)
|
@NotNull(groups = Update.class)
|
||||||
@ApiModelProperty(value = "ID", hidden = true) private Long id;
|
@TableId(value = "dept_id", type = IdType.AUTO)
|
||||||
@TableField(exist = false) @JSONField(serialize = false) @ApiModelProperty(value = "角色") private Set<SystemRoleTb>
|
@ApiModelProperty(value = "ID", hidden = true)
|
||||||
|
private Long id;
|
||||||
|
@TableField(exist = false)
|
||||||
|
@JSONField(serialize = false)
|
||||||
|
@ApiModelProperty(value = "角色")
|
||||||
|
private Set<SystemRoleTb>
|
||||||
roles;
|
roles;
|
||||||
@TableField(exist = false) @ApiModelProperty(value = "子部门") private List<SystemDeptTb> children;
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "排序") private Integer deptSort;
|
@ApiModelProperty(value = "子部门")
|
||||||
@NotBlank @ApiModelProperty(value = "部门名称") private String name;
|
private List<SystemDeptTb> children;
|
||||||
@NotNull @ApiModelProperty(value = "是否启用") private Boolean enabled;
|
@ApiModelProperty(value = "排序")
|
||||||
@ApiModelProperty(value = "上级部门") private Long pid;
|
private Integer deptSort;
|
||||||
@ApiModelProperty(value = "子节点数目", hidden = true) private Integer subCount = 0;
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "部门名称")
|
||||||
|
private String name;
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty(value = "是否启用")
|
||||||
|
private Boolean enabled;
|
||||||
|
@ApiModelProperty(value = "上级部门")
|
||||||
|
private Long pid;
|
||||||
|
@ApiModelProperty(value = "子节点数目", hidden = true)
|
||||||
|
private Integer subCount = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
@@ -54,7 +68,7 @@ public class SystemDeptTb extends KitBaseUserTimeTb {
|
|||||||
if (o == null || getClass() != o.getClass()) {
|
if (o == null || getClass() != o.getClass()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SystemDeptTb dept = (SystemDeptTb)o;
|
SystemDeptTb dept = (SystemDeptTb) o;
|
||||||
return Objects.equals(id, dept.id) && Objects.equals(name, dept.name);
|
return Objects.equals(id, dept.id) && Objects.equals(name, dept.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
-6
@@ -30,10 +30,17 @@ import lombok.Setter;
|
|||||||
@TableName("system_dict_detail")
|
@TableName("system_dict_detail")
|
||||||
public class SystemDictDetailTb extends KitBaseUserTimeTb {
|
public class SystemDictDetailTb extends KitBaseUserTimeTb {
|
||||||
|
|
||||||
@NotNull(groups = Update.class) @ApiModelProperty(value = "ID", hidden = true)
|
@NotNull(groups = Update.class)
|
||||||
@TableId(value = "id", type = IdType.AUTO) private Long id;
|
@ApiModelProperty(value = "ID", hidden = true)
|
||||||
@TableField(value = "dict_id") @ApiModelProperty(hidden = true) private Long dictId;
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
@ApiModelProperty(value = "字典标签") private String label;
|
private Long id;
|
||||||
@ApiModelProperty(value = "字典值") private String value;
|
@TableField(value = "dict_id")
|
||||||
@ApiModelProperty(value = "排序") private Integer dictSort = 999;
|
@ApiModelProperty(hidden = true)
|
||||||
|
private Long dictId;
|
||||||
|
@ApiModelProperty(value = "字典标签")
|
||||||
|
private String label;
|
||||||
|
@ApiModelProperty(value = "字典值")
|
||||||
|
private String value;
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
private Integer dictSort = 999;
|
||||||
}
|
}
|
||||||
+10
-4
@@ -32,8 +32,14 @@ import lombok.Setter;
|
|||||||
@TableName("system_dict")
|
@TableName("system_dict")
|
||||||
public class SystemDictTb extends KitBaseUserTimeTb {
|
public class SystemDictTb extends KitBaseUserTimeTb {
|
||||||
|
|
||||||
@NotNull(groups = Update.class) @ApiModelProperty(value = "ID", hidden = true)
|
@NotNull(groups = Update.class)
|
||||||
@TableId(value = "id", type = IdType.AUTO) private Long id;
|
@ApiModelProperty(value = "ID", hidden = true)
|
||||||
@NotBlank @ApiModelProperty(value = "名称") private String name;
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
@ApiModelProperty(value = "描述") @TableField(updateStrategy = FieldStrategy.ALWAYS) private String description;
|
private Long id;
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
|
private String description;
|
||||||
}
|
}
|
||||||
+17
-6
@@ -31,10 +31,21 @@ import lombok.EqualsAndHashCode;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class SystemEmailConfigTb extends KitObject {
|
public class SystemEmailConfigTb extends KitObject {
|
||||||
|
|
||||||
@TableId("config_id") private Long id;
|
@TableId("config_id")
|
||||||
@NotBlank @ApiModelProperty(value = "邮件服务器SMTP地址") private String host;
|
private Long id;
|
||||||
@NotBlank @ApiModelProperty(value = "邮件服务器 SMTP 端口") private String port;
|
@NotBlank
|
||||||
@NotBlank @ApiModelProperty(value = "发件者用户名") private String user;
|
@ApiModelProperty(value = "邮件服务器SMTP地址")
|
||||||
@NotBlank @ApiModelProperty(value = "密码") private String password;
|
private String host;
|
||||||
@NotBlank @ApiModelProperty(value = "收件人") private String fromUser;
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "邮件服务器 SMTP 端口")
|
||||||
|
private String port;
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "发件者用户名")
|
||||||
|
private String user;
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "密码")
|
||||||
|
private String password;
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "收件人")
|
||||||
|
private String fromUser;
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-6
@@ -31,11 +31,19 @@ import lombok.Setter;
|
|||||||
@TableName("system_job")
|
@TableName("system_job")
|
||||||
public class SystemJobTb extends KitBaseUserTimeTb {
|
public class SystemJobTb extends KitBaseUserTimeTb {
|
||||||
|
|
||||||
@NotNull(groups = Update.class) @TableId(value = "id", type = IdType.AUTO)
|
@NotNull(groups = Update.class)
|
||||||
@ApiModelProperty(value = "ID", hidden = true) private Long id;
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
@NotBlank @ApiModelProperty(value = "岗位名称") private String name;
|
@ApiModelProperty(value = "ID", hidden = true)
|
||||||
@NotNull @ApiModelProperty(value = "岗位排序") private Long jobSort;
|
private Long id;
|
||||||
@NotNull @ApiModelProperty(value = "是否启用") private Boolean enabled;
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "岗位名称")
|
||||||
|
private String name;
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty(value = "岗位排序")
|
||||||
|
private Long jobSort;
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty(value = "是否启用")
|
||||||
|
private Boolean enabled;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
@@ -45,7 +53,7 @@ public class SystemJobTb extends KitBaseUserTimeTb {
|
|||||||
if (o == null || getClass() != o.getClass()) {
|
if (o == null || getClass() != o.getClass()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SystemJobTb job = (SystemJobTb)o;
|
SystemJobTb job = (SystemJobTb) o;
|
||||||
return Objects.equals(id, job.id);
|
return Objects.equals(id, job.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-8
@@ -30,14 +30,23 @@ import lombok.Setter;
|
|||||||
@TableName("system_local_storage")
|
@TableName("system_local_storage")
|
||||||
public class SystemLocalStorageTb extends KitBaseUserTimeTb {
|
public class SystemLocalStorageTb extends KitBaseUserTimeTb {
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.AUTO) @ApiModelProperty(value = "ID", hidden = true) private Long id;
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
@ApiModelProperty(value = "真实文件名") private String realName;
|
@ApiModelProperty(value = "ID", hidden = true)
|
||||||
@ApiModelProperty(value = "文件名") private String name;
|
private Long id;
|
||||||
@ApiModelProperty(value = "后缀") private String suffix;
|
@ApiModelProperty(value = "真实文件名")
|
||||||
@ApiModelProperty(value = "路径") private String path;
|
private String realName;
|
||||||
@ApiModelProperty(value = "类型") private String type;
|
@ApiModelProperty(value = "文件名")
|
||||||
@ApiModelProperty(value = "大小") private String size;
|
private String name;
|
||||||
@ApiModelProperty(value = "日期分组") private String dateGroup;
|
@ApiModelProperty(value = "后缀")
|
||||||
|
private String suffix;
|
||||||
|
@ApiModelProperty(value = "路径")
|
||||||
|
private String path;
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String type;
|
||||||
|
@ApiModelProperty(value = "大小")
|
||||||
|
private String size;
|
||||||
|
@ApiModelProperty(value = "日期分组")
|
||||||
|
private String dateGroup;
|
||||||
|
|
||||||
public void copy(SystemLocalStorageTb source) {
|
public void copy(SystemLocalStorageTb source) {
|
||||||
BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
|
BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
|
||||||
|
|||||||
+37
-18
@@ -34,24 +34,43 @@ import lombok.Setter;
|
|||||||
@TableName("system_menu")
|
@TableName("system_menu")
|
||||||
public class SystemMenuTb extends KitBaseUserTimeTb {
|
public class SystemMenuTb extends KitBaseUserTimeTb {
|
||||||
|
|
||||||
@NotNull(groups = {Update.class}) @TableId(value = "menu_id", type = IdType.AUTO)
|
@NotNull(groups = {Update.class})
|
||||||
@ApiModelProperty(value = "ID", hidden = true) private Long id;
|
@TableId(value = "menu_id", type = IdType.AUTO)
|
||||||
@TableField(exist = false) @JSONField(serialize = false) @ApiModelProperty(value = "菜单角色")
|
@ApiModelProperty(value = "ID", hidden = true)
|
||||||
|
private Long id;
|
||||||
|
@TableField(exist = false)
|
||||||
|
@JSONField(serialize = false)
|
||||||
|
@ApiModelProperty(value = "菜单角色")
|
||||||
private Set<SystemRoleTb> roles;
|
private Set<SystemRoleTb> roles;
|
||||||
@TableField(exist = false) private List<SystemMenuTb> children;
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "菜单标题") private String title;
|
private List<SystemMenuTb> children;
|
||||||
@TableField(value = "name") @ApiModelProperty(value = "菜单组件名称") private String componentName;
|
@ApiModelProperty(value = "菜单标题")
|
||||||
@ApiModelProperty(value = "排序") private Integer menuSort = 999;
|
private String title;
|
||||||
@ApiModelProperty(value = "组件路径") private String component;
|
@TableField(value = "name")
|
||||||
@ApiModelProperty(value = "路由地址") private String path;
|
@ApiModelProperty(value = "菜单组件名称")
|
||||||
@ApiModelProperty(value = "菜单类型,目录、菜单、按钮") private Integer type;
|
private String componentName;
|
||||||
@ApiModelProperty(value = "权限标识") private String permission;
|
@ApiModelProperty(value = "排序")
|
||||||
@ApiModelProperty(value = "菜单图标") private String icon;
|
private Integer menuSort = 999;
|
||||||
@ApiModelProperty(value = "缓存") private Boolean cache;
|
@ApiModelProperty(value = "组件路径")
|
||||||
@ApiModelProperty(value = "是否隐藏") private Boolean hidden;
|
private String component;
|
||||||
@ApiModelProperty(value = "上级菜单") private Long pid;
|
@ApiModelProperty(value = "路由地址")
|
||||||
@ApiModelProperty(value = "子节点数目", hidden = true) private Integer subCount = 0;
|
private String path;
|
||||||
@ApiModelProperty(value = "外链菜单") private Boolean iFrame;
|
@ApiModelProperty(value = "菜单类型,目录、菜单、按钮")
|
||||||
|
private Integer type;
|
||||||
|
@ApiModelProperty(value = "权限标识")
|
||||||
|
private String permission;
|
||||||
|
@ApiModelProperty(value = "菜单图标")
|
||||||
|
private String icon;
|
||||||
|
@ApiModelProperty(value = "缓存")
|
||||||
|
private Boolean cache;
|
||||||
|
@ApiModelProperty(value = "是否隐藏")
|
||||||
|
private Boolean hidden;
|
||||||
|
@ApiModelProperty(value = "上级菜单")
|
||||||
|
private Long pid;
|
||||||
|
@ApiModelProperty(value = "子节点数目", hidden = true)
|
||||||
|
private Integer subCount = 0;
|
||||||
|
@ApiModelProperty(value = "外链菜单")
|
||||||
|
private Boolean iFrame;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
@@ -61,7 +80,7 @@ public class SystemMenuTb extends KitBaseUserTimeTb {
|
|||||||
if (o == null || getClass() != o.getClass()) {
|
if (o == null || getClass() != o.getClass()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SystemMenuTb menu = (SystemMenuTb)o;
|
SystemMenuTb menu = (SystemMenuTb) o;
|
||||||
return Objects.equals(id, menu.id);
|
return Objects.equals(id, menu.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+23
-11
@@ -46,45 +46,57 @@ public class SystemOperationLogTb extends KitObject {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("id") @TableId(value = "id", type = IdType.AUTO) private Long id;
|
@ApiModelProperty("id")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 业务名称
|
* 业务名称
|
||||||
*/
|
*/
|
||||||
@TableField("biz_name") private String bizName;
|
@TableField("biz_name")
|
||||||
|
private String bizName;
|
||||||
/**
|
/**
|
||||||
* 业务方法
|
* 业务方法
|
||||||
*/
|
*/
|
||||||
@TableField("method") private String method;
|
@TableField("method")
|
||||||
|
private String method;
|
||||||
/**
|
/**
|
||||||
* 业务参数
|
* 业务参数
|
||||||
*/
|
*/
|
||||||
@TableField("params") private String params;
|
@TableField("params")
|
||||||
|
private String params;
|
||||||
/**
|
/**
|
||||||
* 访问来源IP
|
* 访问来源IP
|
||||||
*/
|
*/
|
||||||
@TableField("request_ip") private String requestIp;
|
@TableField("request_ip")
|
||||||
|
private String requestIp;
|
||||||
/**
|
/**
|
||||||
* 执行时间
|
* 执行时间
|
||||||
*/
|
*/
|
||||||
@TableField("execute_time") private Long executeTime;
|
@TableField("execute_time")
|
||||||
|
private Long executeTime;
|
||||||
/**
|
/**
|
||||||
* 用户名
|
* 用户名
|
||||||
*/
|
*/
|
||||||
@TableField("username") private String username;
|
@TableField("username")
|
||||||
|
private String username;
|
||||||
/**
|
/**
|
||||||
* 访问来源地址
|
* 访问来源地址
|
||||||
*/
|
*/
|
||||||
@TableField("address") private String address;
|
@TableField("address")
|
||||||
|
private String address;
|
||||||
/**
|
/**
|
||||||
* 浏览器信息
|
* 浏览器信息
|
||||||
*/
|
*/
|
||||||
@TableField("browser_info") private String browserInfo;
|
@TableField("browser_info")
|
||||||
|
private String browserInfo;
|
||||||
/**
|
/**
|
||||||
* 异常详情
|
* 异常详情
|
||||||
*/
|
*/
|
||||||
@TableField("exception_detail") private String exceptionDetail;
|
@TableField("exception_detail")
|
||||||
|
private String exceptionDetail;
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
@TableField(value = "create_time", fill = FieldFill.INSERT) private Date createTime;
|
@TableField(value = "create_time", fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
}
|
}
|
||||||
|
|||||||
+39
-13
@@ -39,17 +39,43 @@ import lombok.Setter;
|
|||||||
@ApiModel(value = "SystemOssStorage对象", description = "OSS存储")
|
@ApiModel(value = "SystemOssStorage对象", description = "OSS存储")
|
||||||
public class SystemOssStorageTb extends KitBaseUserTimeTb {
|
public class SystemOssStorageTb extends KitBaseUserTimeTb {
|
||||||
|
|
||||||
@ApiModelProperty("ID") @TableId(value = "id", type = IdType.AUTO) private Long id;
|
@ApiModelProperty("ID")
|
||||||
@TableField("service_type") @ApiModelProperty("类型,比如minio") private String serviceType;
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
@TableField("endpoint") @ApiModelProperty("服务地址") private String endpoint;
|
private Long id;
|
||||||
@TableField("bucket_name") @ApiModelProperty("存储桶名称") private String bucketName;
|
@TableField("service_type")
|
||||||
@TableField("file_name") @ApiModelProperty("完整文件名称") private String fileName;
|
@ApiModelProperty("类型,比如minio")
|
||||||
@TableField("file_size") @ApiModelProperty("文件大小, 单位:字节") private Long fileSize;
|
private String serviceType;
|
||||||
@TableField("file_mime") @ApiModelProperty("文件类型") private String fileMime;
|
@TableField("endpoint")
|
||||||
@ApiModelProperty("短文件名") @TableField("file_prefix") private String filePrefix;
|
@ApiModelProperty("服务地址")
|
||||||
@ApiModelProperty("文件后缀") @TableField("file_suffix") private String fileSuffix;
|
private String endpoint;
|
||||||
@TableField("file_md5") @ApiModelProperty("文件md5") private String fileMd5;
|
@TableField("bucket_name")
|
||||||
@TableField("file_url") @ApiModelProperty("文件链接") private String fileUrl;
|
@ApiModelProperty("存储桶名称")
|
||||||
@TableField("file_code") @ApiModelProperty("文件编码") private String fileCode;
|
private String bucketName;
|
||||||
@TableField("object_name") @ApiModelProperty("对象路径") private String objectName;
|
@TableField("file_name")
|
||||||
|
@ApiModelProperty("完整文件名称")
|
||||||
|
private String fileName;
|
||||||
|
@TableField("file_size")
|
||||||
|
@ApiModelProperty("文件大小, 单位:字节")
|
||||||
|
private Long fileSize;
|
||||||
|
@TableField("file_mime")
|
||||||
|
@ApiModelProperty("文件类型")
|
||||||
|
private String fileMime;
|
||||||
|
@ApiModelProperty("短文件名")
|
||||||
|
@TableField("file_prefix")
|
||||||
|
private String filePrefix;
|
||||||
|
@ApiModelProperty("文件后缀")
|
||||||
|
@TableField("file_suffix")
|
||||||
|
private String fileSuffix;
|
||||||
|
@TableField("file_md5")
|
||||||
|
@ApiModelProperty("文件md5")
|
||||||
|
private String fileMd5;
|
||||||
|
@TableField("file_url")
|
||||||
|
@ApiModelProperty("文件链接")
|
||||||
|
private String fileUrl;
|
||||||
|
@TableField("file_code")
|
||||||
|
@ApiModelProperty("文件编码")
|
||||||
|
private String fileCode;
|
||||||
|
@TableField("object_name")
|
||||||
|
@ApiModelProperty("对象路径")
|
||||||
|
private String objectName;
|
||||||
}
|
}
|
||||||
|
|||||||
+33
-13
@@ -33,18 +33,38 @@ import lombok.Setter;
|
|||||||
public class SystemQuartzJobTb extends KitBaseUserTimeTb {
|
public class SystemQuartzJobTb extends KitBaseUserTimeTb {
|
||||||
|
|
||||||
public static final String JOB_KEY = "JOB_KEY";
|
public static final String JOB_KEY = "JOB_KEY";
|
||||||
@TableId(value = "id", type = IdType.AUTO) @NotNull(groups = {Update.class}) private Long id;
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
@TableField(exist = false) @ApiModelProperty(value = "用于子任务唯一标识", hidden = true) private String uuid;
|
@NotNull(groups = {Update.class})
|
||||||
@ApiModelProperty(value = "定时器名称") private String jobName;
|
private Long id;
|
||||||
@NotBlank @ApiModelProperty(value = "Bean名称") private String beanName;
|
@TableField(exist = false)
|
||||||
@NotBlank @ApiModelProperty(value = "方法名称") private String methodName;
|
@ApiModelProperty(value = "用于子任务唯一标识", hidden = true)
|
||||||
@ApiModelProperty(value = "参数") private String params;
|
private String uuid;
|
||||||
@NotBlank @ApiModelProperty(value = "cron表达式") private String cronExpression;
|
@ApiModelProperty(value = "定时器名称")
|
||||||
@ApiModelProperty(value = "状态:暂停或启动") private Boolean isPause = false;
|
private String jobName;
|
||||||
@ApiModelProperty(value = "负责人") private String personInCharge;
|
@NotBlank
|
||||||
@ApiModelProperty(value = "报警邮箱") private String email;
|
@ApiModelProperty(value = "Bean名称")
|
||||||
@ApiModelProperty(value = "子任务") private String subTask;
|
private String beanName;
|
||||||
@ApiModelProperty(value = "失败后暂停") private Boolean pauseAfterFailure;
|
@NotBlank
|
||||||
@NotBlank @ApiModelProperty(value = "备注") @TableField(updateStrategy = FieldStrategy.ALWAYS) private String
|
@ApiModelProperty(value = "方法名称")
|
||||||
|
private String methodName;
|
||||||
|
@ApiModelProperty(value = "参数")
|
||||||
|
private String params;
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "cron表达式")
|
||||||
|
private String cronExpression;
|
||||||
|
@ApiModelProperty(value = "状态:暂停或启动")
|
||||||
|
private Boolean isPause = false;
|
||||||
|
@ApiModelProperty(value = "负责人")
|
||||||
|
private String personInCharge;
|
||||||
|
@ApiModelProperty(value = "报警邮箱")
|
||||||
|
private String email;
|
||||||
|
@ApiModelProperty(value = "子任务")
|
||||||
|
private String subTask;
|
||||||
|
@ApiModelProperty(value = "失败后暂停")
|
||||||
|
private Boolean pauseAfterFailure;
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
|
private String
|
||||||
description;
|
description;
|
||||||
}
|
}
|
||||||
+22
-10
@@ -31,14 +31,26 @@ import lombok.EqualsAndHashCode;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class SystemQuartzLogTb extends KitObject {
|
public class SystemQuartzLogTb extends KitObject {
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.AUTO) @ApiModelProperty(value = "ID", hidden = true) private Long id;
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
@ApiModelProperty(value = "任务名称", hidden = true) private String jobName;
|
@ApiModelProperty(value = "ID", hidden = true)
|
||||||
@ApiModelProperty(value = "bean名称", hidden = true) private String beanName;
|
private Long id;
|
||||||
@ApiModelProperty(value = "方法名称", hidden = true) private String methodName;
|
@ApiModelProperty(value = "任务名称", hidden = true)
|
||||||
@ApiModelProperty(value = "参数", hidden = true) private String params;
|
private String jobName;
|
||||||
@ApiModelProperty(value = "cron表达式", hidden = true) private String cronExpression;
|
@ApiModelProperty(value = "bean名称", hidden = true)
|
||||||
@ApiModelProperty(value = "状态", hidden = true) private Boolean isSuccess;
|
private String beanName;
|
||||||
@ApiModelProperty(value = "异常详情", hidden = true) private String exceptionDetail;
|
@ApiModelProperty(value = "方法名称", hidden = true)
|
||||||
@ApiModelProperty(value = "执行耗时", hidden = true) private Long time;
|
private String methodName;
|
||||||
@TableField(fill = FieldFill.INSERT) @ApiModelProperty(value = "创建时间", hidden = true) private Date createTime;
|
@ApiModelProperty(value = "参数", hidden = true)
|
||||||
|
private String params;
|
||||||
|
@ApiModelProperty(value = "cron表达式", hidden = true)
|
||||||
|
private String cronExpression;
|
||||||
|
@ApiModelProperty(value = "状态", hidden = true)
|
||||||
|
private Boolean isSuccess;
|
||||||
|
@ApiModelProperty(value = "异常详情", hidden = true)
|
||||||
|
private String exceptionDetail;
|
||||||
|
@ApiModelProperty(value = "执行耗时", hidden = true)
|
||||||
|
private Long time;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||||
|
private Date createTime;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -26,6 +26,8 @@ import lombok.Setter;
|
|||||||
@TableName("system_roles_depts")
|
@TableName("system_roles_depts")
|
||||||
public class SystemRoleDeptTb extends KitObject {
|
public class SystemRoleDeptTb extends KitObject {
|
||||||
|
|
||||||
@TableField(value = "role_id") private Long roleId;
|
@TableField(value = "role_id")
|
||||||
@TableField(value = "dept_id") private Long deptId;
|
private Long roleId;
|
||||||
|
@TableField(value = "dept_id")
|
||||||
|
private Long deptId;
|
||||||
}
|
}
|
||||||
+4
-2
@@ -13,6 +13,8 @@ import lombok.Setter;
|
|||||||
@TableName("system_roles_menus")
|
@TableName("system_roles_menus")
|
||||||
public class SystemRoleMenuTb {
|
public class SystemRoleMenuTb {
|
||||||
|
|
||||||
@TableField(value = "role_id") private Long roleId;
|
@TableField(value = "role_id")
|
||||||
@TableField(value = "menu_id") private Long menuId;
|
private Long roleId;
|
||||||
|
@TableField(value = "menu_id")
|
||||||
|
private Long menuId;
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-7
@@ -37,13 +37,21 @@ import lombok.Setter;
|
|||||||
@TableName("system_role")
|
@TableName("system_role")
|
||||||
public class SystemRoleTb extends KitBaseUserTimeTb {
|
public class SystemRoleTb extends KitBaseUserTimeTb {
|
||||||
|
|
||||||
@NotNull(groups = {Update.class}) @TableId(value = "role_id", type = IdType.AUTO)
|
@NotNull(groups = {Update.class})
|
||||||
@ApiModelProperty(value = "ID", hidden = true) private Long id;
|
@TableId(value = "role_id", type = IdType.AUTO)
|
||||||
@NotBlank @ApiModelProperty(value = "名称", hidden = true) private String name;
|
@ApiModelProperty(value = "ID", hidden = true)
|
||||||
@ApiModelProperty(value = "数据权限,全部 、 本级 、 自定义") private String dataScope =
|
private Long id;
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "名称", hidden = true)
|
||||||
|
private String name;
|
||||||
|
@ApiModelProperty(value = "数据权限,全部 、 本级 、 自定义")
|
||||||
|
private String dataScope =
|
||||||
SystemDataScopeEnum.THIS_LEVEL.getValue();
|
SystemDataScopeEnum.THIS_LEVEL.getValue();
|
||||||
@ApiModelProperty(value = "级别,数值越小,级别越大") private Integer level = 3;
|
@ApiModelProperty(value = "级别,数值越小,级别越大")
|
||||||
@ApiModelProperty(value = "描述") @TableField(updateStrategy = FieldStrategy.ALWAYS) private String description;
|
private Integer level = 3;
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
|
private String description;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
@@ -53,7 +61,7 @@ public class SystemRoleTb extends KitBaseUserTimeTb {
|
|||||||
if (o == null || getClass() != o.getClass()) {
|
if (o == null || getClass() != o.getClass()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SystemRoleTb role = (SystemRoleTb)o;
|
SystemRoleTb role = (SystemRoleTb) o;
|
||||||
return Objects.equals(id, role.id);
|
return Objects.equals(id, role.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user