mirror of https://github.com/elunez/eladmin
commit
8fadcc28ae
|
@ -11,10 +11,10 @@
|
|||
</properties>
|
||||
|
||||
<artifactId>eladmin-common</artifactId>
|
||||
<name>公共模块</name>
|
||||
<name>Common Module</name>
|
||||
|
||||
<dependencies>
|
||||
<!--工具包-->
|
||||
<!-- Toolkit -->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
|
|
|
@ -28,60 +28,60 @@ import java.lang.annotation.Target;
|
|||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Query {
|
||||
|
||||
// Dong ZhaoYang 2017/8/7 基本对象的属性名
|
||||
// Dong ZhaoYang 2017/8/7 Property name of the basic object
|
||||
String propName() default "";
|
||||
// Dong ZhaoYang 2017/8/7 查询方式
|
||||
// Dong ZhaoYang 2017/8/7 Query type
|
||||
Type type() default Type.EQUAL;
|
||||
|
||||
/**
|
||||
* 连接查询的属性名,如User类中的dept
|
||||
* Property name for join query, e.g., dept in User class
|
||||
*/
|
||||
String joinName() default "";
|
||||
|
||||
/**
|
||||
* 默认左连接
|
||||
* Default left join
|
||||
*/
|
||||
Join join() default Join.LEFT;
|
||||
|
||||
/**
|
||||
* 多字段模糊搜索,仅支持String类型字段,多个用逗号隔开, 如@Query(blurry = "email,username")
|
||||
* Multi-field fuzzy search, only supports String type fields, separated by commas, e.g., @Query(blurry = "email,username")
|
||||
*/
|
||||
String blurry() default "";
|
||||
|
||||
enum Type {
|
||||
// jie 2019/6/4 相等
|
||||
// jie 2019/6/4 Equal
|
||||
EQUAL
|
||||
// Dong ZhaoYang 2017/8/7 大于等于
|
||||
// Dong ZhaoYang 2017/8/7 Greater than or equal to
|
||||
, GREATER_THAN
|
||||
// Dong ZhaoYang 2017/8/7 小于等于
|
||||
// Dong ZhaoYang 2017/8/7 Less than or equal to
|
||||
, LESS_THAN
|
||||
// Dong ZhaoYang 2017/8/7 中模糊查询
|
||||
// Dong ZhaoYang 2017/8/7 Inner fuzzy query
|
||||
, INNER_LIKE
|
||||
// Dong ZhaoYang 2017/8/7 左模糊查询
|
||||
// Dong ZhaoYang 2017/8/7 Left fuzzy query
|
||||
, LEFT_LIKE
|
||||
// Dong ZhaoYang 2017/8/7 右模糊查询
|
||||
// Dong ZhaoYang 2017/8/7 Right fuzzy query
|
||||
, RIGHT_LIKE
|
||||
// Dong ZhaoYang 2017/8/7 小于
|
||||
// Dong ZhaoYang 2017/8/7 Less than
|
||||
, LESS_THAN_NQ
|
||||
// jie 2019/6/4 包含
|
||||
// jie 2019/6/4 Contains
|
||||
, IN
|
||||
// 不包含
|
||||
// Not contains
|
||||
, NOT_IN
|
||||
// 不等于
|
||||
// Not equal
|
||||
,NOT_EQUAL
|
||||
// between
|
||||
,BETWEEN
|
||||
// 不为空
|
||||
// Not null
|
||||
,NOT_NULL
|
||||
// 为空
|
||||
// Is null
|
||||
,IS_NULL,
|
||||
// Aborn Jiang 2022/06/01, 对应SQL: SELECT * FROM table WHERE FIND_IN_SET('querytag', table.tags);
|
||||
// Aborn Jiang 2022/06/01, Corresponds to SQL: SELECT * FROM table WHERE FIND_IN_SET('querytag', table.tags);
|
||||
FIND_IN_SET
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* 适用于简单连接查询,复杂的请自定义该注解,或者使用sql查询
|
||||
* Suitable for simple join queries. For complex cases, please customize this annotation or use SQL queries.
|
||||
*/
|
||||
enum Join {
|
||||
/** jie 2019-6-4 13:18:30 */
|
||||
|
@ -89,4 +89,3 @@ public @interface Query {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||
/**
|
||||
* Annotation for mapping HTTP {@code PATCH} requests onto specific handler
|
||||
* methods.
|
||||
* * 支持匿名访问 PatchMapping
|
||||
* * Supports anonymous access PatchMapping
|
||||
*
|
||||
* @author liaojinlong
|
||||
* @see AnonymousGetMapping
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||
/**
|
||||
* Annotation for mapping HTTP {@code PUT} requests onto specific handler
|
||||
* methods.
|
||||
* * 支持匿名访问 PutMapping
|
||||
* * Supports anonymous access PutMapping
|
||||
*
|
||||
* @author liaojinlong
|
||||
* @see AnonymousGetMapping
|
||||
|
|
|
@ -75,15 +75,15 @@ public class LimitAspect {
|
|||
RedisScript<Long> redisScript = new DefaultRedisScript<>(luaScript, Long.class);
|
||||
Long count = redisTemplate.execute(redisScript, keys, limit.count(), limit.period());
|
||||
if (ObjUtil.isNotNull(count) && count.intValue() <= limit.count()) {
|
||||
logger.info("第{}次访问key为 {},描述为 [{}] 的接口", count, keys, limit.name());
|
||||
logger.info("The {}th access to the key {}, description [{}] interface", count, keys, limit.name());
|
||||
return joinPoint.proceed();
|
||||
} else {
|
||||
throw new BadRequestException("访问次数受限制");
|
||||
throw new BadRequestException("Access count is restricted");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 限流脚本
|
||||
* Rate limiting script
|
||||
*/
|
||||
private String buildLuaScript() {
|
||||
return "local c" +
|
||||
|
|
|
@ -11,23 +11,23 @@ import java.sql.Timestamp;
|
|||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @date 2019年10月24日20:48:53
|
||||
* @date 2019-10-24 20:48:53
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class BaseDTO implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@ApiModelProperty(value = "Creator")
|
||||
private String createBy;
|
||||
|
||||
@ApiModelProperty(value = "修改人")
|
||||
@ApiModelProperty(value = "Updater")
|
||||
private String updateBy;
|
||||
|
||||
@ApiModelProperty(value = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@ApiModelProperty(value = "Creation Time: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@ApiModelProperty(value = "Update Time: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp updateTime;
|
||||
|
||||
|
|
|
@ -33,9 +33,9 @@ import java.lang.reflect.Field;
|
|||
import java.sql.Timestamp;
|
||||
|
||||
/**
|
||||
* 通用字段, is_del 根据需求自行添加
|
||||
* Common fields, add is_del as needed
|
||||
* @author Zheng Jie
|
||||
* @date 2019年10月24日20:46:32
|
||||
* @date 2019-10-24 20:46:32
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
|
@ -45,30 +45,30 @@ public class BaseEntity implements Serializable {
|
|||
|
||||
@CreatedBy
|
||||
@Column(name = "create_by", updatable = false)
|
||||
@ApiModelProperty(value = "创建人", hidden = true)
|
||||
@ApiModelProperty(value = "Creator", hidden = true)
|
||||
private String createBy;
|
||||
|
||||
@LastModifiedBy
|
||||
@Column(name = "update_by")
|
||||
@ApiModelProperty(value = "更新人", hidden = true)
|
||||
@ApiModelProperty(value = "Updater", hidden = true)
|
||||
private String updateBy;
|
||||
|
||||
@CreationTimestamp
|
||||
@Column(name = "create_time", updatable = false)
|
||||
@ApiModelProperty(value = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@ApiModelProperty(value = "Creation time: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp createTime;
|
||||
|
||||
@UpdateTimestamp
|
||||
@Column(name = "update_time")
|
||||
@ApiModelProperty(value = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@ApiModelProperty(value = "Update time: yyyy-MM-dd HH:mm:ss", hidden = true)
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp updateTime;
|
||||
|
||||
/* 分组校验 */
|
||||
/* Group validation */
|
||||
public @interface Create {}
|
||||
|
||||
/* 分组校验 */
|
||||
/* Group validation */
|
||||
public @interface Update {}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,28 +24,28 @@ import java.util.List;
|
|||
public interface BaseMapper<D, E> {
|
||||
|
||||
/**
|
||||
* DTO转Entity
|
||||
* DTO to Entity
|
||||
* @param dto /
|
||||
* @return /
|
||||
*/
|
||||
E toEntity(D dto);
|
||||
|
||||
/**
|
||||
* Entity转DTO
|
||||
* Entity to DTO
|
||||
* @param entity /
|
||||
* @return /
|
||||
*/
|
||||
D toDto(E entity);
|
||||
|
||||
/**
|
||||
* DTO集合转Entity集合
|
||||
* DTO List to Entity List
|
||||
* @param dtoList /
|
||||
* @return /
|
||||
*/
|
||||
List <E> toEntity(List<D> dtoList);
|
||||
|
||||
/**
|
||||
* Entity集合转DTO集合
|
||||
* Entity List to DTO List
|
||||
* @param entityList /
|
||||
* @return /
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.springframework.stereotype.Component;
|
|||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @description : 设置审计
|
||||
* @description : Set audit
|
||||
* @author : Dong ZhaoYang
|
||||
* @date : 2019/10/28
|
||||
*/
|
||||
|
@ -29,17 +29,17 @@ import java.util.Optional;
|
|||
public class AuditorConfig implements AuditorAware<String> {
|
||||
|
||||
/**
|
||||
* 返回操作员标志信息
|
||||
* Return operator identification information
|
||||
*
|
||||
* @return /
|
||||
*/
|
||||
@Override
|
||||
public Optional<String> getCurrentAuditor() {
|
||||
try {
|
||||
// 这里应根据实际业务情况获取具体信息
|
||||
// Here you should obtain specific information according to actual business situation
|
||||
return Optional.of(SecurityUtils.getCurrentUsername());
|
||||
}catch (Exception ignored){}
|
||||
// 用户定时任务,或者无Token调用的情况
|
||||
// For scheduled tasks or cases where Token is not used
|
||||
return Optional.of("System");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,23 +29,23 @@ import java.io.IOException;
|
|||
public class RemoveDruidAdConfig {
|
||||
|
||||
/**
|
||||
* 方法名: removeDruidAdFilterRegistrationBean
|
||||
* 方法描述 除去页面底部的广告
|
||||
* Method name: removeDruidAdFilterRegistrationBean
|
||||
* Method description: Remove the advertisement at the bottom of the page
|
||||
* @param properties com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties
|
||||
* @return org.springframework.boot.web.servlet.FilterRegistrationBean
|
||||
*/
|
||||
@Bean
|
||||
public FilterRegistrationBean removeDruidAdFilterRegistrationBean(DruidStatProperties properties) {
|
||||
|
||||
// 获取web监控页面的参数
|
||||
// Get the parameters of the web monitoring page
|
||||
DruidStatProperties.StatViewServlet config = properties.getStatViewServlet();
|
||||
// 提取common.js的配置路径
|
||||
// Extract the configuration path of common.js
|
||||
String pattern = config.getUrlPattern() != null ? config.getUrlPattern() : "/druid/*";
|
||||
String commonJsPattern = pattern.replaceAll("\\*", "js/common.js");
|
||||
|
||||
final String filePath = "support/http/resources/js/common.js";
|
||||
|
||||
//创建filter进行过滤
|
||||
// Create filter for filtering
|
||||
Filter filter = new Filter() {
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) throws ServletException {}
|
||||
|
@ -55,9 +55,9 @@ public class RemoveDruidAdConfig {
|
|||
HttpServletRequest httpRequest = (HttpServletRequest) request;
|
||||
HttpServletResponse httpResponse = (HttpServletResponse) response;
|
||||
if (httpRequest.getRequestURI().endsWith("js/common.js")) {
|
||||
// 获取common.js
|
||||
// Get common.js
|
||||
String text = Utils.readFromResource(filePath);
|
||||
// 正则替换banner, 除去底部的广告信息
|
||||
// Use regex to replace banner, remove advertisement information at the bottom
|
||||
text = text.replaceAll("<a.*?druid_banner\"></a><br/>", "");
|
||||
text = text.replaceAll("powered by.*?shrek.wang</a>", "");
|
||||
httpResponse.setContentType("application/javascript");
|
||||
|
|
|
@ -20,15 +20,15 @@ import java.math.RoundingMode;
|
|||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @description 计算类
|
||||
* @description Calculation class
|
||||
* @date 2024-12-27
|
||||
**/
|
||||
public class BigDecimalUtils {
|
||||
|
||||
/**
|
||||
* 将对象转换为 BigDecimal
|
||||
* @param obj 输入对象
|
||||
* @return 转换后的 BigDecimal
|
||||
* Convert object to BigDecimal
|
||||
* @param obj Input object
|
||||
* @return Converted BigDecimal
|
||||
*/
|
||||
private static BigDecimal toBigDecimal(Object obj) {
|
||||
if (obj instanceof BigDecimal) {
|
||||
|
@ -45,10 +45,10 @@ public class BigDecimalUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* 加法
|
||||
* @param a 加数
|
||||
* @param b 加数
|
||||
* @return 两个加数的和,保留两位小数
|
||||
* Addition
|
||||
* @param a Addend
|
||||
* @param b Addend
|
||||
* @return Sum of two addends, rounded to two decimal places
|
||||
*/
|
||||
public static BigDecimal add(Object a, Object b) {
|
||||
BigDecimal bdA = toBigDecimal(a);
|
||||
|
@ -57,10 +57,10 @@ public class BigDecimalUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* 减法
|
||||
* @param a 被减数
|
||||
* @param b 减数
|
||||
* @return 两数的差,保留两位小数
|
||||
* Subtraction
|
||||
* @param a Minuend
|
||||
* @param b Subtrahend
|
||||
* @return Difference of two numbers, rounded to two decimal places
|
||||
*/
|
||||
public static BigDecimal subtract(Object a, Object b) {
|
||||
BigDecimal bdA = toBigDecimal(a);
|
||||
|
@ -69,10 +69,10 @@ public class BigDecimalUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* 乘法
|
||||
* @param a 乘数
|
||||
* @param b 乘数
|
||||
* @return 两个乘数的积,保留两位小数
|
||||
* Multiplication
|
||||
* @param a Multiplier
|
||||
* @param b Multiplier
|
||||
* @return Product of two multipliers, rounded to two decimal places
|
||||
*/
|
||||
public static BigDecimal multiply(Object a, Object b) {
|
||||
BigDecimal bdA = toBigDecimal(a);
|
||||
|
@ -81,10 +81,10 @@ public class BigDecimalUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* 除法
|
||||
* @param a 被除数
|
||||
* @param b 除数
|
||||
* @return 两数的商,保留两位小数
|
||||
* Division
|
||||
* @param a Dividend
|
||||
* @param b Divisor
|
||||
* @return Quotient of two numbers, rounded to two decimal places
|
||||
*/
|
||||
public static BigDecimal divide(Object a, Object b) {
|
||||
BigDecimal bdA = toBigDecimal(a);
|
||||
|
@ -93,11 +93,11 @@ public class BigDecimalUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* 除法
|
||||
* @param a 被除数
|
||||
* @param b 除数
|
||||
* @param scale 保留小数位数
|
||||
* @return 两数的商,保留两位小数
|
||||
* Division
|
||||
* @param a Dividend
|
||||
* @param b Divisor
|
||||
* @param scale Number of decimal places to keep
|
||||
* @return Quotient of two numbers, rounded to two decimal places
|
||||
*/
|
||||
public static BigDecimal divide(Object a, Object b, int scale) {
|
||||
BigDecimal bdA = toBigDecimal(a);
|
||||
|
@ -106,9 +106,9 @@ public class BigDecimalUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* 分转元
|
||||
* @param obj 分的金额
|
||||
* @return 转换后的元,保留两位小数
|
||||
* Cents to Yuan
|
||||
* @param obj Amount in cents
|
||||
* @return Converted yuan, rounded to two decimal places
|
||||
*/
|
||||
public static BigDecimal centsToYuan(Object obj) {
|
||||
BigDecimal cents = toBigDecimal(obj);
|
||||
|
@ -116,9 +116,9 @@ public class BigDecimalUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* 元转分
|
||||
* @param obj 元的金额
|
||||
* @return 转换后的分
|
||||
* Yuan to Cents
|
||||
* @param obj Amount in yuan
|
||||
* @return Converted cents
|
||||
*/
|
||||
public static Long yuanToCents(Object obj) {
|
||||
BigDecimal yuan = toBigDecimal(obj);
|
||||
|
@ -129,15 +129,15 @@ public class BigDecimalUtils {
|
|||
BigDecimal num1 = new BigDecimal("10.123");
|
||||
BigDecimal num2 = new BigDecimal("2.456");
|
||||
|
||||
System.out.println("加法结果: " + add(num1, num2));
|
||||
System.out.println("减法结果: " + subtract(num1, num2));
|
||||
System.out.println("乘法结果: " + multiply(num1, num2));
|
||||
System.out.println("除法结果: " + divide(num1, num2));
|
||||
System.out.println("Addition result: " + add(num1, num2));
|
||||
System.out.println("Subtraction result: " + subtract(num1, num2));
|
||||
System.out.println("Multiplication result: " + multiply(num1, num2));
|
||||
System.out.println("Division result: " + divide(num1, num2));
|
||||
|
||||
Long cents = 12345L;
|
||||
System.out.println("分转元结果: " + centsToYuan(cents));
|
||||
System.out.println("Cents to Yuan result: " + centsToYuan(cents));
|
||||
|
||||
BigDecimal yuan = new BigDecimal("123.45");
|
||||
System.out.println("元转分结果: " + yuanToCents(yuan));
|
||||
System.out.println("Yuan to Cents result: " + yuanToCents(yuan));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ import javax.crypto.spec.IvParameterSpec;
|
|||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* 加密
|
||||
* Encryption
|
||||
* @author Zheng Jie
|
||||
* @date 2018-11-23
|
||||
*/
|
||||
|
@ -41,7 +41,7 @@ public class EncryptUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* 对称加密
|
||||
* Symmetric encryption
|
||||
*/
|
||||
public static String desEncrypt(String source) throws Exception {
|
||||
Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
|
||||
|
@ -53,7 +53,7 @@ public class EncryptUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* 对称解密
|
||||
* Symmetric decryption
|
||||
*/
|
||||
public static String desDecrypt(String source) throws Exception {
|
||||
Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
|
||||
|
@ -83,7 +83,7 @@ public class EncryptUtils {
|
|||
private static byte[] hex2byte(byte[] b) {
|
||||
int size = 2;
|
||||
if ((b.length % size) != 0) {
|
||||
throw new IllegalArgumentException("长度不是偶数");
|
||||
throw new IllegalArgumentException("Length is not even");
|
||||
}
|
||||
byte[] b2 = new byte[b.length / 2];
|
||||
for (int n = 0; n < b.length; n += size) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
public class EncryptUtilsTest {
|
||||
|
||||
/**
|
||||
* 对称加密
|
||||
* Symmetric encryption
|
||||
*/
|
||||
@Test
|
||||
public void testDesEncrypt() {
|
||||
|
@ -20,7 +20,7 @@ public class EncryptUtilsTest {
|
|||
}
|
||||
|
||||
/**
|
||||
* 对称解密
|
||||
* Symmetric decryption
|
||||
*/
|
||||
@Test
|
||||
public void testDesDecrypt() {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>eladmin-generator</artifactId>
|
||||
<name>代码生成模块</name>
|
||||
<name>Code Generation Module</name>
|
||||
|
||||
<properties>
|
||||
<configuration.version>1.10</configuration.version>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<version>2.7</version>
|
||||
</dependency>
|
||||
|
||||
<!--模板引擎-->
|
||||
<!-- Template Engine -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-freemarker</artifactId>
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.persistence.*;
|
|||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 列的数据信息
|
||||
* Column Data Information
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-02
|
||||
*/
|
||||
|
@ -41,43 +41,43 @@ public class ColumnInfo implements Serializable {
|
|||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "表名")
|
||||
@ApiModelProperty(value = "Table Name")
|
||||
private String tableName;
|
||||
|
||||
@ApiModelProperty(value = "数据库字段名称")
|
||||
@ApiModelProperty(value = "Database Column Name")
|
||||
private String columnName;
|
||||
|
||||
@ApiModelProperty(value = "数据库字段类型")
|
||||
@ApiModelProperty(value = "Database Column Type")
|
||||
private String columnType;
|
||||
|
||||
@ApiModelProperty(value = "数据库字段键类型")
|
||||
@ApiModelProperty(value = "Database Column Key Type")
|
||||
private String keyType;
|
||||
|
||||
@ApiModelProperty(value = "字段额外的参数")
|
||||
@ApiModelProperty(value = "Extra Parameters for Column")
|
||||
private String extra;
|
||||
|
||||
@ApiModelProperty(value = "数据库字段描述")
|
||||
@ApiModelProperty(value = "Database Column Description")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "是否必填")
|
||||
@ApiModelProperty(value = "Required")
|
||||
private Boolean notNull;
|
||||
|
||||
@ApiModelProperty(value = "是否在列表显示")
|
||||
@ApiModelProperty(value = "Show in List")
|
||||
private Boolean listShow;
|
||||
|
||||
@ApiModelProperty(value = "是否表单显示")
|
||||
@ApiModelProperty(value = "Show in Form")
|
||||
private Boolean formShow;
|
||||
|
||||
@ApiModelProperty(value = "表单类型")
|
||||
@ApiModelProperty(value = "Form Type")
|
||||
private String formType;
|
||||
|
||||
@ApiModelProperty(value = "查询 1:模糊 2:精确")
|
||||
@ApiModelProperty(value = "Query Type 1:Fuzzy 2:Exact")
|
||||
private String queryType;
|
||||
|
||||
@ApiModelProperty(value = "字典名称")
|
||||
@ApiModelProperty(value = "Dictionary Name")
|
||||
private String dictName;
|
||||
|
||||
@ApiModelProperty(value = "日期注解")
|
||||
@ApiModelProperty(value = "Date Annotation")
|
||||
private String dateAnnotation;
|
||||
|
||||
public ColumnInfo(String tableName, String columnName, Boolean notNull, String columnType, String remark, String keyType, String extra) {
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.validation.constraints.NotBlank;
|
|||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 代码生成配置
|
||||
* Code Generation Configuration
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-03
|
||||
*/
|
||||
|
@ -46,33 +46,33 @@ public class GenConfig implements Serializable {
|
|||
private Long id;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "表名")
|
||||
@ApiModelProperty(value = "Table Name")
|
||||
private String tableName;
|
||||
|
||||
@ApiModelProperty(value = "接口名称")
|
||||
@ApiModelProperty(value = "API Alias")
|
||||
private String apiAlias;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "包路径")
|
||||
@ApiModelProperty(value = "Package Path")
|
||||
private String pack;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "模块名")
|
||||
@ApiModelProperty(value = "Module Name")
|
||||
private String moduleName;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "前端文件路径")
|
||||
@ApiModelProperty(value = "Frontend File Path")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty(value = "前端文件路径")
|
||||
@ApiModelProperty(value = "Frontend API Path")
|
||||
private String apiPath;
|
||||
|
||||
@ApiModelProperty(value = "作者")
|
||||
@ApiModelProperty(value = "Author")
|
||||
private String author;
|
||||
|
||||
@ApiModelProperty(value = "表前缀")
|
||||
@ApiModelProperty(value = "Table Prefix")
|
||||
private String prefix;
|
||||
|
||||
@ApiModelProperty(value = "是否覆盖")
|
||||
@ApiModelProperty(value = "Overwrite")
|
||||
private Boolean cover = false;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 表的数据信息
|
||||
* Table data information
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-02
|
||||
*/
|
||||
|
@ -31,19 +31,19 @@ import lombok.NoArgsConstructor;
|
|||
@NoArgsConstructor
|
||||
public class TableInfo {
|
||||
|
||||
@ApiModelProperty(value = "表名称")
|
||||
@ApiModelProperty(value = "Table name")
|
||||
private Object tableName;
|
||||
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期:yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "Creation date: yyyy-MM-dd HH:mm:ss")
|
||||
private Object createTime;
|
||||
|
||||
@ApiModelProperty(value = "数据库引擎")
|
||||
@ApiModelProperty(value = "Database engine")
|
||||
private Object engine;
|
||||
|
||||
@ApiModelProperty(value = "编码集")
|
||||
@ApiModelProperty(value = "Character set")
|
||||
private Object coding;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
@ApiModelProperty(value = "Remarks")
|
||||
private Object remark;
|
||||
}
|
||||
|
|
|
@ -26,9 +26,9 @@ import java.util.List;
|
|||
public interface ColumnInfoRepository extends JpaRepository<ColumnInfo,Long> {
|
||||
|
||||
/**
|
||||
* 查询表信息
|
||||
* @param tableName 表格名
|
||||
* @return 表信息
|
||||
* Query table information
|
||||
* @param tableName table name
|
||||
* @return table information
|
||||
*/
|
||||
List<ColumnInfo> findByTableNameOrderByIdAsc(String tableName);
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ import org.springframework.data.jpa.repository.JpaRepository;
|
|||
public interface GenConfigRepository extends JpaRepository<GenConfig,Long> {
|
||||
|
||||
/**
|
||||
* 查询表配置
|
||||
* @param tableName 表名
|
||||
* Query table configuration
|
||||
* @param tableName table name
|
||||
* @return /
|
||||
*/
|
||||
GenConfig findByTableName(String tableName);
|
||||
|
|
|
@ -32,19 +32,19 @@ import org.springframework.web.bind.annotation.*;
|
|||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/genConfig")
|
||||
@Api(tags = "系统:代码生成器配置管理")
|
||||
@Api(tags = "System: Code Generator Configuration Management")
|
||||
public class GenConfigController {
|
||||
|
||||
private final GenConfigService genConfigService;
|
||||
|
||||
@ApiOperation("查询")
|
||||
@ApiOperation("Query")
|
||||
@GetMapping(value = "/{tableName}")
|
||||
public ResponseEntity<GenConfig> queryGenConfig(@PathVariable String tableName){
|
||||
return new ResponseEntity<>(genConfigService.find(tableName), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
@ApiOperation("Update")
|
||||
public ResponseEntity<Object> updateGenConfig(@Validated @RequestBody GenConfig genConfig){
|
||||
return new ResponseEntity<>(genConfigService.update(genConfig.getTableName(), genConfig),HttpStatus.OK);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ import java.util.List;
|
|||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/generator")
|
||||
@Api(tags = "系统:代码生成管理")
|
||||
@Api(tags = "System: Code Generation Management")
|
||||
public class GeneratorController {
|
||||
|
||||
private final GeneratorService generatorService;
|
||||
|
@ -49,13 +49,13 @@ public class GeneratorController {
|
|||
@Value("${generator.enabled}")
|
||||
private Boolean generatorEnabled;
|
||||
|
||||
@ApiOperation("查询数据库数据")
|
||||
@ApiOperation("Query database data")
|
||||
@GetMapping(value = "/tables/all")
|
||||
public ResponseEntity<Object> queryAllTables(){
|
||||
return new ResponseEntity<>(generatorService.getTables(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("查询数据库数据")
|
||||
@ApiOperation("Query database data")
|
||||
@GetMapping(value = "/tables")
|
||||
public ResponseEntity<PageResult<TableInfo>> queryTables(@RequestParam(defaultValue = "") String name,
|
||||
@RequestParam(defaultValue = "0")Integer page,
|
||||
|
@ -64,21 +64,21 @@ public class GeneratorController {
|
|||
return new ResponseEntity<>(generatorService.getTables(name,startEnd), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("查询字段数据")
|
||||
@ApiOperation("Query column data")
|
||||
@GetMapping(value = "/columns")
|
||||
public ResponseEntity<PageResult<ColumnInfo>> queryColumns(@RequestParam String tableName){
|
||||
List<ColumnInfo> columnInfos = generatorService.getColumns(tableName);
|
||||
return new ResponseEntity<>(PageUtil.toPage(columnInfos,columnInfos.size()), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("保存字段数据")
|
||||
@ApiOperation("Save column data")
|
||||
@PutMapping
|
||||
public ResponseEntity<HttpStatus> saveColumn(@RequestBody List<ColumnInfo> columnInfos){
|
||||
generatorService.save(columnInfos);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("同步字段数据")
|
||||
@ApiOperation("Sync column data")
|
||||
@PostMapping(value = "sync")
|
||||
public ResponseEntity<HttpStatus> syncColumn(@RequestBody List<String> tables){
|
||||
for (String table : tables) {
|
||||
|
@ -87,22 +87,22 @@ public class GeneratorController {
|
|||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("生成代码")
|
||||
@ApiOperation("Generate code")
|
||||
@PostMapping(value = "/{tableName}/{type}")
|
||||
public ResponseEntity<Object> generatorCode(@PathVariable String tableName, @PathVariable Integer type, HttpServletRequest request, HttpServletResponse response){
|
||||
if(!generatorEnabled && type == 0){
|
||||
throw new BadRequestException("此环境不允许生成代码,请选择预览或者下载查看!");
|
||||
throw new BadRequestException("Code generation is not allowed in this environment, please choose preview or download to view!");
|
||||
}
|
||||
switch (type){
|
||||
// 生成代码
|
||||
// Generate code
|
||||
case 0: generatorService.generator(genConfigService.find(tableName), generatorService.getColumns(tableName));
|
||||
break;
|
||||
// 预览
|
||||
// Preview
|
||||
case 1: return generatorService.preview(genConfigService.find(tableName), generatorService.getColumns(tableName));
|
||||
// 打包
|
||||
// Package
|
||||
case 2: generatorService.download(genConfigService.find(tableName), generatorService.getColumns(tableName), request, response);
|
||||
break;
|
||||
default: throw new BadRequestException("没有这个选项");
|
||||
default: throw new BadRequestException("No such option");
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
|
|
@ -24,17 +24,17 @@ import me.zhengjie.domain.GenConfig;
|
|||
public interface GenConfigService {
|
||||
|
||||
/**
|
||||
* 查询表配置
|
||||
* @param tableName 表名
|
||||
* @return 表配置
|
||||
* Query table configuration
|
||||
* @param tableName Table name
|
||||
* @return Table configuration
|
||||
*/
|
||||
GenConfig find(String tableName);
|
||||
|
||||
/**
|
||||
* 更新表配置
|
||||
* @param tableName 表名
|
||||
* @param genConfig 表配置
|
||||
* @return 表配置
|
||||
* Update table configuration
|
||||
* @param tableName Table name
|
||||
* @param genConfig Table configuration
|
||||
* @return Table configuration
|
||||
*/
|
||||
GenConfig update(String tableName, GenConfig genConfig);
|
||||
}
|
||||
|
|
|
@ -31,66 +31,66 @@ import java.util.List;
|
|||
public interface GeneratorService {
|
||||
|
||||
/**
|
||||
* 查询数据库元数据
|
||||
* @param name 表名
|
||||
* @param startEnd 分页参数
|
||||
* Query database metadata
|
||||
* @param name Table name
|
||||
* @param startEnd Pagination parameters
|
||||
* @return /
|
||||
*/
|
||||
PageResult<TableInfo> getTables(String name, int[] startEnd);
|
||||
|
||||
/**
|
||||
* 得到数据表的元数据
|
||||
* @param name 表名
|
||||
* Get table metadata
|
||||
* @param name Table name
|
||||
* @return /
|
||||
*/
|
||||
List<ColumnInfo> getColumns(String name);
|
||||
|
||||
/**
|
||||
* 同步表数据
|
||||
* @param columnInfos /
|
||||
* @param columnInfoList /
|
||||
* Synchronize table data
|
||||
* @param columnInfos
|
||||
* @param columnInfoList
|
||||
*/
|
||||
void sync(List<ColumnInfo> columnInfos, List<ColumnInfo> columnInfoList);
|
||||
|
||||
/**
|
||||
* 保持数据
|
||||
* @param columnInfos /
|
||||
* Save data
|
||||
* @param columnInfos
|
||||
*/
|
||||
void save(List<ColumnInfo> columnInfos);
|
||||
|
||||
/**
|
||||
* 获取所有table
|
||||
* Get all tables
|
||||
* @return /
|
||||
*/
|
||||
Object getTables();
|
||||
|
||||
/**
|
||||
* 代码生成
|
||||
* @param genConfig 配置信息
|
||||
* @param columns 字段信息
|
||||
* Code generation
|
||||
* @param genConfig Configuration information
|
||||
* @param columns Field information
|
||||
*/
|
||||
void generator(GenConfig genConfig, List<ColumnInfo> columns);
|
||||
|
||||
/**
|
||||
* 预览
|
||||
* @param genConfig 配置信息
|
||||
* @param columns 字段信息
|
||||
* Preview
|
||||
* @param genConfig Configuration information
|
||||
* @param columns Field information
|
||||
* @return /
|
||||
*/
|
||||
ResponseEntity<Object> preview(GenConfig genConfig, List<ColumnInfo> columns);
|
||||
|
||||
/**
|
||||
* 打包下载
|
||||
* @param genConfig 配置信息
|
||||
* @param columns 字段信息
|
||||
* @param request /
|
||||
* @param response /
|
||||
* Download as package
|
||||
* @param genConfig Configuration information
|
||||
* @param columns Field information
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
void download(GenConfig genConfig, List<ColumnInfo> columns, HttpServletRequest request, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 查询数据库的表字段数据数据
|
||||
* @param table /
|
||||
* Query database table field data
|
||||
* @param table
|
||||
* @return /
|
||||
*/
|
||||
List<ColumnInfo> query(String table);
|
||||
|
|
|
@ -58,10 +58,10 @@ public class GeneratorServiceImpl implements GeneratorService {
|
|||
|
||||
private final ColumnInfoRepository columnInfoRepository;
|
||||
|
||||
private final String CONFIG_MESSAGE = "请先配置生成器";
|
||||
private final String CONFIG_MESSAGE = "Please configure the generator first";
|
||||
@Override
|
||||
public Object getTables() {
|
||||
// 使用预编译防止sql注入
|
||||
// Use precompilation to prevent SQL injection
|
||||
String sql = "select table_name ,create_time , engine, table_collation, table_comment from information_schema.tables " +
|
||||
"where table_schema = (select database()) " +
|
||||
"order by create_time desc";
|
||||
|
@ -71,7 +71,7 @@ public class GeneratorServiceImpl implements GeneratorService {
|
|||
|
||||
@Override
|
||||
public PageResult<TableInfo> getTables(String name, int[] startEnd) {
|
||||
// 使用预编译防止sql注入
|
||||
// Use precompilation to prevent SQL injection
|
||||
String sql = "select table_name ,create_time , engine, table_collation, table_comment from information_schema.tables " +
|
||||
"where table_schema = (select database()) " +
|
||||
"and table_name like :table order by create_time desc";
|
||||
|
@ -106,7 +106,7 @@ public class GeneratorServiceImpl implements GeneratorService {
|
|||
|
||||
@Override
|
||||
public List<ColumnInfo> query(String tableName) {
|
||||
// 使用预编译防止sql注入
|
||||
// Use precompilation to prevent SQL injection
|
||||
String sql = "select column_name, is_nullable, data_type, column_comment, column_key, extra from information_schema.columns " +
|
||||
"where table_name = ? and table_schema = (select database()) order by ordinal_position";
|
||||
Query query = em.createNativeQuery(sql);
|
||||
|
@ -131,11 +131,11 @@ public class GeneratorServiceImpl implements GeneratorService {
|
|||
|
||||
@Override
|
||||
public void sync(List<ColumnInfo> columnInfos, List<ColumnInfo> columnInfoList) {
|
||||
// 第一种情况,数据库类字段改变或者新增字段
|
||||
// First case: database class field changes or new fields
|
||||
for (ColumnInfo columnInfo : columnInfoList) {
|
||||
// 根据字段名称查找
|
||||
// Find by field name
|
||||
List<ColumnInfo> columns = columnInfos.stream().filter(c -> c.getColumnName().equals(columnInfo.getColumnName())).collect(Collectors.toList());
|
||||
// 如果能找到,就修改部分可能被字段
|
||||
// If found, modify fields that may have been changed
|
||||
if (CollectionUtil.isNotEmpty(columns)) {
|
||||
ColumnInfo column = columns.get(0);
|
||||
column.setColumnType(columnInfo.getColumnType());
|
||||
|
@ -146,15 +146,15 @@ public class GeneratorServiceImpl implements GeneratorService {
|
|||
}
|
||||
columnInfoRepository.save(column);
|
||||
} else {
|
||||
// 如果找不到,则保存新字段信息
|
||||
// If not found, save new field information
|
||||
columnInfoRepository.save(columnInfo);
|
||||
}
|
||||
}
|
||||
// 第二种情况,数据库字段删除了
|
||||
// Second case: database fields have been deleted
|
||||
for (ColumnInfo columnInfo : columnInfos) {
|
||||
// 根据字段名称查找
|
||||
// Find by field name
|
||||
List<ColumnInfo> columns = columnInfoList.stream().filter(c -> c.getColumnName().equals(columnInfo.getColumnName())).collect(Collectors.toList());
|
||||
// 如果找不到,就代表字段被删除了,则需要删除该字段
|
||||
// If not found, it means the field has been deleted, so the field needs to be deleted
|
||||
if (CollectionUtil.isEmpty(columns)) {
|
||||
columnInfoRepository.delete(columnInfo);
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ public class GeneratorServiceImpl implements GeneratorService {
|
|||
GenUtil.generatorCode(columns, genConfig);
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new BadRequestException("生成失败,请手动处理已生成的文件");
|
||||
throw new BadRequestException("Generation failed, please manually process the generated files");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ public class GeneratorServiceImpl implements GeneratorService {
|
|||
ZipUtil.zip(file.getPath(), zipPath);
|
||||
FileUtil.downloadFile(request, response, new File(zipPath), true);
|
||||
} catch (IOException e) {
|
||||
throw new BadRequestException("打包失败");
|
||||
throw new BadRequestException("Package failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* sql字段转java
|
||||
* Convert SQL fields to Java
|
||||
*
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-03
|
||||
|
@ -29,9 +29,9 @@ public class ColUtil {
|
|||
private static final Logger log = LoggerFactory.getLogger(ColUtil.class);
|
||||
|
||||
/**
|
||||
* 转换mysql数据类型为java数据类型
|
||||
* Convert MySQL data type to Java data type
|
||||
*
|
||||
* @param type 数据库字段类型
|
||||
* @param type Database column type
|
||||
* @return String
|
||||
*/
|
||||
static String cloToJava(String type) {
|
||||
|
@ -41,7 +41,7 @@ public class ColUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* 获取配置信息
|
||||
* Get configuration information
|
||||
*/
|
||||
public static PropertiesConfiguration getConfig() {
|
||||
try {
|
||||
|
|
|
@ -32,7 +32,7 @@ import java.util.*;
|
|||
import static me.zhengjie.utils.FileUtil.SYS_TEM_DIR;
|
||||
|
||||
/**
|
||||
* 代码生成
|
||||
* Code generation
|
||||
*
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-02
|
||||
|
@ -50,7 +50,7 @@ public class GenUtil {
|
|||
public static final String EXTRA = "auto_increment";
|
||||
|
||||
/**
|
||||
* 获取后端代码模板名称
|
||||
* Get backend code template name
|
||||
*
|
||||
* @return List
|
||||
*/
|
||||
|
@ -68,7 +68,7 @@ public class GenUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* 获取前端代码模板名称
|
||||
* Get frontend code template name
|
||||
*
|
||||
* @return List
|
||||
*/
|
||||
|
@ -82,7 +82,7 @@ public class GenUtil {
|
|||
public static List<Map<String, Object>> preview(List<ColumnInfo> columns, GenConfig genConfig) {
|
||||
Map<String, Object> genMap = getGenMap(columns, genConfig);
|
||||
List<Map<String, Object>> genList = new ArrayList<>();
|
||||
// 获取后端模版
|
||||
// Get backend template
|
||||
List<String> templates = getAdminTemplateNames();
|
||||
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
for (String templateName : templates) {
|
||||
|
@ -92,7 +92,7 @@ public class GenUtil {
|
|||
map.put("name", templateName);
|
||||
genList.add(map);
|
||||
}
|
||||
// 获取前端模版
|
||||
// Get frontend template
|
||||
templates = getFrontTemplateNames();
|
||||
for (String templateName : templates) {
|
||||
Map<String, Object> map = new HashMap<>(1);
|
||||
|
@ -106,26 +106,26 @@ public class GenUtil {
|
|||
}
|
||||
|
||||
public static String download(List<ColumnInfo> columns, GenConfig genConfig) throws IOException {
|
||||
// 拼接的路径:/tmpeladmin-gen-temp/,这个路径在Linux下需要root用户才有权限创建,非root用户会权限错误而失败,更改为: /tmp/eladmin-gen-temp/
|
||||
// Concatenated path: /tmpeladmin-gen-temp/. This path requires root privileges to create on Linux, non-root users will encounter permission errors and fail. Change to: /tmp/eladmin-gen-temp/
|
||||
// String tempPath =SYS_TEM_DIR + "eladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator;
|
||||
String tempPath = SYS_TEM_DIR + "eladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator;
|
||||
Map<String, Object> genMap = getGenMap(columns, genConfig);
|
||||
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
// 生成后端代码
|
||||
// Generate backend code
|
||||
List<String> templates = getAdminTemplateNames();
|
||||
for (String templateName : templates) {
|
||||
Template template = engine.getTemplate("admin/" + templateName + ".ftl");
|
||||
String filePath = getAdminFilePath(templateName, genConfig, genMap.get("className").toString(), tempPath + "eladmin" + File.separator);
|
||||
assert filePath != null;
|
||||
File file = new File(filePath);
|
||||
// 如果非覆盖生成
|
||||
// If not overwriting
|
||||
if (!genConfig.getCover() && FileUtil.exist(file)) {
|
||||
continue;
|
||||
}
|
||||
// 生成代码
|
||||
// Generate code
|
||||
genFile(file, template, genMap);
|
||||
}
|
||||
// 生成前端代码
|
||||
// Generate frontend code
|
||||
templates = getFrontTemplateNames();
|
||||
for (String templateName : templates) {
|
||||
Template template = engine.getTemplate("front/" + templateName + ".ftl");
|
||||
|
@ -135,11 +135,11 @@ public class GenUtil {
|
|||
String filePath = getFrontFilePath(templateName, apiPath, srcPath, genMap.get("changeClassName").toString());
|
||||
assert filePath != null;
|
||||
File file = new File(filePath);
|
||||
// 如果非覆盖生成
|
||||
// If not overwriting
|
||||
if (!genConfig.getCover() && FileUtil.exist(file)) {
|
||||
continue;
|
||||
}
|
||||
// 生成代码
|
||||
// Generate code
|
||||
genFile(file, template, genMap);
|
||||
}
|
||||
return tempPath;
|
||||
|
@ -148,7 +148,7 @@ public class GenUtil {
|
|||
public static void generatorCode(List<ColumnInfo> columnInfos, GenConfig genConfig) throws IOException {
|
||||
Map<String, Object> genMap = getGenMap(columnInfos, genConfig);
|
||||
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
// 生成后端代码
|
||||
// Generate backend code
|
||||
List<String> templates = getAdminTemplateNames();
|
||||
for (String templateName : templates) {
|
||||
Template template = engine.getTemplate("admin/" + templateName + ".ftl");
|
||||
|
@ -158,15 +158,15 @@ public class GenUtil {
|
|||
assert filePath != null;
|
||||
File file = new File(filePath);
|
||||
|
||||
// 如果非覆盖生成
|
||||
// If not overwriting
|
||||
if (!genConfig.getCover() && FileUtil.exist(file)) {
|
||||
continue;
|
||||
}
|
||||
// 生成代码
|
||||
// Generate code
|
||||
genFile(file, template, genMap);
|
||||
}
|
||||
|
||||
// 生成前端代码
|
||||
// Generate frontend code
|
||||
templates = getFrontTemplateNames();
|
||||
for (String templateName : templates) {
|
||||
Template template = engine.getTemplate("front/" + templateName + ".ftl");
|
||||
|
@ -175,177 +175,177 @@ public class GenUtil {
|
|||
assert filePath != null;
|
||||
File file = new File(filePath);
|
||||
|
||||
// 如果非覆盖生成
|
||||
// If not overwriting
|
||||
if (!genConfig.getCover() && FileUtil.exist(file)) {
|
||||
continue;
|
||||
}
|
||||
// 生成代码
|
||||
// Generate code
|
||||
genFile(file, template, genMap);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取模版数据
|
||||
// Get template data
|
||||
private static Map<String, Object> getGenMap(List<ColumnInfo> columnInfos, GenConfig genConfig) {
|
||||
// 存储模版字段数据
|
||||
// Store template field data
|
||||
Map<String, Object> genMap = new HashMap<>(16);
|
||||
// 接口别名
|
||||
// Interface alias
|
||||
genMap.put("apiAlias", genConfig.getApiAlias());
|
||||
// 包名称
|
||||
// Package name
|
||||
genMap.put("package", genConfig.getPack());
|
||||
// 模块名称
|
||||
// Module name
|
||||
genMap.put("moduleName", genConfig.getModuleName());
|
||||
// 作者
|
||||
// Author
|
||||
genMap.put("author", genConfig.getAuthor());
|
||||
// 创建日期
|
||||
// Creation date
|
||||
genMap.put("date", LocalDate.now().toString());
|
||||
// 表名
|
||||
// Table name
|
||||
genMap.put("tableName", genConfig.getTableName());
|
||||
// 大写开头的类名
|
||||
// Class name starting with uppercase
|
||||
String className = StringUtils.toCapitalizeCamelCase(genConfig.getTableName());
|
||||
// 小写开头的类名
|
||||
// Class name starting with lowercase
|
||||
String changeClassName = StringUtils.toCamelCase(genConfig.getTableName());
|
||||
// 判断是否去除表前缀
|
||||
// Determine whether to remove table prefix
|
||||
if (StringUtils.isNotEmpty(genConfig.getPrefix())) {
|
||||
className = StringUtils.toCapitalizeCamelCase(StrUtil.removePrefix(genConfig.getTableName(), genConfig.getPrefix()));
|
||||
changeClassName = StringUtils.toCamelCase(StrUtil.removePrefix(genConfig.getTableName(), genConfig.getPrefix()));
|
||||
changeClassName = StringUtils.uncapitalize(changeClassName);
|
||||
}
|
||||
// 保存类名
|
||||
// Save class name
|
||||
genMap.put("className", className);
|
||||
// 保存小写开头的类名
|
||||
// Save lowercase class name
|
||||
genMap.put("changeClassName", changeClassName);
|
||||
// 存在 Timestamp 字段
|
||||
// Timestamp field exists
|
||||
genMap.put("hasTimestamp", false);
|
||||
// 查询类中存在 Timestamp 字段
|
||||
// Timestamp field exists in query class
|
||||
genMap.put("queryHasTimestamp", false);
|
||||
// 存在 BigDecimal 字段
|
||||
// BigDecimal field exists
|
||||
genMap.put("hasBigDecimal", false);
|
||||
// 查询类中存在 BigDecimal 字段
|
||||
// BigDecimal field exists in query class
|
||||
genMap.put("queryHasBigDecimal", false);
|
||||
// 是否需要创建查询
|
||||
// Whether to create query
|
||||
genMap.put("hasQuery", false);
|
||||
// 自增主键
|
||||
// Auto increment primary key
|
||||
genMap.put("auto", false);
|
||||
// 存在字典
|
||||
// Dictionary exists
|
||||
genMap.put("hasDict", false);
|
||||
// 存在日期注解
|
||||
// Date annotation exists
|
||||
genMap.put("hasDateAnnotation", false);
|
||||
// 保存字段信息
|
||||
// Save field information
|
||||
List<Map<String, Object>> columns = new ArrayList<>();
|
||||
// 保存查询字段的信息
|
||||
// Save query field information
|
||||
List<Map<String, Object>> queryColumns = new ArrayList<>();
|
||||
// 存储字典信息
|
||||
// Store dictionary information
|
||||
List<String> dicts = new ArrayList<>();
|
||||
// 存储 between 信息
|
||||
// Store between information
|
||||
List<Map<String, Object>> betweens = new ArrayList<>();
|
||||
// 存储不为空的字段信息
|
||||
// Store non-empty field information
|
||||
List<Map<String, Object>> isNotNullColumns = new ArrayList<>();
|
||||
|
||||
for (ColumnInfo column : columnInfos) {
|
||||
Map<String, Object> listMap = new HashMap<>(16);
|
||||
// 字段描述
|
||||
// Field description
|
||||
listMap.put("remark", column.getRemark());
|
||||
// 字段类型
|
||||
// Field type
|
||||
listMap.put("columnKey", column.getKeyType());
|
||||
// 主键类型
|
||||
// Primary key type
|
||||
String colType = ColUtil.cloToJava(column.getColumnType());
|
||||
// 小写开头的字段名
|
||||
// Lowercase field name
|
||||
String changeColumnName = StringUtils.toCamelCase(column.getColumnName());
|
||||
// 大写开头的字段名
|
||||
// Uppercase field name
|
||||
String capitalColumnName = StringUtils.toCapitalizeCamelCase(column.getColumnName());
|
||||
if (PK.equals(column.getKeyType())) {
|
||||
// 存储主键类型
|
||||
// Store primary key type
|
||||
genMap.put("pkColumnType", colType);
|
||||
// 存储小写开头的字段名
|
||||
// Store lowercase field name
|
||||
genMap.put("pkChangeColName", changeColumnName);
|
||||
// 存储大写开头的字段名
|
||||
// Store uppercase field name
|
||||
genMap.put("pkCapitalColName", capitalColumnName);
|
||||
}
|
||||
// 是否存在 Timestamp 类型的字段
|
||||
// Whether Timestamp type field exists
|
||||
if (TIMESTAMP.equals(colType)) {
|
||||
genMap.put("hasTimestamp", true);
|
||||
}
|
||||
// 是否存在 BigDecimal 类型的字段
|
||||
// Whether BigDecimal type field exists
|
||||
if (BIGDECIMAL.equals(colType)) {
|
||||
genMap.put("hasBigDecimal", true);
|
||||
}
|
||||
// 主键是否自增
|
||||
// Primary key is auto increment
|
||||
if (EXTRA.equals(column.getExtra())) {
|
||||
genMap.put("auto", true);
|
||||
}
|
||||
// 主键存在字典
|
||||
// Primary key exists in dictionary
|
||||
if (StringUtils.isNotBlank(column.getDictName())) {
|
||||
genMap.put("hasDict", true);
|
||||
if(!dicts.contains(column.getDictName()))
|
||||
dicts.add(column.getDictName());
|
||||
}
|
||||
|
||||
// 存储字段类型
|
||||
// Store field type
|
||||
listMap.put("columnType", colType);
|
||||
// 存储字原始段名称
|
||||
// Store original field name
|
||||
listMap.put("columnName", column.getColumnName());
|
||||
// 不为空
|
||||
// Not empty
|
||||
listMap.put("istNotNull", column.getNotNull());
|
||||
// 字段列表显示
|
||||
// Field list display
|
||||
listMap.put("columnShow", column.getListShow());
|
||||
// 表单显示
|
||||
// Form display
|
||||
listMap.put("formShow", column.getFormShow());
|
||||
// 表单组件类型
|
||||
// Form component type
|
||||
listMap.put("formType", StringUtils.isNotBlank(column.getFormType()) ? column.getFormType() : "Input");
|
||||
// 小写开头的字段名称
|
||||
// Lowercase field name
|
||||
listMap.put("changeColumnName", changeColumnName);
|
||||
//大写开头的字段名称
|
||||
// Uppercase field name
|
||||
listMap.put("capitalColumnName", capitalColumnName);
|
||||
// 字典名称
|
||||
// Dictionary name
|
||||
listMap.put("dictName", column.getDictName());
|
||||
// 日期注解
|
||||
// Date annotation
|
||||
listMap.put("dateAnnotation", column.getDateAnnotation());
|
||||
if (StringUtils.isNotBlank(column.getDateAnnotation())) {
|
||||
genMap.put("hasDateAnnotation", true);
|
||||
}
|
||||
// 添加非空字段信息
|
||||
// Add non-empty field information
|
||||
if (column.getNotNull()) {
|
||||
isNotNullColumns.add(listMap);
|
||||
}
|
||||
// 判断是否有查询,如有则把查询的字段set进columnQuery
|
||||
// Determine whether query exists, if so, set query fields in columnQuery
|
||||
if (!StringUtils.isBlank(column.getQueryType())) {
|
||||
// 查询类型
|
||||
// Query type
|
||||
listMap.put("queryType", column.getQueryType());
|
||||
// 是否存在查询
|
||||
// Whether query exists
|
||||
genMap.put("hasQuery", true);
|
||||
if (TIMESTAMP.equals(colType)) {
|
||||
// 查询中存储 Timestamp 类型
|
||||
// Query stores Timestamp type
|
||||
genMap.put("queryHasTimestamp", true);
|
||||
}
|
||||
if (BIGDECIMAL.equals(colType)) {
|
||||
// 查询中存储 BigDecimal 类型
|
||||
// Query stores BigDecimal type
|
||||
genMap.put("queryHasBigDecimal", true);
|
||||
}
|
||||
if ("between".equalsIgnoreCase(column.getQueryType())) {
|
||||
betweens.add(listMap);
|
||||
} else {
|
||||
// 添加到查询列表中
|
||||
// Add to query list
|
||||
queryColumns.add(listMap);
|
||||
}
|
||||
}
|
||||
// 添加到字段列表中
|
||||
// Add to field list
|
||||
columns.add(listMap);
|
||||
}
|
||||
// 保存字段列表
|
||||
// Save field list
|
||||
genMap.put("columns", columns);
|
||||
// 保存查询列表
|
||||
// Save query list
|
||||
genMap.put("queryColumns", queryColumns);
|
||||
// 保存字段列表
|
||||
// Save field list
|
||||
genMap.put("dicts", dicts);
|
||||
// 保存查询列表
|
||||
// Save query list
|
||||
genMap.put("betweens", betweens);
|
||||
// 保存非空字段信息
|
||||
// Save non-empty field information
|
||||
genMap.put("isNotNullColumns", isNotNullColumns);
|
||||
return genMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义后端文件路径以及名称
|
||||
* Define backend file path and name
|
||||
*/
|
||||
private static String getAdminFilePath(String templateName, GenConfig genConfig, String className, String rootPath) {
|
||||
String projectPath = rootPath + File.separator + genConfig.getModuleName();
|
||||
|
@ -390,7 +390,7 @@ public class GenUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* 定义前端文件路径以及名称
|
||||
* Define frontend file path and name
|
||||
*/
|
||||
private static String getFrontFilePath(String templateName, String apiPath, String path, String apiName) {
|
||||
|
||||
|
@ -406,7 +406,7 @@ public class GenUtil {
|
|||
}
|
||||
|
||||
private static void genFile(File file, Template template, Map<String, Object> map) throws IOException {
|
||||
// 生成目标文件
|
||||
// Generate target file
|
||||
Writer writer = null;
|
||||
try {
|
||||
FileUtil.touch(file);
|
||||
|
|
|
@ -45,7 +45,7 @@ public class ${className}Controller {
|
|||
|
||||
private final ${className}Service ${changeClassName}Service;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@ApiOperation("Export Data")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('${changeClassName}:list')")
|
||||
public void export${className}(HttpServletResponse response, ${className}QueryCriteria criteria) throws IOException {
|
||||
|
@ -53,15 +53,15 @@ public class ${className}Controller {
|
|||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询${apiAlias}")
|
||||
@ApiOperation("Query ${apiAlias}")
|
||||
@PreAuthorize("@el.check('${changeClassName}:list')")
|
||||
public ResponseEntity<PageResult<${className}Dto>> query${className}(${className}QueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(${changeClassName}Service.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增${apiAlias}")
|
||||
@ApiOperation("新增${apiAlias}")
|
||||
@Log("Add ${apiAlias}")
|
||||
@ApiOperation("Add ${apiAlias}")
|
||||
@PreAuthorize("@el.check('${changeClassName}:add')")
|
||||
public ResponseEntity<Object> create${className}(@Validated @RequestBody ${className} resources){
|
||||
${changeClassName}Service.create(resources);
|
||||
|
@ -69,8 +69,8 @@ public class ${className}Controller {
|
|||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改${apiAlias}")
|
||||
@ApiOperation("修改${apiAlias}")
|
||||
@Log("Edit ${apiAlias}")
|
||||
@ApiOperation("Edit ${apiAlias}")
|
||||
@PreAuthorize("@el.check('${changeClassName}:edit')")
|
||||
public ResponseEntity<Object> update${className}(@Validated @RequestBody ${className} resources){
|
||||
${changeClassName}Service.update(resources);
|
||||
|
@ -78,10 +78,10 @@ public class ${className}Controller {
|
|||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除${apiAlias}")
|
||||
@ApiOperation("删除${apiAlias}")
|
||||
@Log("Delete ${apiAlias}")
|
||||
@ApiOperation("Delete ${apiAlias}")
|
||||
@PreAuthorize("@el.check('${changeClassName}:del')")
|
||||
public ResponseEntity<Object> delete${className}(@ApiParam(value = "传ID数组[]") @RequestBody ${pkColumnType}[] ids) {
|
||||
public ResponseEntity<Object> delete${className}(@ApiParam(value = "Pass ID array[]") @RequestBody ${pkColumnType}[] ids) {
|
||||
${changeClassName}Service.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class ${className}Dto implements Serializable {
|
|||
</#if>
|
||||
<#if column.columnKey = 'PRI'>
|
||||
<#if !auto && pkColumnType = 'Long'>
|
||||
/** 防止精度丢失 */
|
||||
/** Prevent precision loss */
|
||||
@JSONField(serializeUsing = ToStringSerializer.class)
|
||||
</#if>
|
||||
</#if>
|
||||
|
|
|
@ -29,7 +29,7 @@ public interface ${className}Repository extends JpaRepository<${className}, ${pk
|
|||
<#list columns as column>
|
||||
<#if column.columnKey = 'UNI'>
|
||||
/**
|
||||
* 根据 ${column.capitalColumnName} 查询
|
||||
* Query by ${column.capitalColumnName}
|
||||
* @param ${column.columnName} /
|
||||
* @return /
|
||||
*/
|
||||
|
|
|
@ -27,55 +27,55 @@ import me.zhengjie.utils.PageResult;
|
|||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description 服务接口
|
||||
* @description Service Interface
|
||||
* @author ${author}
|
||||
* @date ${date}
|
||||
**/
|
||||
public interface ${className}Service {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* Query data with pagination
|
||||
* @param criteria criteria
|
||||
* @param pageable pagination parameters
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
PageResult<${className}Dto> queryAll(${className}QueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria 条件参数
|
||||
* Query all data without pagination
|
||||
* @param criteria criteria parameters
|
||||
* @return List<${className}Dto>
|
||||
*/
|
||||
List<${className}Dto> queryAll(${className}QueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* Query by ID
|
||||
* @param ${pkChangeColName} ID
|
||||
* @return ${className}Dto
|
||||
*/
|
||||
${className}Dto findById(${pkColumnType} ${pkChangeColName});
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* Create
|
||||
* @param resources /
|
||||
*/
|
||||
void create(${className} resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* Edit
|
||||
* @param resources /
|
||||
*/
|
||||
void update(${className} resources);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* Multi-select delete
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(${pkColumnType}[] ids);
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* Export data
|
||||
* @param all data to be exported
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
|
|
|
@ -56,7 +56,7 @@ import me.zhengjie.utils.PageResult;
|
|||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description 服务实现
|
||||
* @description Service Implementation
|
||||
* @author ${author}
|
||||
* @date ${date}
|
||||
**/
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<#--noinspection ALL-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<!--Toolbar-->
|
||||
<div class="head-container">
|
||||
<#if hasQuery>
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<!-- Search -->
|
||||
<#if queryColumns??>
|
||||
<#list queryColumns as column>
|
||||
<#if column.queryType != 'BetWeen'>
|
||||
|
@ -29,9 +29,9 @@
|
|||
<rrOperation :crud="crud" />
|
||||
</div>
|
||||
</#if>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<!--To add more buttons to the toolbar, you can use the slot method, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<!--Form Component-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||
<el-form ref="form" :model="form" <#if isNotNullColumns??>:rules="rules"</#if> size="small" label-width="80px">
|
||||
<#if columns??>
|
||||
|
@ -46,11 +46,11 @@
|
|||
<#if (column.dictName)?? && (column.dictName)!="">
|
||||
<el-radio v-model="form.${column.changeColumnName}" v-for="item in dict.${column.dictName}" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
|
||||
<#else>
|
||||
未设置字典,请手动设置 Radio
|
||||
Dictionary not set, please set Radio manually
|
||||
</#if>
|
||||
<#elseif column.formType = 'Select'>
|
||||
<#if (column.dictName)?? && (column.dictName)!="">
|
||||
<el-select v-model="form.${column.changeColumnName}" filterable placeholder="请选择">
|
||||
<el-select v-model="form.${column.changeColumnName}" filterable placeholder="Please select">
|
||||
<el-option
|
||||
v-for="item in dict.${column.dictName}"
|
||||
:key="item.id"
|
||||
|
@ -58,7 +58,7 @@
|
|||
:value="item.value" />
|
||||
</el-select>
|
||||
<#else>
|
||||
未设置字典,请手动设置 Select
|
||||
Dictionary not set, please set Select manually
|
||||
</#if>
|
||||
<#else>
|
||||
<el-date-picker v-model="form.${column.changeColumnName}" type="datetime" style="width: 370px;" />
|
||||
|
@ -69,11 +69,11 @@
|
|||
</#if>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
<el-button type="text" @click="crud.cancelCU">Cancel</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">Confirm</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<!--Table Rendering-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<#if columns??>
|
||||
|
@ -91,7 +91,7 @@
|
|||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
<el-table-column v-if="checkPer(['admin','${changeClassName}:edit','${changeClassName}:del'])" label="操作" width="150px" align="center">
|
||||
<el-table-column v-if="checkPer(['admin','${changeClassName}:edit','${changeClassName}:del'])" label="Operations" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
|
@ -100,7 +100,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<!--Pagination Component-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -137,7 +137,7 @@ export default {
|
|||
<#list isNotNullColumns as column>
|
||||
<#if column.istNotNull>
|
||||
${column.changeColumnName}: [
|
||||
{ required: true, message: '<#if column.remark != ''>${column.remark}</#if>不能为空', trigger: 'blur' }
|
||||
{ required: true, message: '<#if column.remark != ''>${column.remark}</#if> cannot be empty', trigger: 'blur' }
|
||||
]<#if column_has_next>,</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
|
@ -156,7 +156,7 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
// Hook: executed before getting table data, false means no data will be fetched
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>eladmin-logging</artifactId>
|
||||
<name>日志模块</name>
|
||||
<name>Logging Module</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
|
@ -49,15 +49,15 @@ public class LogAspect {
|
|||
}
|
||||
|
||||
/**
|
||||
* 配置切入点
|
||||
* Configure pointcut
|
||||
*/
|
||||
@Pointcut("@annotation(me.zhengjie.annotation.Log)")
|
||||
public void logPointcut() {
|
||||
// 该方法无方法体,主要为了让同类中其他方法使用此切入点
|
||||
// This method has no method body. It mainly allows other methods in the same class to use this pointcut.
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置环绕通知,使用在方法logPointcut()上注册的切入点
|
||||
* Configure around advice, used on the pointcut registered on method logPointcut()
|
||||
*
|
||||
* @param joinPoint join point for advice
|
||||
*/
|
||||
|
@ -74,7 +74,7 @@ public class LogAspect {
|
|||
}
|
||||
|
||||
/**
|
||||
* 配置异常通知
|
||||
* Configure exception advice
|
||||
*
|
||||
* @param joinPoint join point for advice
|
||||
* @param e exception
|
||||
|
@ -89,7 +89,7 @@ public class LogAspect {
|
|||
}
|
||||
|
||||
/**
|
||||
* 获取用户名
|
||||
* Get the current username
|
||||
* @return /
|
||||
*/
|
||||
public String getUsername() {
|
||||
|
|
|
@ -42,39 +42,39 @@ public class SysLog implements Serializable {
|
|||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "操作用户")
|
||||
@ApiModelProperty(value = "Operator User")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
@ApiModelProperty(value = "Description")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "方法名")
|
||||
@ApiModelProperty(value = "Method Name")
|
||||
private String method;
|
||||
|
||||
@ApiModelProperty(value = "参数")
|
||||
@ApiModelProperty(value = "Parameters")
|
||||
private String params;
|
||||
|
||||
@ApiModelProperty(value = "日志类型")
|
||||
@ApiModelProperty(value = "Log Type")
|
||||
private String logType;
|
||||
|
||||
@ApiModelProperty(value = "请求ip")
|
||||
@ApiModelProperty(value = "Request IP")
|
||||
private String requestIp;
|
||||
|
||||
@ApiModelProperty(value = "地址")
|
||||
@ApiModelProperty(value = "Address")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "浏览器")
|
||||
@ApiModelProperty(value = "Browser")
|
||||
private String browser;
|
||||
|
||||
@ApiModelProperty(value = "请求耗时")
|
||||
@ApiModelProperty(value = "Request Duration")
|
||||
private Long time;
|
||||
|
||||
@ApiModelProperty(value = "异常详细")
|
||||
@ApiModelProperty(value = "Exception Details")
|
||||
private byte[] exceptionDetail;
|
||||
|
||||
/** 创建日期 */
|
||||
/** Creation Date */
|
||||
@CreationTimestamp
|
||||
@ApiModelProperty(value = "创建日期:yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "Creation Date: yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp createTime;
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ import org.springframework.stereotype.Repository;
|
|||
public interface LogRepository extends JpaRepository<SysLog,Long>, JpaSpecificationExecutor<SysLog> {
|
||||
|
||||
/**
|
||||
* 根据日志类型删除信息
|
||||
* @param logType 日志类型
|
||||
* Delete information by log type
|
||||
* @param logType Log type
|
||||
*/
|
||||
@Modifying
|
||||
@Query(value = "delete from sys_log where log_type = ?1", nativeQuery = true)
|
||||
|
|
|
@ -39,13 +39,13 @@ import java.io.IOException;
|
|||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/logs")
|
||||
@Api(tags = "系统:日志管理")
|
||||
@Api(tags = "System: Log Management")
|
||||
public class SysLogController {
|
||||
|
||||
private final SysLogService sysLogService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@Log("Export Data")
|
||||
@ApiOperation("Export Data")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check()")
|
||||
public void exportLog(HttpServletResponse response, SysLogQueryCriteria criteria) throws IOException {
|
||||
|
@ -53,8 +53,8 @@ public class SysLogController {
|
|||
sysLogService.download(sysLogService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@Log("导出错误数据")
|
||||
@ApiOperation("导出错误数据")
|
||||
@Log("Export Error Data")
|
||||
@ApiOperation("Export Error Data")
|
||||
@GetMapping(value = "/error/download")
|
||||
@PreAuthorize("@el.check()")
|
||||
public void exportErrorLog(HttpServletResponse response, SysLogQueryCriteria criteria) throws IOException {
|
||||
|
@ -62,7 +62,7 @@ public class SysLogController {
|
|||
sysLogService.download(sysLogService.queryAll(criteria), response);
|
||||
}
|
||||
@GetMapping
|
||||
@ApiOperation("日志查询")
|
||||
@ApiOperation("Log Query")
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<Object> queryLog(SysLogQueryCriteria criteria, Pageable pageable){
|
||||
criteria.setLogType("INFO");
|
||||
|
@ -70,7 +70,7 @@ public class SysLogController {
|
|||
}
|
||||
|
||||
@GetMapping(value = "/user")
|
||||
@ApiOperation("用户日志查询")
|
||||
@ApiOperation("User Log Query")
|
||||
public ResponseEntity<PageResult<SysLogSmallDto>> queryUserLog(SysLogQueryCriteria criteria, Pageable pageable){
|
||||
criteria.setLogType("INFO");
|
||||
criteria.setUsername(SecurityUtils.getCurrentUsername());
|
||||
|
@ -78,7 +78,7 @@ public class SysLogController {
|
|||
}
|
||||
|
||||
@GetMapping(value = "/error")
|
||||
@ApiOperation("错误日志查询")
|
||||
@ApiOperation("Error Log Query")
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<Object> queryErrorLog(SysLogQueryCriteria criteria, Pageable pageable){
|
||||
criteria.setLogType("ERROR");
|
||||
|
@ -86,14 +86,14 @@ public class SysLogController {
|
|||
}
|
||||
|
||||
@GetMapping(value = "/error/{id}")
|
||||
@ApiOperation("日志异常详情查询")
|
||||
@ApiOperation("Log Exception Detail Query")
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<Object> queryErrorLogDetail(@PathVariable Long id){
|
||||
return new ResponseEntity<>(sysLogService.findByErrDetail(id), HttpStatus.OK);
|
||||
}
|
||||
@DeleteMapping(value = "/del/error")
|
||||
@Log("删除所有ERROR日志")
|
||||
@ApiOperation("删除所有ERROR日志")
|
||||
@Log("Delete All ERROR Logs")
|
||||
@ApiOperation("Delete All ERROR Logs")
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<Object> delAllErrorLog(){
|
||||
sysLogService.delAllByError();
|
||||
|
@ -101,8 +101,8 @@ public class SysLogController {
|
|||
}
|
||||
|
||||
@DeleteMapping(value = "/del/info")
|
||||
@Log("删除所有INFO日志")
|
||||
@ApiOperation("删除所有INFO日志")
|
||||
@Log("Delete All INFO Logs")
|
||||
@ApiOperation("Delete All INFO Logs")
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<Object> delAllInfoLog(){
|
||||
sysLogService.delAllByInfo();
|
||||
|
|
|
@ -34,61 +34,61 @@ import java.util.List;
|
|||
public interface SysLogService {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param criteria 查询条件
|
||||
* @param pageable 分页参数
|
||||
* Paginated query
|
||||
* @param criteria Query criteria
|
||||
* @param pageable Pagination parameters
|
||||
* @return /
|
||||
*/
|
||||
Object queryAll(SysLogQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询全部数据
|
||||
* @param criteria 查询条件
|
||||
* Query all data
|
||||
* @param criteria Query criteria
|
||||
* @return /
|
||||
*/
|
||||
List<SysLog> queryAll(SysLogQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 查询用户日志
|
||||
* @param criteria 查询条件
|
||||
* @param pageable 分页参数
|
||||
* @return -
|
||||
* Query user logs
|
||||
* @param criteria Query criteria
|
||||
* @param pageable Pagination parameters
|
||||
* @return /
|
||||
*/
|
||||
PageResult<SysLogSmallDto> queryAllByUser(SysLogQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 保存日志数据
|
||||
* @param username 用户
|
||||
* @param browser 浏览器
|
||||
* @param ip 请求IP
|
||||
* Save log data
|
||||
* @param username User
|
||||
* @param browser Browser
|
||||
* @param ip Request IP
|
||||
* @param joinPoint /
|
||||
* @param sysLog 日志实体
|
||||
* @param sysLog Log entity
|
||||
*/
|
||||
@Async
|
||||
void save(String username, String browser, String ip, ProceedingJoinPoint joinPoint, SysLog sysLog);
|
||||
|
||||
/**
|
||||
* 查询异常详情
|
||||
* @param id 日志ID
|
||||
* Query exception details
|
||||
* @param id Log ID
|
||||
* @return Object
|
||||
*/
|
||||
Object findByErrDetail(Long id);
|
||||
|
||||
/**
|
||||
* 导出日志
|
||||
* @param sysLogs 待导出的数据
|
||||
* Export logs
|
||||
* @param sysLogs Data to export
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<SysLog> sysLogs, HttpServletResponse response) throws IOException;
|
||||
|
||||
/**
|
||||
* 删除所有错误日志
|
||||
* Delete all error logs
|
||||
*/
|
||||
void delAllByError();
|
||||
|
||||
/**
|
||||
* 删除所有INFO日志
|
||||
* Delete all INFO logs
|
||||
*/
|
||||
void delAllByInfo();
|
||||
}
|
||||
|
|
|
@ -30,27 +30,27 @@ public class SysLogErrorDto implements Serializable {
|
|||
@ApiModelProperty(value = "ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@ApiModelProperty(value = "Username")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
@ApiModelProperty(value = "Description")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "方法")
|
||||
@ApiModelProperty(value = "Method")
|
||||
private String method;
|
||||
|
||||
@ApiModelProperty(value = "参数")
|
||||
@ApiModelProperty(value = "Parameters")
|
||||
private String params;
|
||||
|
||||
@ApiModelProperty(value = "浏览器")
|
||||
@ApiModelProperty(value = "Browser")
|
||||
private String browser;
|
||||
|
||||
@ApiModelProperty(value = "请求ip")
|
||||
@ApiModelProperty(value = "Request IP")
|
||||
private String requestIp;
|
||||
|
||||
@ApiModelProperty(value = "地址")
|
||||
@ApiModelProperty(value = "Address")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@ApiModelProperty(value = "Creation time")
|
||||
private Timestamp createTime;
|
||||
}
|
|
@ -22,26 +22,26 @@ import java.sql.Timestamp;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 日志查询类
|
||||
* Log query class
|
||||
* @author Zheng Jie
|
||||
* @date 2019-6-4 09:23:07
|
||||
*/
|
||||
@Data
|
||||
public class SysLogQueryCriteria {
|
||||
|
||||
@ApiModelProperty(value = "模糊查询")
|
||||
@ApiModelProperty(value = "Fuzzy search")
|
||||
@Query(blurry = "username,description,address,requestIp,method,params")
|
||||
private String blurry;
|
||||
|
||||
@Query
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@ApiModelProperty(value = "Username")
|
||||
private String username;
|
||||
|
||||
@Query
|
||||
@ApiModelProperty(value = "日志类型")
|
||||
@ApiModelProperty(value = "Log type")
|
||||
private String logType;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@ApiModelProperty(value = "Creation time")
|
||||
@Query(type = Query.Type.BETWEEN)
|
||||
private List<Timestamp> createTime;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public class SysLogServiceImpl implements SysLogService {
|
|||
private final LogRepository logRepository;
|
||||
private final LogErrorMapper logErrorMapper;
|
||||
private final LogSmallMapper logSmallMapper;
|
||||
// 定义敏感字段常量数组
|
||||
// Define sensitive field constant array
|
||||
private static final String[] SENSITIVE_KEYS = {"password"};
|
||||
|
||||
@Override
|
||||
|
@ -82,21 +82,21 @@ public class SysLogServiceImpl implements SysLogService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(String username, String browser, String ip, ProceedingJoinPoint joinPoint, SysLog sysLog) {
|
||||
if (sysLog == null) {
|
||||
throw new IllegalArgumentException("Log 不能为 null!");
|
||||
throw new IllegalArgumentException("Log cannot be null!");
|
||||
}
|
||||
|
||||
// 获取方法签名
|
||||
// Get method signature
|
||||
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
|
||||
Method method = signature.getMethod();
|
||||
me.zhengjie.annotation.Log aopLog = method.getAnnotation(me.zhengjie.annotation.Log.class);
|
||||
|
||||
// 方法路径
|
||||
// Method path
|
||||
String methodName = joinPoint.getTarget().getClass().getName() + "." + signature.getName() + "()";
|
||||
|
||||
// 获取参数
|
||||
// Get parameters
|
||||
JSONObject params = getParameter(method, joinPoint.getArgs());
|
||||
|
||||
// 填充基本信息
|
||||
// Fill in basic information
|
||||
sysLog.setRequestIp(ip);
|
||||
sysLog.setAddress(StringUtils.getCityInfo(sysLog.getRequestIp()));
|
||||
sysLog.setMethod(methodName);
|
||||
|
@ -105,35 +105,35 @@ public class SysLogServiceImpl implements SysLogService {
|
|||
sysLog.setBrowser(browser);
|
||||
sysLog.setDescription(aopLog.value());
|
||||
|
||||
// 如果没有获取到用户名,尝试从参数中获取
|
||||
// If the username is not obtained, try to get it from the parameters
|
||||
if(StringUtils.isBlank(sysLog.getUsername())){
|
||||
sysLog.setUsername(params.getString("username"));
|
||||
}
|
||||
|
||||
// 保存
|
||||
// Save
|
||||
logRepository.save(sysLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据方法和传入的参数获取请求参数
|
||||
* Get request parameters based on method and input parameters
|
||||
*/
|
||||
private JSONObject getParameter(Method method, Object[] args) {
|
||||
JSONObject params = new JSONObject();
|
||||
Parameter[] parameters = method.getParameters();
|
||||
for (int i = 0; i < parameters.length; i++) {
|
||||
// 过滤掉 MultiPartFile
|
||||
// Filter out MultiPartFile
|
||||
if (args[i] instanceof MultipartFile) {
|
||||
continue;
|
||||
}
|
||||
// 过滤掉 HttpServletResponse
|
||||
// Filter out HttpServletResponse
|
||||
if (args[i] instanceof HttpServletResponse) {
|
||||
continue;
|
||||
}
|
||||
// 过滤掉 HttpServletRequest
|
||||
// Filter out HttpServletRequest
|
||||
if (args[i] instanceof HttpServletRequest) {
|
||||
continue;
|
||||
}
|
||||
// 将RequestBody注解修饰的参数作为请求参数
|
||||
// Use parameters annotated with RequestBody as request parameters
|
||||
RequestBody requestBody = parameters[i].getAnnotation(RequestBody.class);
|
||||
if (requestBody != null) {
|
||||
params.putAll((JSONObject) JSON.toJSON(args[i]));
|
||||
|
@ -142,14 +142,14 @@ public class SysLogServiceImpl implements SysLogService {
|
|||
params.put(key, args[i]);
|
||||
}
|
||||
}
|
||||
// 遍历敏感字段数组并替换值
|
||||
// Traverse sensitive field array and replace value
|
||||
Set<String> keys = params.keySet();
|
||||
for (String key : SENSITIVE_KEYS) {
|
||||
if (keys.contains(key)) {
|
||||
params.put(key, "******");
|
||||
}
|
||||
}
|
||||
// 返回参数
|
||||
// Return parameters
|
||||
return params;
|
||||
}
|
||||
|
||||
|
@ -166,14 +166,14 @@ public class SysLogServiceImpl implements SysLogService {
|
|||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (SysLog sysLog : sysLogs) {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("用户名", sysLog.getUsername());
|
||||
map.put("Username", sysLog.getUsername());
|
||||
map.put("IP", sysLog.getRequestIp());
|
||||
map.put("IP来源", sysLog.getAddress());
|
||||
map.put("描述", sysLog.getDescription());
|
||||
map.put("浏览器", sysLog.getBrowser());
|
||||
map.put("请求耗时/毫秒", sysLog.getTime());
|
||||
map.put("异常详情", new String(ObjectUtil.isNotNull(sysLog.getExceptionDetail()) ? sysLog.getExceptionDetail() : "".getBytes()));
|
||||
map.put("创建日期", sysLog.getCreateTime());
|
||||
map.put("IP Source", sysLog.getAddress());
|
||||
map.put("Description", sysLog.getDescription());
|
||||
map.put("Browser", sysLog.getBrowser());
|
||||
map.put("Request Time/ms", sysLog.getTime());
|
||||
map.put("Exception Details", new String(ObjectUtil.isNotNull(sysLog.getExceptionDetail()) ? sysLog.getExceptionDetail() : "".getBytes()));
|
||||
map.put("Creation Date", sysLog.getCreateTime());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>eladmin-system</artifactId>
|
||||
<name>核心模块</name>
|
||||
<name>Core Module</name>
|
||||
|
||||
<properties>
|
||||
<jjwt.version>0.11.5</jjwt.version>
|
||||
<!-- oshi监控需要指定jna版本, 问题详见 https://github.com/oshi/oshi/issues/1040 -->
|
||||
<!-- oshi monitoring requires specifying the jna version, see https://github.com/oshi/oshi/issues/1040 -->
|
||||
<jna.version>5.8.0</jna.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- 代码生成模块 -->
|
||||
<!-- Code Generation Module -->
|
||||
<dependency>
|
||||
<groupId>me.zhengjie</groupId>
|
||||
<artifactId>eladmin-generator</artifactId>
|
||||
|
@ -30,7 +30,7 @@
|
|||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- tools 模块包含了 common 和 logging 模块 -->
|
||||
<!-- The tools module includes the common and logging modules -->
|
||||
<dependency>
|
||||
<groupId>me.zhengjie</groupId>
|
||||
<artifactId>eladmin-tools</artifactId>
|
||||
|
@ -65,7 +65,7 @@
|
|||
<version>${jjwt.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- linux的管理 -->
|
||||
<!-- Linux management -->
|
||||
<dependency>
|
||||
<groupId>ch.ethz.ganymed</groupId>
|
||||
<artifactId>ganymed-ssh2</artifactId>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<version>0.1.55</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 获取系统信息 -->
|
||||
<!-- Obtain system information -->
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core</artifactId>
|
||||
|
@ -85,14 +85,14 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- 打包 -->
|
||||
<!-- Packaging -->
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<!-- 跳过单元测试 -->
|
||||
<!-- Skip unit tests -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 开启审计功能 -> @EnableJpaAuditing
|
||||
* Enable auditing functionality -> @EnableJpaAuditing
|
||||
*
|
||||
* @author Zheng Jie
|
||||
* @date 2018/11/15 9:20:19
|
||||
|
@ -49,8 +49,8 @@ public class AppRun {
|
|||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication springApplication = new SpringApplication(AppRun.class);
|
||||
// 监控应用的PID,启动时可指定PID路径:--spring.pid.file=/home/eladmin/app.pid
|
||||
// 或者在 application.yml 添加文件路径,方便 kill,kill `cat /home/eladmin/app.pid`
|
||||
// Monitor the application's PID. You can specify the PID path at startup: --spring.pid.file=/home/eladmin/app.pid
|
||||
// Or add the file path in application.yml for easy kill: kill `cat /home/eladmin/app.pid`
|
||||
springApplication.addListeners(new ApplicationPidFileWriter());
|
||||
springApplication.run(args);
|
||||
log.info("---------------------------------------------");
|
||||
|
@ -65,7 +65,7 @@ public class AppRun {
|
|||
}
|
||||
|
||||
/**
|
||||
* 访问首页提示
|
||||
* Homepage access prompt
|
||||
*
|
||||
* @return /
|
||||
*/
|
||||
|
|
|
@ -39,29 +39,29 @@ import java.util.Set;
|
|||
* @date 2019-08-24
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "运维:服务器管理")
|
||||
@Api(tags = "Ops: Server Management")
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/serverDeploy")
|
||||
public class ServerDeployController {
|
||||
|
||||
private final ServerDeployService serverDeployService;
|
||||
|
||||
@ApiOperation("导出服务器数据")
|
||||
@ApiOperation("Export server data")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('serverDeploy:list')")
|
||||
public void exportServerDeploy(HttpServletResponse response, ServerDeployQueryCriteria criteria) throws IOException {
|
||||
serverDeployService.download(serverDeployService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询服务器")
|
||||
@ApiOperation(value = "Query server")
|
||||
@GetMapping
|
||||
@PreAuthorize("@el.check('serverDeploy:list')")
|
||||
public ResponseEntity<PageResult<ServerDeployDto>> queryServerDeploy(ServerDeployQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(serverDeployService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("新增服务器")
|
||||
@ApiOperation(value = "新增服务器")
|
||||
@Log("Add server")
|
||||
@ApiOperation(value = "Add server")
|
||||
@PostMapping
|
||||
@PreAuthorize("@el.check('serverDeploy:add')")
|
||||
public ResponseEntity<Object> createServerDeploy(@Validated @RequestBody ServerDeploy resources){
|
||||
|
@ -69,8 +69,8 @@ public class ServerDeployController {
|
|||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@Log("修改服务器")
|
||||
@ApiOperation(value = "修改服务器")
|
||||
@Log("Update server")
|
||||
@ApiOperation(value = "Update server")
|
||||
@PutMapping
|
||||
@PreAuthorize("@el.check('serverDeploy:edit')")
|
||||
public ResponseEntity<Object> updateServerDeploy(@Validated @RequestBody ServerDeploy resources){
|
||||
|
@ -78,8 +78,8 @@ public class ServerDeployController {
|
|||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除服务器")
|
||||
@ApiOperation(value = "删除Server")
|
||||
@Log("Delete server")
|
||||
@ApiOperation(value = "Delete Server")
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@el.check('serverDeploy:del')")
|
||||
public ResponseEntity<Object> deleteServerDeploy(@RequestBody Set<Long> ids){
|
||||
|
@ -87,8 +87,8 @@ public class ServerDeployController {
|
|||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("测试连接服务器")
|
||||
@ApiOperation(value = "测试连接服务器")
|
||||
@Log("Test server connection")
|
||||
@ApiOperation(value = "Test server connection")
|
||||
@PostMapping("/testConnect")
|
||||
@PreAuthorize("@el.check('serverDeploy:add')")
|
||||
public ResponseEntity<Object> testConnectServerDeploy(@Validated @RequestBody ServerDeploy resources){
|
||||
|
|
|
@ -133,9 +133,9 @@ public class DeptServiceImpl implements DeptService {
|
|||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (DeptDto deptDTO : deptDtos) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("部门名称", deptDTO.getName());
|
||||
map.put("部门状态", deptDTO.getEnabled() ? "启用" : "停用");
|
||||
map.put("创建日期", deptDTO.getCreateTime());
|
||||
map.put("Department name", deptDTO.getName());
|
||||
map.put("Department status", deptDTO.getEnabled() ? "Enabled" : "Disabled");
|
||||
map.put("Creation date", deptDTO.getCreateTime());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
|
|
|
@ -94,20 +94,20 @@ public class DictServiceImpl implements DictService {
|
|||
if(CollectionUtil.isNotEmpty(dictDTO.getDictDetails())){
|
||||
for (DictDetailDto dictDetail : dictDTO.getDictDetails()) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("字典名称", dictDTO.getName());
|
||||
map.put("字典描述", dictDTO.getDescription());
|
||||
map.put("字典标签", dictDetail.getLabel());
|
||||
map.put("字典值", dictDetail.getValue());
|
||||
map.put("创建日期", dictDetail.getCreateTime());
|
||||
map.put("Dictionary name", dictDTO.getName());
|
||||
map.put("Dictionary description", dictDTO.getDescription());
|
||||
map.put("Dictionary label", dictDetail.getLabel());
|
||||
map.put("Dictionary value", dictDetail.getValue());
|
||||
map.put("Creation date", dictDetail.getCreateTime());
|
||||
list.add(map);
|
||||
}
|
||||
} else {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("字典名称", dictDTO.getName());
|
||||
map.put("字典描述", dictDTO.getDescription());
|
||||
map.put("字典标签", null);
|
||||
map.put("字典值", null);
|
||||
map.put("创建日期", dictDTO.getCreateTime());
|
||||
map.put("Dictionary name", dictDTO.getName());
|
||||
map.put("Dictionary description", dictDTO.getDescription());
|
||||
map.put("Dictionary label", null);
|
||||
map.put("Dictionary value", null);
|
||||
map.put("Creation date", dictDTO.getCreateTime());
|
||||
list.add(map);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -197,10 +197,11 @@ public class RoleServiceImpl implements RoleService {
|
|||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (RoleDto role : roles) {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("角色名称", role.getName());
|
||||
map.put("角色级别", role.getLevel());
|
||||
map.put("描述", role.getDescription());
|
||||
map.put("创建日期", role.getCreateTime());
|
||||
map.put("Role name", role.getName());
|
||||
map.put("Role description", role.getDescription());
|
||||
map.put("Role data scope", role.getDataScope());
|
||||
map.put("Role level", role.getLevel());
|
||||
map.put("Creation date", role.getCreateTime());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
|
|
|
@ -114,18 +114,18 @@ public class UserServiceImpl implements UserService {
|
|||
if (user3 != null && !user.getId().equals(user3.getId())) {
|
||||
throw new EntityExistException(User.class, "phone", resources.getPhone());
|
||||
}
|
||||
// 如果用户的角色改变
|
||||
// If the user's role changes
|
||||
if (!resources.getRoles().equals(user.getRoles())) {
|
||||
redisUtils.del(CacheKey.DATA_USER + resources.getId());
|
||||
redisUtils.del(CacheKey.MENU_USER + resources.getId());
|
||||
redisUtils.del(CacheKey.ROLE_AUTH + resources.getId());
|
||||
redisUtils.del(CacheKey.ROLE_USER + resources.getId());
|
||||
}
|
||||
// 修改部门会影响 数据权限
|
||||
// Modifying the department will affect data permissions
|
||||
if (!Objects.equals(resources.getDept(),user.getDept())) {
|
||||
redisUtils.del(CacheKey.DATA_USER + resources.getId());
|
||||
}
|
||||
// 如果用户被禁用,则清除用户登录信息
|
||||
// If the user is disabled, clear the user's login information
|
||||
if(!resources.getEnabled()){
|
||||
onlineUserService.kickOutForUsername(resources.getUsername());
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ public class UserServiceImpl implements UserService {
|
|||
user.setNickName(resources.getNickName());
|
||||
user.setGender(resources.getGender());
|
||||
userRepository.save(user);
|
||||
// 清除缓存
|
||||
// Clear cache
|
||||
delCaches(user.getId(), user.getUsername());
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ public class UserServiceImpl implements UserService {
|
|||
user.setPhone(resources.getPhone());
|
||||
user.setGender(resources.getGender());
|
||||
userRepository.save(user);
|
||||
// 清理缓存
|
||||
// Clear cache
|
||||
delCaches(user.getId(), user.getUsername());
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ public class UserServiceImpl implements UserService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Set<Long> ids) {
|
||||
for (Long id : ids) {
|
||||
// 清理缓存
|
||||
// Clear cache
|
||||
UserDto user = findById(id);
|
||||
delCaches(user.getId(), user.getUsername());
|
||||
}
|
||||
|
@ -200,27 +200,27 @@ public class UserServiceImpl implements UserService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public void resetPwd(Set<Long> ids, String pwd) {
|
||||
List<User> users = userRepository.findAllById(ids);
|
||||
// 清除缓存
|
||||
// Clear cache
|
||||
users.forEach(user -> {
|
||||
// 清除缓存
|
||||
// Clear cache
|
||||
flushCache(user.getUsername());
|
||||
// 强制退出
|
||||
// Force logout
|
||||
onlineUserService.kickOutForUsername(user.getUsername());
|
||||
});
|
||||
// 重置密码
|
||||
// Reset password
|
||||
userRepository.resetPwd(ids, pwd);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> updateAvatar(MultipartFile multipartFile) {
|
||||
// 文件大小验证
|
||||
// File size validation
|
||||
FileUtil.checkSize(properties.getAvatarMaxSize(), multipartFile.getSize());
|
||||
// 验证文件上传的格式
|
||||
// Validate file upload format
|
||||
String image = "gif jpg png jpeg";
|
||||
String fileType = FileUtil.getExtensionName(multipartFile.getOriginalFilename());
|
||||
if(fileType != null && !image.contains(fileType)){
|
||||
throw new BadRequestException("文件格式错误!, 仅支持 " + image +" 格式");
|
||||
throw new BadRequestException("File format error! Only supports " + image + " format");
|
||||
}
|
||||
User user = userRepository.findByUsername(SecurityUtils.getCurrentUsername());
|
||||
String oldPath = user.getAvatarPath();
|
||||
|
@ -251,21 +251,20 @@ public class UserServiceImpl implements UserService {
|
|||
for (UserDto userDTO : queryAll) {
|
||||
List<String> roles = userDTO.getRoles().stream().map(RoleSmallDto::getName).collect(Collectors.toList());
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("用户名", userDTO.getUsername());
|
||||
map.put("角色", roles);
|
||||
map.put("部门", userDTO.getDept().getName());
|
||||
map.put("邮箱", userDTO.getEmail());
|
||||
map.put("状态", userDTO.getEnabled() ? "启用" : "禁用");
|
||||
map.put("手机号码", userDTO.getPhone());
|
||||
map.put("修改密码的时间", userDTO.getPwdResetTime());
|
||||
map.put("创建日期", userDTO.getCreateTime());
|
||||
map.put("Username", userDTO.getUsername());
|
||||
map.put("Nickname", userDTO.getNickName());
|
||||
map.put("Department", userDTO.getDept().getName());
|
||||
map.put("Phone", userDTO.getPhone());
|
||||
map.put("Email", userDTO.getEmail());
|
||||
map.put("Status", userDTO.getEnabled() ? "Enabled" : "Disabled");
|
||||
map.put("Creation date", userDTO.getCreateTime());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理缓存
|
||||
* Clear cache
|
||||
*
|
||||
* @param id /
|
||||
*/
|
||||
|
@ -275,7 +274,7 @@ public class UserServiceImpl implements UserService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 清理 登陆时 用户缓存信息
|
||||
* Clear user cache information at login
|
||||
*
|
||||
* @param username /
|
||||
*/
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @description 程序启动后处理数据
|
||||
* @description Process data after program startup
|
||||
* @date 2025-01-13
|
||||
**/
|
||||
@Slf4j
|
||||
|
|
|
@ -4,7 +4,7 @@ spring:
|
|||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.p6spy.engine.spy.P6SpyDriver
|
||||
url: jdbc:p6spy:mysql://localhost:3306/eladmin?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
|
||||
url: jdbc:p6spy:mysql://localhost:3306/eladmin?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: root
|
||||
# 初始连接数,建议设置为与最小空闲连接数相同
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
server:
|
||||
port: 8000
|
||||
http2:
|
||||
# 启用 HTTP/2 支持,提升传输效率
|
||||
# Enable HTTP/2 support to improve transmission efficiency
|
||||
enabled: true
|
||||
compression:
|
||||
# 启用 GZIP 压缩,减少传输数据量
|
||||
# Enable GZIP compression to reduce data transmission
|
||||
enabled: true
|
||||
# 需要压缩的 MIME 类型
|
||||
# MIME types to compress
|
||||
mime-types: text/html, text/xml, text/plain, application/json
|
||||
# 最小压缩响应大小(字节)
|
||||
# Minimum response size for compression (bytes)
|
||||
|
||||
spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
# 激活的环境,如果需要 quartz 分布式支持,需要修改 active: dev,quartz
|
||||
# Active environment. If you need quartz distributed support, change active: dev,quartz
|
||||
active: dev
|
||||
data:
|
||||
redis:
|
||||
repositories:
|
||||
enabled: false
|
||||
# pid:
|
||||
# file: /自行指定位置/eladmin.pid
|
||||
# file: /specify/location/eladmin.pid
|
||||
|
||||
#配置 Jpa
|
||||
# JPA configuration
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: none
|
||||
|
@ -33,45 +33,45 @@ spring:
|
|||
dialect: org.hibernate.dialect.MySQL8Dialect
|
||||
|
||||
redis:
|
||||
#数据库索引
|
||||
# Database index
|
||||
database: ${REDIS_DB:0}
|
||||
host: ${REDIS_HOST:127.0.0.1}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PWD:}
|
||||
#连接超时时间
|
||||
# Connection timeout
|
||||
timeout: 5000
|
||||
# 连接池配置
|
||||
# Connection pool configuration
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池最大连接数
|
||||
# Maximum number of connections in the pool
|
||||
max-active: 30
|
||||
# 连接池最大阻塞等待时间(毫秒),负值表示没有限制
|
||||
# Maximum blocking wait time in the pool (ms), negative means no limit
|
||||
max-wait: -1
|
||||
# 连接池中的最大空闲连接数
|
||||
# Maximum idle connections in the pool
|
||||
max-idle: 20
|
||||
# 连接池中的最小空闲连接数
|
||||
# Minimum idle connections in the pool
|
||||
min-idle: 1
|
||||
|
||||
task:
|
||||
pool:
|
||||
# 核心线程池大小
|
||||
# Core thread pool size
|
||||
core-pool-size: 10
|
||||
# 最大线程数
|
||||
# Maximum number of threads
|
||||
max-pool-size: 30
|
||||
# 活跃时间
|
||||
# Keep alive time
|
||||
keep-alive-seconds: 60
|
||||
# 队列容量
|
||||
# Queue capacity
|
||||
queue-capacity: 50
|
||||
|
||||
#七牛云
|
||||
# Qiniu Cloud
|
||||
qiniu:
|
||||
# 文件大小 /M
|
||||
# File size /M
|
||||
max-size: 15
|
||||
|
||||
#邮箱验证码有效时间/秒
|
||||
# Email verification code validity time/seconds
|
||||
code:
|
||||
expiration: 300
|
||||
|
||||
#密码加密传输,前端公钥加密,后端私钥解密
|
||||
# Password encrypted transmission, frontend public key encryption, backend private key decryption
|
||||
rsa:
|
||||
private_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A==
|
|
@ -1,29 +1,29 @@
|
|||
# 应用的拦截模块
|
||||
# Application interception module
|
||||
modulelist=com.p6spy.engine.logging.P6LogFactory,com.p6spy.engine.outage.P6OutageFactory
|
||||
|
||||
# 自定义日志打印
|
||||
# Custom log printing
|
||||
logMessageFormat=me.zhengjie.config.CustomP6SpyLogger
|
||||
|
||||
# 日志输出到控制台
|
||||
# Log output to console
|
||||
appender=com.p6spy.engine.spy.appender.Slf4JLogger
|
||||
|
||||
# 日期格式
|
||||
# Date format
|
||||
dateformat=yyyy-MM-dd HH:mm:ss
|
||||
|
||||
# 实际驱动可多个
|
||||
# Multiple actual drivers possible
|
||||
driverlist=com.mysql.cj.jdbc.Driver
|
||||
|
||||
# 是否开启慢SQL记录
|
||||
# Enable slow SQL logging
|
||||
outagedetection=true
|
||||
|
||||
# 慢SQL记录标准 2 秒
|
||||
# Slow SQL logging standard: 2 seconds
|
||||
outagedetectioninterval=2
|
||||
|
||||
# 是否过滤 Log
|
||||
# Whether to filter Log
|
||||
filter=true
|
||||
|
||||
# 过滤 Log 时所排除的 sql 关键字,以逗号分隔
|
||||
# SQL keywords to exclude when filtering Log, separated by commas
|
||||
exclude=SELECT 1,INSERT INTO sys_log
|
||||
|
||||
# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
|
||||
# Configure Log exceptions, removable result sets include error, info, batch, debug, statement, commit, rollback, result, resultset.
|
||||
excludecategories=info,debug,result,commit,resultset
|
|
@ -19,8 +19,8 @@
|
|||
margin-top: 20px;
|
||||
border: 1px solid #eee;">
|
||||
<div style="padding: 10px;padding-bottom: 0px;">
|
||||
<p style="margin-bottom: 10px;padding-bottom: 0px;">尊敬的用户,您好:</p>
|
||||
<p style="text-indent: 2em; margin-bottom: 10px;">您正在申请邮箱验证,您的验证码为:</p>
|
||||
<p style="margin-bottom: 10px;padding-bottom: 0px;">Dear user, hello:</p>
|
||||
<p style="text-indent: 2em; margin-bottom: 10px;">You are applying for email verification, your verification code is:</p>
|
||||
<p style="text-align: center;
|
||||
font-family: Times New Roman;
|
||||
font-size: 22px;
|
||||
|
@ -39,7 +39,7 @@
|
|||
font-size: 12px;
|
||||
padding: 20px 0px;
|
||||
font-family: Microsoft YaHei;">
|
||||
Copyright ©${.now?string("yyyy")} <a hover="color: #DA251D;" style="color: #999;" href="https://github.com/elunez/eladmin" target="_blank">ELADMIN</a> 后台管理系统 All Rights Reserved.
|
||||
Copyright ©${.now?string("yyyy")} <a hover="color: #DA251D;" style="color: #999;" href="https://github.com/elunez/eladmin" target="_blank">ELADMIN</a> Backend Management System All Rights Reserved.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -18,15 +18,15 @@
|
|||
padding: 20px;
|
||||
border: 1px solid #eee;">
|
||||
<div>
|
||||
<p style="margin-bottom: 10px;">任务信息:</p>
|
||||
<p style="margin-bottom: 10px;">Task Information:</p>
|
||||
<table style="border-collapse: collapse;">
|
||||
<tr>
|
||||
<th style="padding: .65em;background: #666;border: 1px solid #777;color: #fff;">任务名称</th>
|
||||
<th style="padding: .65em;background: #666;border: 1px solid #777;color: #fff;">Bean名称</th>
|
||||
<th style="padding: .65em;background: #666;border: 1px solid #777;color: #fff;">执行方法</th>
|
||||
<th style="padding: .65em;background: #666;border: 1px solid #777;color: #fff;">参数内容</th>
|
||||
<th style="padding: .65em;background: #666;border: 1px solid #777;color: #fff;">Cron表达式</th>
|
||||
<th style="padding: .65em;background: #666;border: 1px solid #777;color: #fff;">描述内容</th>
|
||||
<th style="padding: .65em;background: #666;border: 1px solid #777;color: #fff;">Task Name</th>
|
||||
<th style="padding: .65em;background: #666;border: 1px solid #777;color: #fff;">Bean Name</th>
|
||||
<th style="padding: .65em;background: #666;border: 1px solid #777;color: #fff;">Execution Method</th>
|
||||
<th style="padding: .65em;background: #666;border: 1px solid #777;color: #fff;">Parameter Content</th>
|
||||
<th style="padding: .65em;background: #666;border: 1px solid #777;color: #fff;">Cron Expression</th>
|
||||
<th style="padding: .65em;background: #666;border: 1px solid #777;color: #fff;">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: .65em;border: 1px solid#777;">${task.jobName}</td>
|
||||
|
@ -39,7 +39,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<p style="margin-bottom: 10px;">异常信息:</p>
|
||||
<p style="margin-bottom: 10px;">Exception Information:</p>
|
||||
<pre style="position: relative;
|
||||
padding: 15px;
|
||||
line-height: 20px;
|
||||
|
@ -60,7 +60,7 @@
|
|||
font-size: 12px;
|
||||
padding: 20px 0px;
|
||||
font-family: Microsoft YaHei;">
|
||||
Copyright ©${.now?string("yyyy")} <a hover="color: #DA251D;" style="color: #999;" href="https://github.com/elunez/eladmin" target="_blank">ELADMIN</a> 后台管理系统 All Rights Reserved.
|
||||
Copyright ©${.now?string("yyyy")} <a hover="color: #DA251D;" style="color: #999;" href="https://github.com/elunez/eladmin" target="_blank">ELADMIN</a> Backend Management System All Rights Reserved.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>eladmin-tools</artifactId>
|
||||
<name>工具模块</name>
|
||||
<name>Tools Module</name>
|
||||
|
||||
<properties>
|
||||
<mail.version>1.4.7</mail.version>
|
||||
|
@ -17,28 +17,28 @@
|
|||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- 同时需要common模块和logging模块只需要引入logging模块即可 -->
|
||||
<!-- If you need both the common module and the logging module at the same time, just import the logging module. -->
|
||||
<dependency>
|
||||
<groupId>me.zhengjie</groupId>
|
||||
<artifactId>eladmin-logging</artifactId>
|
||||
<version>2.7</version>
|
||||
</dependency>
|
||||
|
||||
<!--邮件依赖-->
|
||||
<!-- Email dependency -->
|
||||
<dependency>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>mail</artifactId>
|
||||
<version>${mail.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--七牛云存储-->
|
||||
<!-- Qiniu Cloud Storage -->
|
||||
<dependency>
|
||||
<groupId>com.qiniu</groupId>
|
||||
<artifactId>qiniu-java-sdk</artifactId>
|
||||
<version>${qiniu.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--支付宝依赖-->
|
||||
<!-- Alipay dependency -->
|
||||
<dependency>
|
||||
<groupId>com.alipay.sdk</groupId>
|
||||
<artifactId>alipay-sdk-java</artifactId>
|
||||
|
|
|
@ -22,7 +22,7 @@ import javax.validation.constraints.NotBlank;
|
|||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 支付宝配置类
|
||||
* Alipay configuration class
|
||||
* @author Zheng Jie
|
||||
* @date 2018-12-31
|
||||
*/
|
||||
|
@ -37,40 +37,40 @@ public class AlipayConfig implements Serializable {
|
|||
private Long id;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "应用ID")
|
||||
@ApiModelProperty(value = "App ID")
|
||||
private String appId;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "商户私钥")
|
||||
@ApiModelProperty(value = "Merchant Private Key")
|
||||
private String privateKey;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "支付宝公钥")
|
||||
@ApiModelProperty(value = "Alipay Public Key")
|
||||
private String publicKey;
|
||||
|
||||
@ApiModelProperty(value = "签名方式")
|
||||
@ApiModelProperty(value = "Signature Method")
|
||||
private String signType="RSA2";
|
||||
|
||||
@Column(name = "gateway_url")
|
||||
@ApiModelProperty(value = "支付宝开放安全地址", hidden = true)
|
||||
@ApiModelProperty(value = "Alipay Open Security Address", hidden = true)
|
||||
private String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
|
||||
|
||||
@ApiModelProperty(value = "编码", hidden = true)
|
||||
@ApiModelProperty(value = "Encoding", hidden = true)
|
||||
private String charset= "utf-8";
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "异步通知地址")
|
||||
@ApiModelProperty(value = "Asynchronous notification address")
|
||||
private String notifyUrl;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "订单完成后返回的页面")
|
||||
@ApiModelProperty(value = "Page returned after order completion")
|
||||
private String returnUrl;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
@ApiModelProperty(value = "Type")
|
||||
private String format="JSON";
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "商户号")
|
||||
@ApiModelProperty(value = "Merchant number")
|
||||
private String sysServiceProviderId;
|
||||
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import javax.validation.constraints.NotBlank;
|
|||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 邮件配置类,数据存覆盖式存入数据存
|
||||
* Email configuration class, data is stored in an overwrite manner
|
||||
* @author Zheng Jie
|
||||
* @date 2018-12-26
|
||||
*/
|
||||
|
@ -37,22 +37,22 @@ public class EmailConfig implements Serializable {
|
|||
private Long id;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "邮件服务器SMTP地址")
|
||||
@ApiModelProperty(value = "Email server SMTP address")
|
||||
private String host;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "邮件服务器 SMTP 端口")
|
||||
@ApiModelProperty(value = "Email server SMTP port")
|
||||
private String port;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "发件者用户名")
|
||||
@ApiModelProperty(value = "Sender username")
|
||||
private String user;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "密码")
|
||||
@ApiModelProperty(value = "Password")
|
||||
private String pass;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "收件人")
|
||||
@ApiModelProperty(value = "Recipient")
|
||||
private String fromUser;
|
||||
}
|
||||
|
|
|
@ -40,22 +40,22 @@ public class LocalStorage extends BaseEntity implements Serializable {
|
|||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "真实文件名")
|
||||
@ApiModelProperty(value = "Real file name")
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty(value = "文件名")
|
||||
@ApiModelProperty(value = "File name")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "后缀")
|
||||
@ApiModelProperty(value = "Suffix")
|
||||
private String suffix;
|
||||
|
||||
@ApiModelProperty(value = "路径")
|
||||
@ApiModelProperty(value = "Path")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
@ApiModelProperty(value = "Type")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "大小")
|
||||
@ApiModelProperty(value = "Size")
|
||||
private String size;
|
||||
|
||||
public LocalStorage(String realName,String name, String suffix, String path, String type, String size) {
|
||||
|
|
|
@ -22,7 +22,7 @@ import javax.validation.constraints.NotBlank;
|
|||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 七牛云对象存储配置类
|
||||
* Qiniu Cloud Object Storage Configuration Class
|
||||
* @author Zheng Jie
|
||||
* @date 2018-12-31
|
||||
*/
|
||||
|
@ -37,33 +37,33 @@ public class QiniuConfig implements Serializable {
|
|||
private Long id;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "accessKey")
|
||||
@ApiModelProperty(value = "Access Key")
|
||||
private String accessKey;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "secretKey")
|
||||
@ApiModelProperty(value = "Secret Key")
|
||||
private String secretKey;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "存储空间名称作为唯一的 Bucket 识别符")
|
||||
@ApiModelProperty(value = "Storage space name used as the unique Bucket identifier")
|
||||
private String bucket;
|
||||
|
||||
/**
|
||||
* Zone表示与机房的对应关系
|
||||
* 华东 Zone.zone0()
|
||||
* 华北 Zone.zone1()
|
||||
* 华南 Zone.zone2()
|
||||
* 北美 Zone.zoneNa0()
|
||||
* 东南亚 Zone.zoneAs0()
|
||||
* Zone represents the correspondence between data center and region
|
||||
* East China Zone.zone0()
|
||||
* North China Zone.zone1()
|
||||
* South China Zone.zone2()
|
||||
* North America Zone.zoneNa0()
|
||||
* Southeast Asia Zone.zoneAs0()
|
||||
*/
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "Zone表示与机房的对应关系")
|
||||
@ApiModelProperty(value = "Zone represents the correspondence between data center and region")
|
||||
private String zone;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "外链域名,可自定义,需在七牛云绑定")
|
||||
@ApiModelProperty(value = "External domain, customizable, needs to be bound in Qiniu Cloud")
|
||||
private String host;
|
||||
|
||||
@ApiModelProperty(value = "空间类型:公开/私有")
|
||||
private String type = "公开";
|
||||
@ApiModelProperty(value = "Space type: public/private")
|
||||
private String type = "public";
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.io.Serializable;
|
|||
import java.sql.Timestamp;
|
||||
|
||||
/**
|
||||
* 上传成功后,存储结果
|
||||
* Storage result after successful upload
|
||||
* @author Zheng Jie
|
||||
* @date 2018-12-31
|
||||
*/
|
||||
|
@ -39,26 +39,26 @@ public class QiniuContent implements Serializable {
|
|||
private Long id;
|
||||
|
||||
@Column(name = "name")
|
||||
@ApiModelProperty(value = "文件名")
|
||||
@ApiModelProperty(value = "File name")
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty(value = "空间名")
|
||||
@ApiModelProperty(value = "Bucket name")
|
||||
private String bucket;
|
||||
|
||||
@ApiModelProperty(value = "大小")
|
||||
@ApiModelProperty(value = "Size")
|
||||
private String size;
|
||||
|
||||
@ApiModelProperty(value = "文件地址")
|
||||
@ApiModelProperty(value = "File address")
|
||||
private String url;
|
||||
|
||||
@ApiModelProperty(value = "文件类型")
|
||||
@ApiModelProperty(value = "File type")
|
||||
private String suffix;
|
||||
|
||||
@ApiModelProperty(value = "空间类型:公开/私有")
|
||||
private String type = "公开";
|
||||
@ApiModelProperty(value = "Space type: public/private")
|
||||
private String type = "public";
|
||||
|
||||
@UpdateTimestamp
|
||||
@ApiModelProperty(value = "创建或更新时间")
|
||||
@ApiModelProperty(value = "Creation or update time")
|
||||
@Column(name = "update_time")
|
||||
private Timestamp updateTime;
|
||||
}
|
||||
|
|
|
@ -16,22 +16,22 @@
|
|||
package me.zhengjie.domain.enums;
|
||||
|
||||
/**
|
||||
* 支付状态
|
||||
* Payment status
|
||||
* @author zhengjie
|
||||
* @date 2018/08/01 16:45:43
|
||||
*/
|
||||
public enum AliPayStatusEnum {
|
||||
|
||||
/** 交易成功 */
|
||||
/** Transaction successful */
|
||||
FINISHED("TRADE_FINISHED"),
|
||||
|
||||
/** 支付成功 */
|
||||
/** Payment successful */
|
||||
SUCCESS("TRADE_SUCCESS"),
|
||||
|
||||
/** 交易创建 */
|
||||
/** Transaction created */
|
||||
BUYER_PAY("WAIT_BUYER_PAY"),
|
||||
|
||||
/** 交易关闭 */
|
||||
/** Transaction closed */
|
||||
CLOSED("TRADE_CLOSED");
|
||||
|
||||
private final String value;
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.sql.Date;
|
|||
import java.sql.Timestamp;
|
||||
|
||||
/**
|
||||
* 交易详情,按需应该存入数据库,这里存入数据库,仅供临时测试
|
||||
* Transaction details, should be stored in the database as needed. Here it is stored in the database for temporary testing only
|
||||
* @author Zheng Jie
|
||||
* @date 2018-12-31
|
||||
*/
|
||||
|
@ -30,29 +30,29 @@ import java.sql.Timestamp;
|
|||
public class TradeVo {
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "商品描述")
|
||||
@ApiModelProperty(value = "Product description")
|
||||
private String body;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "商品名称")
|
||||
@ApiModelProperty(value = "Product name")
|
||||
private String subject;
|
||||
|
||||
@ApiModelProperty(value = "商户订单号", hidden = true)
|
||||
@ApiModelProperty(value = "Merchant order number", hidden = true)
|
||||
private String outTradeNo;
|
||||
|
||||
@ApiModelProperty(value = "第三方订单号", hidden = true)
|
||||
@ApiModelProperty(value = "Third-party order number", hidden = true)
|
||||
private String tradeNo;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "价格")
|
||||
@ApiModelProperty(value = "Price")
|
||||
private String totalAmount;
|
||||
|
||||
@ApiModelProperty(value = "订单状态,已支付,未支付,作废", hidden = true)
|
||||
@ApiModelProperty(value = "Order status, paid, unpaid, invalid", hidden = true)
|
||||
private String state;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
@ApiModelProperty(value = "Creation time", hidden = true)
|
||||
private Timestamp createTime;
|
||||
|
||||
@ApiModelProperty(value = "作废时间", hidden = true)
|
||||
@ApiModelProperty(value = "Invalid time", hidden = true)
|
||||
private Date cancelTime;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.springframework.data.jpa.repository.Query;
|
|||
public interface QiNiuConfigRepository extends JpaRepository<QiniuConfig,Long> {
|
||||
|
||||
/**
|
||||
* 编辑类型
|
||||
* Edit type
|
||||
* @param type /
|
||||
*/
|
||||
@Modifying
|
||||
|
|
|
@ -26,8 +26,8 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|||
public interface QiniuContentRepository extends JpaRepository<QiniuContent,Long>, JpaSpecificationExecutor<QiniuContent> {
|
||||
|
||||
/**
|
||||
* 根据key查询
|
||||
* @param key 文件名
|
||||
* Query by key
|
||||
* @param key file name
|
||||
* @return QiniuContent
|
||||
*/
|
||||
QiniuContent findByKey(String key);
|
||||
|
|
|
@ -46,7 +46,7 @@ import java.util.Map;
|
|||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/aliPay")
|
||||
@Api(tags = "工具:支付宝管理")
|
||||
@Api(tags = "Tools: Alipay Management")
|
||||
public class AliPayController {
|
||||
|
||||
private final AlipayUtils alipayUtils;
|
||||
|
@ -57,16 +57,16 @@ public class AliPayController {
|
|||
return new ResponseEntity<>(alipayService.find(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("配置支付宝")
|
||||
@ApiOperation("配置支付宝")
|
||||
@Log("Configure Alipay")
|
||||
@ApiOperation("Configure Alipay")
|
||||
@PutMapping
|
||||
public ResponseEntity<Object> updateAliPayConfig(@Validated @RequestBody AlipayConfig alipayConfig) {
|
||||
alipayService.config(alipayConfig);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("支付宝PC网页支付")
|
||||
@ApiOperation("PC网页支付")
|
||||
@Log("Alipay PC Web Payment")
|
||||
@ApiOperation("PC Web Payment")
|
||||
@PostMapping(value = "/toPayAsPC")
|
||||
public ResponseEntity<String> toPayAsPc(@Validated @RequestBody TradeVo trade) throws Exception {
|
||||
AlipayConfig aliPay = alipayService.find();
|
||||
|
@ -75,8 +75,8 @@ public class AliPayController {
|
|||
return ResponseEntity.ok(payUrl);
|
||||
}
|
||||
|
||||
@Log("支付宝手机网页支付")
|
||||
@ApiOperation("手机网页支付")
|
||||
@Log("Alipay Mobile Web Payment")
|
||||
@ApiOperation("Mobile Web Payment")
|
||||
@PostMapping(value = "/toPayAsWeb")
|
||||
public ResponseEntity<String> toPayAsWeb(@Validated @RequestBody TradeVo trade) throws Exception {
|
||||
AlipayConfig alipay = alipayService.find();
|
||||
|
@ -87,22 +87,22 @@ public class AliPayController {
|
|||
|
||||
@ApiIgnore
|
||||
@AnonymousGetMapping("/return")
|
||||
@ApiOperation("支付之后跳转的链接")
|
||||
@ApiOperation("Redirect link after payment")
|
||||
public ResponseEntity<String> returnPage(HttpServletRequest request, HttpServletResponse response) {
|
||||
AlipayConfig alipay = alipayService.find();
|
||||
response.setContentType("text/html;charset=" + alipay.getCharset());
|
||||
//内容验签,防止黑客篡改参数
|
||||
// Content signature verification to prevent hackers from tampering with parameters
|
||||
if (alipayUtils.rsaCheck(request, alipay)) {
|
||||
//商户订单号
|
||||
// Merchant order number
|
||||
String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||
//支付宝交易号
|
||||
// Alipay transaction number
|
||||
String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||
System.out.println("商户订单号" + outTradeNo + " " + "第三方交易号" + tradeNo);
|
||||
System.out.println("Merchant order number" + outTradeNo + " " + "Third-party transaction number" + tradeNo);
|
||||
|
||||
// 根据业务需要返回数据,这里统一返回OK
|
||||
// Return data as needed by business, here always return OK
|
||||
return new ResponseEntity<>("payment successful", HttpStatus.OK);
|
||||
} else {
|
||||
// 根据业务需要返回数据
|
||||
// Return data as needed by business
|
||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
|
@ -110,23 +110,23 @@ public class AliPayController {
|
|||
@ApiIgnore
|
||||
@RequestMapping("/notify")
|
||||
@AnonymousAccess
|
||||
@ApiOperation("支付异步通知(要公网访问),接收异步通知,检查通知内容app_id、out_trade_no、total_amount是否与请求中的一致,根据trade_status进行后续业务处理")
|
||||
@ApiOperation("Alipay async notification (requires public network access), receive async notification, check if app_id, out_trade_no, and total_amount in the notification match the request, handle business logic according to trade_status")
|
||||
public ResponseEntity<Object> notify(HttpServletRequest request) {
|
||||
AlipayConfig alipay = alipayService.find();
|
||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||
//内容验签,防止黑客篡改参数
|
||||
// Content signature verification to prevent hackers from tampering with parameters
|
||||
if (alipayUtils.rsaCheck(request, alipay)) {
|
||||
//交易状态
|
||||
// Transaction status
|
||||
String tradeStatus = new String(request.getParameter("trade_status").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||
// 商户订单号
|
||||
// Merchant order number
|
||||
String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||
//支付宝交易号
|
||||
// Alipay transaction number
|
||||
String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||
//付款金额
|
||||
// Payment amount
|
||||
String totalAmount = new String(request.getParameter("total_amount").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||
//验证
|
||||
// Verification
|
||||
if (tradeStatus.equals(AliPayStatusEnum.SUCCESS.getValue()) || tradeStatus.equals(AliPayStatusEnum.FINISHED.getValue())) {
|
||||
// 验证通过后应该根据业务需要处理订单
|
||||
// After verification, handle order as needed by business
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
|
|
@ -28,14 +28,14 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 发送邮件
|
||||
* @author 郑杰
|
||||
* Send Email
|
||||
* @author Zheng Jie
|
||||
* @date 2018/09/28 6:55:53
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("api/email")
|
||||
@Api(tags = "工具:邮件管理")
|
||||
@Api(tags = "Tools: Email Management")
|
||||
public class EmailController {
|
||||
|
||||
private final EmailService emailService;
|
||||
|
@ -45,17 +45,17 @@ public class EmailController {
|
|||
return new ResponseEntity<>(emailService.find(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("配置邮件")
|
||||
@Log("Configure email")
|
||||
@PutMapping
|
||||
@ApiOperation("配置邮件")
|
||||
@ApiOperation("Configure email")
|
||||
public ResponseEntity<Object> updateEmailConfig(@Validated @RequestBody EmailConfig emailConfig) throws Exception {
|
||||
emailService.config(emailConfig,emailService.find());
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("发送邮件")
|
||||
@Log("Send email")
|
||||
@PostMapping
|
||||
@ApiOperation("发送邮件")
|
||||
@ApiOperation("Send email")
|
||||
public ResponseEntity<Object> sendEmail(@Validated @RequestBody EmailVo emailVo){
|
||||
emailService.send(emailVo,emailService.find());
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
|
|
|
@ -41,20 +41,20 @@ import java.io.IOException;
|
|||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "工具:本地存储管理")
|
||||
@Api(tags = "Tools: Local Storage Management")
|
||||
@RequestMapping("/api/localStorage")
|
||||
public class LocalStorageController {
|
||||
|
||||
private final LocalStorageService localStorageService;
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询文件")
|
||||
@ApiOperation("Query files")
|
||||
@PreAuthorize("@el.check('storage:list')")
|
||||
public ResponseEntity<PageResult<LocalStorageDto>> queryFile(LocalStorageQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(localStorageService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@ApiOperation("Export data")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('storage:list')")
|
||||
public void exportFile(HttpServletResponse response, LocalStorageQueryCriteria criteria) throws IOException {
|
||||
|
@ -62,37 +62,37 @@ public class LocalStorageController {
|
|||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("上传文件")
|
||||
@ApiOperation("Upload file")
|
||||
@PreAuthorize("@el.check('storage:add')")
|
||||
public ResponseEntity<Object> createFile(@RequestParam String name, @RequestParam("file") MultipartFile file){
|
||||
localStorageService.create(name, file);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@ApiOperation("上传图片")
|
||||
@ApiOperation("Upload image")
|
||||
@PostMapping("/pictures")
|
||||
public ResponseEntity<LocalStorage> uploadPicture(@RequestParam MultipartFile file){
|
||||
// 判断文件是否为图片
|
||||
// Determine whether the file is an image
|
||||
String suffix = FileUtil.getExtensionName(file.getOriginalFilename());
|
||||
if(!FileUtil.IMAGE.equals(FileUtil.getFileType(suffix))){
|
||||
throw new BadRequestException("只能上传图片");
|
||||
throw new BadRequestException("Only images can be uploaded");
|
||||
}
|
||||
LocalStorage localStorage = localStorageService.create(null, file);
|
||||
return new ResponseEntity<>(localStorage, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改文件")
|
||||
@ApiOperation("修改文件")
|
||||
@Log("Update file")
|
||||
@ApiOperation("Update file")
|
||||
@PreAuthorize("@el.check('storage:edit')")
|
||||
public ResponseEntity<Object> updateFile(@Validated @RequestBody LocalStorage resources){
|
||||
localStorageService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除文件")
|
||||
@Log("Delete file")
|
||||
@DeleteMapping
|
||||
@ApiOperation("多选删除")
|
||||
@ApiOperation("Batch delete")
|
||||
public ResponseEntity<Object> deleteFile(@RequestBody Long[] ids) {
|
||||
localStorageService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
|
|
|
@ -37,15 +37,15 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 发送邮件
|
||||
* @author 郑杰
|
||||
* Send Email
|
||||
* @author Zheng Jie
|
||||
* @date 2018/09/28 6:55:53
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/qiNiuContent")
|
||||
@Api(tags = "工具:七牛云存储管理")
|
||||
@Api(tags = "Tools: Qiniu Cloud Storage Management")
|
||||
public class QiniuController {
|
||||
|
||||
private final QiNiuService qiNiuService;
|
||||
|
@ -55,8 +55,8 @@ public class QiniuController {
|
|||
return new ResponseEntity<>(qiNiuService.find(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("配置七牛云存储")
|
||||
@ApiOperation("配置七牛云存储")
|
||||
@Log("Configure Qiniu Cloud Storage")
|
||||
@ApiOperation("Configure Qiniu Cloud Storage")
|
||||
@PutMapping(value = "/config")
|
||||
public ResponseEntity<Object> updateQiNiuConfig(@Validated @RequestBody QiniuConfig qiniuConfig){
|
||||
qiNiuService.config(qiniuConfig);
|
||||
|
@ -64,19 +64,19 @@ public class QiniuController {
|
|||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@ApiOperation("Export Data")
|
||||
@GetMapping(value = "/download")
|
||||
public void exportQiNiu(HttpServletResponse response, QiniuQueryCriteria criteria) throws IOException {
|
||||
qiNiuService.downloadList(qiNiuService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@ApiOperation("查询文件")
|
||||
@ApiOperation("Query File")
|
||||
@GetMapping
|
||||
public ResponseEntity<PageResult<QiniuContent>> queryQiNiu(QiniuQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(qiNiuService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("上传文件")
|
||||
@ApiOperation("Upload File")
|
||||
@PostMapping
|
||||
public ResponseEntity<Object> uploadQiNiu(@RequestParam MultipartFile file){
|
||||
QiniuContent qiniuContent = qiNiuService.upload(file,qiNiuService.find());
|
||||
|
@ -87,16 +87,16 @@ public class QiniuController {
|
|||
return new ResponseEntity<>(map,HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("同步七牛云数据")
|
||||
@ApiOperation("同步七牛云数据")
|
||||
@Log("Synchronize Qiniu Cloud Data")
|
||||
@ApiOperation("Synchronize Qiniu Cloud Data")
|
||||
@PostMapping(value = "/synchronize")
|
||||
public ResponseEntity<Object> synchronizeQiNiu(){
|
||||
qiNiuService.synchronize(qiNiuService.find());
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("下载文件")
|
||||
@ApiOperation("下载文件")
|
||||
@Log("Download File")
|
||||
@ApiOperation("Download File")
|
||||
@GetMapping(value = "/download/{id}")
|
||||
public ResponseEntity<Object> downloadQiNiu(@PathVariable Long id){
|
||||
Map<String,Object> map = new HashMap<>(1);
|
||||
|
@ -104,16 +104,16 @@ public class QiniuController {
|
|||
return new ResponseEntity<>(map,HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("删除文件")
|
||||
@ApiOperation("删除文件")
|
||||
@Log("Delete File")
|
||||
@ApiOperation("Delete File")
|
||||
@DeleteMapping(value = "/{id}")
|
||||
public ResponseEntity<Object> deleteQiNiu(@PathVariable Long id){
|
||||
qiNiuService.delete(qiNiuService.findByContentId(id),qiNiuService.find());
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("删除多张图片")
|
||||
@ApiOperation("删除多张图片")
|
||||
@Log("Delete Multiple Images")
|
||||
@ApiOperation("Delete Multiple Images")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> deleteAllQiNiu(@RequestBody Long[] ids) {
|
||||
qiNiuService.deleteAll(ids, qiNiuService.find());
|
||||
|
|
|
@ -25,33 +25,33 @@ import me.zhengjie.domain.AlipayConfig;
|
|||
public interface AliPayService {
|
||||
|
||||
/**
|
||||
* 查询配置
|
||||
* Query configuration
|
||||
* @return AlipayConfig
|
||||
*/
|
||||
AlipayConfig find();
|
||||
|
||||
/**
|
||||
* 更新配置
|
||||
* @param alipayConfig 支付宝配置
|
||||
* Update configuration
|
||||
* @param alipayConfig Alipay configuration
|
||||
* @return AlipayConfig
|
||||
*/
|
||||
AlipayConfig config(AlipayConfig alipayConfig);
|
||||
|
||||
/**
|
||||
* 处理来自PC的交易请求
|
||||
* @param alipay 支付宝配置
|
||||
* @param trade 交易详情
|
||||
* Handle transaction requests from PC
|
||||
* @param alipay Alipay configuration
|
||||
* @param trade transaction details
|
||||
* @return String
|
||||
* @throws Exception 异常
|
||||
* @throws Exception exception
|
||||
*/
|
||||
String toPayAsPc(AlipayConfig alipay, TradeVo trade) throws Exception;
|
||||
|
||||
/**
|
||||
* 处理来自手机网页的交易请求
|
||||
* @param alipay 支付宝配置
|
||||
* @param trade 交易详情
|
||||
* Handle transaction requests from mobile web
|
||||
* @param alipay Alipay configuration
|
||||
* @param trade transaction details
|
||||
* @return String
|
||||
* @throws Exception 异常
|
||||
* @throws Exception exception
|
||||
*/
|
||||
String toPayAsWeb(AlipayConfig alipay, TradeVo trade) throws Exception;
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ import me.zhengjie.domain.EmailConfig;
|
|||
public interface EmailService {
|
||||
|
||||
/**
|
||||
* 更新邮件配置
|
||||
* @param emailConfig 邮箱配置
|
||||
* Update email configuration
|
||||
* @param emailConfig email configuration
|
||||
* @param old /
|
||||
* @return /
|
||||
* @throws Exception /
|
||||
|
@ -34,15 +34,15 @@ public interface EmailService {
|
|||
EmailConfig config(EmailConfig emailConfig, EmailConfig old) throws Exception;
|
||||
|
||||
/**
|
||||
* 查询配置
|
||||
* @return EmailConfig 邮件配置
|
||||
* Query configuration
|
||||
* @return EmailConfig email configuration
|
||||
*/
|
||||
EmailConfig find();
|
||||
|
||||
/**
|
||||
* 发送邮件
|
||||
* @param emailVo 邮件发送的内容
|
||||
* @param emailConfig 邮件配置
|
||||
* Send email
|
||||
* @param emailVo email content
|
||||
* @param emailConfig email configuration
|
||||
*/
|
||||
void send(EmailVo emailVo, EmailConfig emailConfig);
|
||||
}
|
||||
|
|
|
@ -32,50 +32,50 @@ import java.util.List;
|
|||
public interface LocalStorageService {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* Paginated query
|
||||
* @param criteria criteria
|
||||
* @param pageable pagination parameters
|
||||
* @return /
|
||||
*/
|
||||
PageResult<LocalStorageDto> queryAll(LocalStorageQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询全部数据
|
||||
* @param criteria 条件
|
||||
* Query all data
|
||||
* @param criteria criteria
|
||||
* @return /
|
||||
*/
|
||||
List<LocalStorageDto> queryAll(LocalStorageQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* Query by ID
|
||||
* @param id /
|
||||
* @return /
|
||||
*/
|
||||
LocalStorageDto findById(Long id);
|
||||
|
||||
/**
|
||||
* 上传
|
||||
* @param name 文件名称
|
||||
* @param file 文件
|
||||
* Upload
|
||||
* @param name file name
|
||||
* @param file file
|
||||
* @return /
|
||||
*/
|
||||
LocalStorage create(String name, MultipartFile file);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param resources 文件信息
|
||||
* Edit
|
||||
* @param resources file information
|
||||
*/
|
||||
void update(LocalStorage resources);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* Multi-select delete
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* @param localStorageDtos 待导出的数据
|
||||
* Export data
|
||||
* @param localStorageDtos data to be exported
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
|
|
|
@ -33,84 +33,84 @@ import java.util.List;
|
|||
public interface QiNiuService {
|
||||
|
||||
/**
|
||||
* 查配置
|
||||
* Query configuration
|
||||
* @return QiniuConfig
|
||||
*/
|
||||
QiniuConfig find();
|
||||
|
||||
/**
|
||||
* 修改配置
|
||||
* @param qiniuConfig 配置
|
||||
* Update configuration
|
||||
* @param qiniuConfig configuration
|
||||
* @return QiniuConfig
|
||||
*/
|
||||
QiniuConfig config(QiniuConfig qiniuConfig);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* Paginated query
|
||||
* @param criteria criteria
|
||||
* @param pageable pagination parameters
|
||||
* @return /
|
||||
*/
|
||||
PageResult<QiniuContent> queryAll(QiniuQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
* @param criteria 条件
|
||||
* Query all
|
||||
* @param criteria criteria
|
||||
* @return /
|
||||
*/
|
||||
List<QiniuContent> queryAll(QiniuQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
* @param file 文件
|
||||
* @param qiniuConfig 配置
|
||||
* Upload file
|
||||
* @param file file
|
||||
* @param qiniuConfig configuration
|
||||
* @return QiniuContent
|
||||
*/
|
||||
QiniuContent upload(MultipartFile file, QiniuConfig qiniuConfig);
|
||||
|
||||
/**
|
||||
* 查询文件
|
||||
* @param id 文件ID
|
||||
* Query file
|
||||
* @param id file ID
|
||||
* @return QiniuContent
|
||||
*/
|
||||
QiniuContent findByContentId(Long id);
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
* @param content 文件信息
|
||||
* @param config 配置
|
||||
* Download file
|
||||
* @param content file information
|
||||
* @param config configuration
|
||||
* @return String
|
||||
*/
|
||||
String download(QiniuContent content, QiniuConfig config);
|
||||
|
||||
/**
|
||||
* 删除文件
|
||||
* @param content 文件
|
||||
* @param config 配置
|
||||
* Delete file
|
||||
* @param content file
|
||||
* @param config configuration
|
||||
*/
|
||||
void delete(QiniuContent content, QiniuConfig config);
|
||||
|
||||
/**
|
||||
* 同步数据
|
||||
* @param config 配置
|
||||
* Sync data
|
||||
* @param config configuration
|
||||
*/
|
||||
void synchronize(QiniuConfig config);
|
||||
|
||||
/**
|
||||
* 删除文件
|
||||
* @param ids 文件ID数组
|
||||
* @param config 配置
|
||||
* Delete file
|
||||
* @param ids file ID array
|
||||
* @param config configuration
|
||||
*/
|
||||
void deleteAll(Long[] ids, QiniuConfig config);
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
* @param type 类型
|
||||
* Update data
|
||||
* @param type type
|
||||
*/
|
||||
void update(String type);
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* Export data
|
||||
* @param queryAll /
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
|
|
|
@ -32,18 +32,18 @@ public class LocalStorageDto extends BaseDTO implements Serializable {
|
|||
@ApiModelProperty(value = "ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "真实文件名")
|
||||
@ApiModelProperty(value = "Real file name")
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty(value = "文件名")
|
||||
@ApiModelProperty(value = "File name")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "后缀")
|
||||
@ApiModelProperty(value = "Suffix")
|
||||
private String suffix;
|
||||
|
||||
@ApiModelProperty(value = "文件类型")
|
||||
@ApiModelProperty(value = "File type")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "文件大小")
|
||||
@ApiModelProperty(value = "File size")
|
||||
private String size;
|
||||
}
|
|
@ -29,11 +29,11 @@ import me.zhengjie.annotation.Query;
|
|||
@Data
|
||||
public class LocalStorageQueryCriteria{
|
||||
|
||||
@ApiModelProperty(value = "模糊查询")
|
||||
@ApiModelProperty(value = "Fuzzy search")
|
||||
@Query(blurry = "name,suffix,type,createBy,size")
|
||||
private String blurry;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@ApiModelProperty(value = "Creation time")
|
||||
@Query(type = Query.Type.BETWEEN)
|
||||
private List<Timestamp> createTime;
|
||||
}
|
|
@ -29,11 +29,11 @@ import java.util.List;
|
|||
@Data
|
||||
public class QiniuQueryCriteria{
|
||||
|
||||
@ApiModelProperty(value = "名称查询")
|
||||
@ApiModelProperty(value = "Name search")
|
||||
@Query(type = Query.Type.INNER_LIKE)
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@ApiModelProperty(value = "Creation time")
|
||||
@Query(type = Query.Type.BETWEEN)
|
||||
private List<Timestamp> createTime;
|
||||
}
|
||||
|
|
|
@ -62,17 +62,16 @@ public class AliPayServiceImpl implements AliPayService {
|
|||
public String toPayAsPc(AlipayConfig alipay, TradeVo trade) throws Exception {
|
||||
|
||||
if(alipay.getId() == null){
|
||||
throw new BadRequestException("请先添加相应配置,再操作");
|
||||
throw new BadRequestException("Please add the corresponding configuration first, then operate");
|
||||
}
|
||||
AlipayClient alipayClient = new DefaultAlipayClient(alipay.getGatewayUrl(), alipay.getAppId(), alipay.getPrivateKey(), alipay.getFormat(), alipay.getCharset(), alipay.getPublicKey(), alipay.getSignType());
|
||||
|
||||
// 创建API对应的request(电脑网页版)
|
||||
// Create API request (desktop web version)
|
||||
AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
|
||||
|
||||
// 订单完成后返回的页面和异步通知地址
|
||||
// Return page and asynchronous notification address after order completion
|
||||
request.setReturnUrl(alipay.getReturnUrl());
|
||||
request.setNotifyUrl(alipay.getNotifyUrl());
|
||||
// 填充订单参数
|
||||
// Fill order parameters
|
||||
request.setBizContent("{" +
|
||||
" \"out_trade_no\":\""+trade.getOutTradeNo()+"\"," +
|
||||
" \"product_code\":\"FAST_INSTANT_TRADE_PAY\"," +
|
||||
|
@ -82,25 +81,24 @@ public class AliPayServiceImpl implements AliPayService {
|
|||
" \"extend_params\":{" +
|
||||
" \"sys_service_provider_id\":\""+alipay.getSysServiceProviderId()+"\"" +
|
||||
" }"+
|
||||
" }");//填充业务参数
|
||||
// 调用SDK生成表单, 通过GET方式,口可以获取url
|
||||
" }");//Fill business parameters
|
||||
// Call SDK to generate form, can get URL through GET method
|
||||
return alipayClient.pageExecute(request, "GET").getBody();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toPayAsWeb(AlipayConfig alipay, TradeVo trade) throws Exception {
|
||||
if(alipay.getId() == null){
|
||||
throw new BadRequestException("请先添加相应配置,再操作");
|
||||
throw new BadRequestException("Please add the corresponding configuration first, then operate");
|
||||
}
|
||||
AlipayClient alipayClient = new DefaultAlipayClient(alipay.getGatewayUrl(), alipay.getAppId(), alipay.getPrivateKey(), alipay.getFormat(), alipay.getCharset(), alipay.getPublicKey(), alipay.getSignType());
|
||||
|
||||
double money = Double.parseDouble(trade.getTotalAmount());
|
||||
double maxMoney = 5000;
|
||||
if(money <= 0 || money >= maxMoney){
|
||||
throw new BadRequestException("测试金额过大");
|
||||
throw new BadRequestException("Test amount too large");
|
||||
}
|
||||
// 创建API对应的request(手机网页版)
|
||||
// Create API request (mobile web version)
|
||||
AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest();
|
||||
request.setReturnUrl(alipay.getReturnUrl());
|
||||
request.setNotifyUrl(alipay.getNotifyUrl());
|
||||
|
|
|
@ -77,7 +77,7 @@ public class LocalStorageServiceImpl implements LocalStorageService {
|
|||
String type = FileUtil.getFileType(suffix);
|
||||
File file = FileUtil.upload(multipartFile, properties.getPath().getPath() + type + File.separator);
|
||||
if(ObjectUtil.isNull(file)){
|
||||
throw new BadRequestException("上传失败");
|
||||
throw new BadRequestException("Upload failed");
|
||||
}
|
||||
try {
|
||||
name = StringUtils.isBlank(name) ? FileUtil.getFileNameNoEx(multipartFile.getOriginalFilename()) : name;
|
||||
|
@ -120,12 +120,12 @@ public class LocalStorageServiceImpl implements LocalStorageService {
|
|||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (LocalStorageDto localStorageDTO : queryAll) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("文件名", localStorageDTO.getRealName());
|
||||
map.put("备注名", localStorageDTO.getName());
|
||||
map.put("文件类型", localStorageDTO.getType());
|
||||
map.put("文件大小", localStorageDTO.getSize());
|
||||
map.put("创建者", localStorageDTO.getCreateBy());
|
||||
map.put("创建日期", localStorageDTO.getCreateTime());
|
||||
map.put("File name", localStorageDTO.getRealName());
|
||||
map.put("Remark name", localStorageDTO.getName());
|
||||
map.put("File type", localStorageDTO.getType());
|
||||
map.put("File size", localStorageDTO.getSize());
|
||||
map.put("Creator", localStorageDTO.getCreateBy());
|
||||
map.put("Creation date", localStorageDTO.getCreateTime());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
|
|
|
@ -74,7 +74,7 @@ public class QiNiuServiceImpl implements QiNiuService {
|
|||
qiniuConfig.setId(1L);
|
||||
String http = "http://", https = "https://";
|
||||
if (!(qiniuConfig.getHost().toLowerCase().startsWith(http)||qiniuConfig.getHost().toLowerCase().startsWith(https))) {
|
||||
throw new BadRequestException("外链域名必须以http://或者https://开头");
|
||||
throw new BadRequestException("External link domain must start with http:// or https://");
|
||||
}
|
||||
return qiNiuConfigRepository.save(qiniuConfig);
|
||||
}
|
||||
|
@ -94,9 +94,9 @@ public class QiNiuServiceImpl implements QiNiuService {
|
|||
public QiniuContent upload(MultipartFile file, QiniuConfig qiniuConfig) {
|
||||
FileUtil.checkSize(maxSize, file.getSize());
|
||||
if(qiniuConfig.getId() == null){
|
||||
throw new BadRequestException("请先添加相应配置,再操作");
|
||||
throw new BadRequestException("Please add the corresponding configuration first, then operate");
|
||||
}
|
||||
// 构造一个带指定Zone对象的配置类
|
||||
// Construct a configuration class with the specified Zone object
|
||||
Configuration cfg = new Configuration(QiNiuUtil.getRegion(qiniuConfig.getZone()));
|
||||
UploadManager uploadManager = new UploadManager(cfg);
|
||||
Auth auth = Auth.create(qiniuConfig.getAccessKey(), qiniuConfig.getSecretKey());
|
||||
|
@ -107,12 +107,11 @@ public class QiNiuServiceImpl implements QiNiuService {
|
|||
key = QiNiuUtil.getKey(key);
|
||||
}
|
||||
Response response = uploadManager.put(file.getBytes(), key, upToken);
|
||||
//解析上传成功的结果
|
||||
|
||||
// Parse the result of successful upload
|
||||
DefaultPutRet putRet = JSON.parseObject(response.bodyString(), DefaultPutRet.class);
|
||||
QiniuContent content = qiniuContentRepository.findByKey(FileUtil.getFileNameNoEx(putRet.key));
|
||||
if(content == null){
|
||||
//存入数据库
|
||||
// Store in database
|
||||
QiniuContent qiniuContent = new QiniuContent();
|
||||
qiniuContent.setSuffix(FileUtil.getExtensionName(putRet.key));
|
||||
qiniuContent.setBucket(qiniuConfig.getBucket());
|
||||
|
@ -138,12 +137,12 @@ public class QiNiuServiceImpl implements QiNiuService {
|
|||
@Override
|
||||
public String download(QiniuContent content,QiniuConfig config){
|
||||
String finalUrl;
|
||||
String type = "公开";
|
||||
String type = "Public";
|
||||
if(type.equals(content.getType())){
|
||||
finalUrl = content.getUrl();
|
||||
} else {
|
||||
Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey());
|
||||
// 1小时,可以自定义链接过期时间
|
||||
// 1 hour, can customize link expiration time
|
||||
long expireInSeconds = 3600;
|
||||
finalUrl = auth.privateDownloadUrl(content.getUrl(), expireInSeconds);
|
||||
}
|
||||
|
@ -153,7 +152,7 @@ public class QiNiuServiceImpl implements QiNiuService {
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(QiniuContent content, QiniuConfig config) {
|
||||
//构造一个带指定Zone对象的配置类
|
||||
// Construct a configuration class with the specified Zone object
|
||||
Configuration cfg = new Configuration(QiNiuUtil.getRegion(config.getZone()));
|
||||
Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey());
|
||||
BucketManager bucketManager = new BucketManager(auth, cfg);
|
||||
|
@ -169,22 +168,22 @@ public class QiNiuServiceImpl implements QiNiuService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public void synchronize(QiniuConfig config) {
|
||||
if(config.getId() == null){
|
||||
throw new BadRequestException("请先添加相应配置,再操作");
|
||||
throw new BadRequestException("Please add the corresponding configuration first, then operate");
|
||||
}
|
||||
//构造一个带指定Zone对象的配置类
|
||||
// Construct a configuration class with the specified Zone object
|
||||
Configuration cfg = new Configuration(QiNiuUtil.getRegion(config.getZone()));
|
||||
Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey());
|
||||
BucketManager bucketManager = new BucketManager(auth, cfg);
|
||||
//文件名前缀
|
||||
// File name prefix
|
||||
String prefix = "";
|
||||
//每次迭代的长度限制,最大1000,推荐值 1000
|
||||
// Length limit for each iteration, maximum 1000, recommended value 1000
|
||||
int limit = 1000;
|
||||
//指定目录分隔符,列出所有公共前缀(模拟列出目录效果)。缺省值为空字符串
|
||||
// Specify directory separator, list all common prefixes (simulate directory listing effect). Default value is empty string
|
||||
String delimiter = "";
|
||||
//列举空间文件列表
|
||||
// List space file list
|
||||
BucketManager.FileListIterator fileListIterator = bucketManager.createFileListIterator(config.getBucket(), prefix, limit, delimiter);
|
||||
while (fileListIterator.hasNext()) {
|
||||
//处理获取的file list结果
|
||||
// Process the obtained file list result
|
||||
QiniuContent qiniuContent;
|
||||
FileInfo[] items = fileListIterator.next();
|
||||
for (FileInfo item : items) {
|
||||
|
@ -221,12 +220,12 @@ public class QiNiuServiceImpl implements QiNiuService {
|
|||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (QiniuContent content : queryAll) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("文件名", content.getKey());
|
||||
map.put("文件类型", content.getSuffix());
|
||||
map.put("空间名称", content.getBucket());
|
||||
map.put("文件大小", content.getSize());
|
||||
map.put("空间类型", content.getType());
|
||||
map.put("创建日期", content.getUpdateTime());
|
||||
map.put("File name", content.getKey());
|
||||
map.put("File type", content.getSuffix());
|
||||
map.put("Space name", content.getBucket());
|
||||
map.put("File size", content.getSize());
|
||||
map.put("Space type", content.getType());
|
||||
map.put("Creation date", content.getUpdateTime());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 支付宝工具类
|
||||
* Alipay utility class
|
||||
* @author zhengjie
|
||||
* @date 2018/09/30 14:04:35
|
||||
*/
|
||||
|
@ -34,7 +34,7 @@ import java.util.Map;
|
|||
public class AlipayUtils {
|
||||
|
||||
/**
|
||||
* 生成订单号
|
||||
* Generate order number
|
||||
* @return String
|
||||
*/
|
||||
public String getOrderCode() {
|
||||
|
@ -52,14 +52,14 @@ public class AlipayUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* 校验签名
|
||||
* Verify signature
|
||||
* @param request HttpServletRequest
|
||||
* @param alipay 阿里云配置
|
||||
* @param alipay Aliyun config
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean rsaCheck(HttpServletRequest request, AlipayConfig alipay){
|
||||
|
||||
// 获取支付宝POST过来反馈信息
|
||||
// Get feedback information POSTed by Alipay
|
||||
Map<String,String> params = new HashMap<>(1);
|
||||
Map<String, String[]> requestParams = request.getParameterMap();
|
||||
for (Object o : requestParams.keySet()) {
|
||||
|
|
|
@ -20,23 +20,23 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 七牛云存储工具类
|
||||
* Qiniu cloud storage utility class
|
||||
* @author Zheng Jie
|
||||
* @date 2018-12-31
|
||||
*/
|
||||
public class QiNiuUtil {
|
||||
|
||||
private static final String HUAD = "华东";
|
||||
private static final String HUAD = "East China";
|
||||
|
||||
private static final String HUAB = "华北";
|
||||
private static final String HUAB = "North China";
|
||||
|
||||
private static final String HUAN = "华南";
|
||||
private static final String HUAN = "South China";
|
||||
|
||||
private static final String BEIM = "北美";
|
||||
private static final String BEIM = "North America";
|
||||
|
||||
/**
|
||||
* 得到机房的对应关系
|
||||
* @param zone 机房名称
|
||||
* Get the corresponding relationship of the machine room
|
||||
* @param zone machine room name
|
||||
* @return Region
|
||||
*/
|
||||
public static Region getRegion(String zone){
|
||||
|
@ -49,15 +49,15 @@ public class QiNiuUtil {
|
|||
return Region.huanan();
|
||||
} else if (BEIM.equals(zone)){
|
||||
return Region.beimei();
|
||||
// 否则就是东南亚
|
||||
// Otherwise, it is Southeast Asia
|
||||
} else {
|
||||
return Region.qvmHuadong();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认不指定key的情况下,以文件内容的hash值作为文件名
|
||||
* @param file 文件名
|
||||
* By default, if no key is specified, the hash value of the file content is used as the file name
|
||||
* @param file file name
|
||||
* @return String
|
||||
*/
|
||||
public static String getKey(String file){
|
||||
|
|
40
pom.xml
40
pom.xml
|
@ -16,7 +16,7 @@
|
|||
<module>sport</module>
|
||||
</modules>
|
||||
|
||||
<name>ELADMIN 后台管理</name>
|
||||
<name>ELADMIN Admin Backend</name>
|
||||
<url>https://eladmin.vip</url>
|
||||
|
||||
<parent>
|
||||
|
@ -37,7 +37,7 @@
|
|||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--Spring boot 核心-->
|
||||
<!--Spring boot core-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
|
@ -49,12 +49,12 @@
|
|||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--Spring boot Web容器-->
|
||||
<!--Spring boot Web container-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<!-- 去掉Jackson依赖,用fastjson -->
|
||||
<!-- Remove Jackson dependency, use fastjson -->
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-json</artifactId>
|
||||
|
@ -62,20 +62,20 @@
|
|||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!--Spring boot 测试-->
|
||||
<!--Spring boot test-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!--Spring boot 安全框架-->
|
||||
<!--Spring boot security framework-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- spring boot 缓存 -->
|
||||
<!-- spring boot cache -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-cache</artifactId>
|
||||
|
@ -94,7 +94,7 @@
|
|||
<version>3.17.1</version>
|
||||
</dependency>
|
||||
|
||||
<!--spring boot 集成redis所需common-pool2-->
|
||||
<!--spring boot integration with redis requires common-pool2-->
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-pool2 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
|
@ -106,20 +106,20 @@
|
|||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--监控sql日志-->
|
||||
<!--SQL log monitoring-->
|
||||
<dependency>
|
||||
<groupId>p6spy</groupId>
|
||||
<artifactId>p6spy</artifactId>
|
||||
<version>3.9.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger UI 相关 -->
|
||||
<!-- Swagger UI related -->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>3.0.3</version>
|
||||
<exclusions>
|
||||
<!-- 去掉 swagger-annotations 依赖,避免冲突 -->
|
||||
<!-- Remove swagger-annotations dependency to avoid conflicts -->
|
||||
<exclusion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
|
@ -127,14 +127,14 @@
|
|||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- 添加swagger-annotations依赖 -->
|
||||
<!-- Add swagger-annotations dependency -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.5.22</version>
|
||||
</dependency>
|
||||
|
||||
<!--Mysql依赖包-->
|
||||
<!--Mysql dependency package-->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
|
@ -142,28 +142,28 @@
|
|||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- druid数据源驱动 -->
|
||||
<!-- druid data source driver -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- IP地址解析库 -->
|
||||
<!-- IP address parsing library -->
|
||||
<dependency>
|
||||
<groupId>net.dreamlu</groupId>
|
||||
<artifactId>mica-ip2region</artifactId>
|
||||
<version>2.7.18.9</version>
|
||||
</dependency>
|
||||
|
||||
<!--lombok插件-->
|
||||
<!--lombok plugin-->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- excel工具 -->
|
||||
<!-- excel tool -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
|
@ -193,7 +193,7 @@
|
|||
<version>${fastjson2.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Java图形验证码 -->
|
||||
<!-- Java graphical captcha -->
|
||||
<dependency>
|
||||
<groupId>com.github.whvcse</groupId>
|
||||
<artifactId>easy-captcha</artifactId>
|
||||
|
@ -206,7 +206,7 @@
|
|||
<version>1.13.0</version>
|
||||
</dependency>
|
||||
|
||||
<!--mapStruct依赖-->
|
||||
<!--mapStruct dependency-->
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct</artifactId>
|
||||
|
@ -233,7 +233,7 @@
|
|||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- 打包时跳过测试 -->
|
||||
<!-- Skip tests during packaging -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
|
|
|
@ -1,64 +1,64 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<!-- Toolbar -->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<label class="el-form-item-label">名称</label>
|
||||
<el-input v-model="query.name" clearable placeholder="名称" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<label class="el-form-item-label">创建时间</label>
|
||||
<el-input v-model="query.createTime" clearable placeholder="创建时间" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<label class="el-form-item-label">是否启用</label>
|
||||
<el-input v-model="query.enabled" clearable placeholder="是否启用" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<!-- Search -->
|
||||
<label class="el-form-item-label">Name</label>
|
||||
<el-input v-model="query.name" clearable placeholder="Name" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<label class="el-form-item-label">Creation Time</label>
|
||||
<el-input v-model="query.createTime" clearable placeholder="Creation Time" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<label class="el-form-item-label">Enabled</label>
|
||||
<el-input v-model="query.enabled" clearable placeholder="Enabled" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<rrOperation :crud="crud" />
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<!-- If you want to add more buttons to the toolbar, you can use slots. slot = 'left' or 'right' -->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<!-- Form component -->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||
<el-form-item label="id">
|
||||
<el-input v-model="form.id" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-form-item label="Name" prop="name">
|
||||
<el-input v-model="form.name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="描述">
|
||||
<el-form-item label="Description">
|
||||
<el-input v-model="form.description" :rows="3" type="textarea" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-form-item label="Creation Time">
|
||||
<el-date-picker v-model="form.createTime" type="datetime" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间">
|
||||
<el-form-item label="Update Time">
|
||||
<el-date-picker v-model="form.updateTime" type="datetime" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图标">
|
||||
<el-form-item label="Icon">
|
||||
<el-input v-model="form.icon" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排序">
|
||||
<el-form-item label="Sort">
|
||||
<el-input v-model="form.sort" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用">
|
||||
未设置字典,请手动设置 Radio
|
||||
<el-form-item label="Enabled">
|
||||
Dictionary not set, please manually set Radio
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
<el-button type="text" @click="crud.cancelCU">Cancel</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">Confirm</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<!-- Table rendering -->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="id" label="id" />
|
||||
<el-table-column prop="name" label="名称" />
|
||||
<el-table-column prop="description" label="描述" />
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column prop="updateTime" label="更新时间" />
|
||||
<el-table-column prop="icon" label="图标" />
|
||||
<el-table-column prop="sort" label="排序" />
|
||||
<el-table-column prop="enabled" label="是否启用" />
|
||||
<el-table-column v-if="checkPer(['admin','sport:edit','sport:del'])" label="操作" width="150px" align="center">
|
||||
<el-table-column prop="name" label="Name" />
|
||||
<el-table-column prop="description" label="Description" />
|
||||
<el-table-column prop="createTime" label="Creation Time" />
|
||||
<el-table-column prop="updateTime" label="Update Time" />
|
||||
<el-table-column prop="icon" label="Icon" />
|
||||
<el-table-column prop="sort" label="Sort" />
|
||||
<el-table-column prop="enabled" label="Enabled" />
|
||||
<el-table-column v-if="checkPer(['admin','sport:edit','sport:del'])" label="Operation" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
|
@ -67,7 +67,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<!-- Pagination component -->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -87,7 +87,7 @@ export default {
|
|||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: 'sport', url: 'api/sport', idField: 'id', sort: 'id,desc', crudMethod: { ...crudSport }})
|
||||
return CRUD({ title: 'Sport', url: 'api/sport', idField: 'id', sort: 'id,desc', crudMethod: { ...crudSport }})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -98,18 +98,18 @@ export default {
|
|||
},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
||||
{ required: true, message: 'Name cannot be empty', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
queryTypeOptions: [
|
||||
{ key: 'name', display_name: '名称' },
|
||||
{ key: 'createTime', display_name: '创建时间' },
|
||||
{ key: 'enabled', display_name: '是否启用' }
|
||||
{ key: 'name', display_name: 'Name' },
|
||||
{ key: 'createTime', display_name: 'Creation Time' },
|
||||
{ key: 'enabled', display_name: 'Enabled' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
// Hook: executed before getting table data, return false to prevent data from being retrieved
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<name>sport</name>
|
||||
|
||||
<dependencies>
|
||||
<!--工具包-->
|
||||
<!-- Utility package -->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
|
|
|
@ -46,45 +46,45 @@ public class Club implements Serializable {
|
|||
|
||||
@Column(name = "`name`",nullable = false)
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "名称")
|
||||
@ApiModelProperty(value = "Name")
|
||||
private String name;
|
||||
|
||||
@Column(name = "`description`")
|
||||
@ApiModelProperty(value = "描述")
|
||||
@ApiModelProperty(value = "Description")
|
||||
private String description;
|
||||
|
||||
@Column(name = "`create_time`")
|
||||
@CreationTimestamp
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
@ApiModelProperty(value = "Creation time", hidden = true)
|
||||
private Timestamp createTime;
|
||||
|
||||
@Column(name = "`update_time`")
|
||||
@UpdateTimestamp
|
||||
@ApiModelProperty(value = "更新时间", hidden = true)
|
||||
@ApiModelProperty(value = "Update time", hidden = true)
|
||||
private Timestamp updateTime;
|
||||
|
||||
@Column(name = "`icon`")
|
||||
@ApiModelProperty(value = "图标")
|
||||
@ApiModelProperty(value = "Icon")
|
||||
private String icon;
|
||||
|
||||
@Column(name = "`sort`")
|
||||
@ApiModelProperty(value = "排序")
|
||||
@ApiModelProperty(value = "Sort")
|
||||
private Integer sort;
|
||||
|
||||
@Column(name = "`enabled`")
|
||||
@ApiModelProperty(value = "是否启用")
|
||||
@ApiModelProperty(value = "Enabled")
|
||||
private Boolean enabled;
|
||||
|
||||
@Column(name = "`location`")
|
||||
@ApiModelProperty(value = "位置")
|
||||
@ApiModelProperty(value = "Location")
|
||||
private String location;
|
||||
|
||||
@Column(name = "`longitude`")
|
||||
@ApiModelProperty(value = "经度")
|
||||
@ApiModelProperty(value = "Longitude")
|
||||
private Double longitude;
|
||||
|
||||
@Column(name = "`latitude`")
|
||||
@ApiModelProperty(value = "纬度")
|
||||
@ApiModelProperty(value = "Latitude")
|
||||
private Double latitude;
|
||||
|
||||
public void copy(Club source){
|
||||
|
|
|
@ -54,17 +54,17 @@ public class Court implements Serializable {
|
|||
|
||||
@Column(name = "`create_time`")
|
||||
@CreationTimestamp
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
@ApiModelProperty(value = "Creation time", hidden = true)
|
||||
private Timestamp createTime;
|
||||
|
||||
@Column(name = "`update_time`")
|
||||
@UpdateTimestamp
|
||||
@ApiModelProperty(value = "更新时间", hidden = true)
|
||||
@ApiModelProperty(value = "Update time", hidden = true)
|
||||
private Timestamp updateTime;
|
||||
|
||||
@Column(name = "`amount`",nullable = false)
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "数量")
|
||||
@ApiModelProperty(value = "Amount")
|
||||
private Integer amount;
|
||||
|
||||
public void copy(Court source){
|
||||
|
|
|
@ -48,11 +48,11 @@ public class Event implements Serializable {
|
|||
|
||||
@Column(name = "`name`",nullable = false)
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "名称")
|
||||
@ApiModelProperty(value = "Name")
|
||||
private String name;
|
||||
|
||||
@Column(name = "`description`")
|
||||
@ApiModelProperty(value = "描述")
|
||||
@ApiModelProperty(value = "Description")
|
||||
private String description;
|
||||
|
||||
@Column(name = "`format`",nullable = false)
|
||||
|
@ -62,38 +62,38 @@ public class Event implements Serializable {
|
|||
private Format format;
|
||||
|
||||
@Column(name = "`max_player`")
|
||||
@ApiModelProperty(value = "最大人数")
|
||||
@ApiModelProperty(value = "Maximum number of people")
|
||||
private Integer maxPlayer;
|
||||
|
||||
@Column(name = "`location`")
|
||||
@ApiModelProperty(value = "位置")
|
||||
@ApiModelProperty(value = "Location")
|
||||
private String location;
|
||||
|
||||
@Column(name = "`image`")
|
||||
@ApiModelProperty(value = "图片")
|
||||
@ApiModelProperty(value = "Image")
|
||||
private String image;
|
||||
|
||||
@Column(name = "`create_time`")
|
||||
@CreationTimestamp
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
@ApiModelProperty(value = "Creation time", hidden = true)
|
||||
private Timestamp createTime;
|
||||
|
||||
@Column(name = "`update_time`")
|
||||
@UpdateTimestamp
|
||||
@ApiModelProperty(value = "更新时间", hidden = true)
|
||||
@ApiModelProperty(value = "Update time", hidden = true)
|
||||
private Timestamp updateTime;
|
||||
|
||||
@Column(name = "`sort`")
|
||||
@ApiModelProperty(value = "排序")
|
||||
@ApiModelProperty(value = "Sort")
|
||||
private Integer sort;
|
||||
|
||||
@Column(name = "`enabled`")
|
||||
@ApiModelProperty(value = "是否启用")
|
||||
@ApiModelProperty(value = "Enabled")
|
||||
private Boolean enabled;
|
||||
|
||||
@Column(name = "`event_time`",nullable = false)
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "时间")
|
||||
@ApiModelProperty(value = "Time")
|
||||
private Timestamp eventTime;
|
||||
|
||||
@Column(name = "`club_id`",nullable = false)
|
||||
|
|
|
@ -47,37 +47,37 @@ public class Player implements Serializable {
|
|||
|
||||
@Column(name = "`name`",nullable = false)
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "名称")
|
||||
@ApiModelProperty(value = "Name")
|
||||
private String name;
|
||||
|
||||
@Column(name = "`description`")
|
||||
@ApiModelProperty(value = "描述")
|
||||
@ApiModelProperty(value = "Description")
|
||||
private String description;
|
||||
|
||||
@Column(name = "`latitude`")
|
||||
@ApiModelProperty(value = "纬度")
|
||||
@ApiModelProperty(value = "Latitude")
|
||||
private Double latitude;
|
||||
|
||||
@Column(name = "`longitude`")
|
||||
@ApiModelProperty(value = "经度")
|
||||
@ApiModelProperty(value = "Longitude")
|
||||
private Double longitude;
|
||||
|
||||
@Column(name = "`profile_image`")
|
||||
@ApiModelProperty(value = "图片")
|
||||
@ApiModelProperty(value = "Image")
|
||||
private String profileImage;
|
||||
|
||||
@Column(name = "`create_time`")
|
||||
@CreationTimestamp
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
@ApiModelProperty(value = "Creation time", hidden = true)
|
||||
private Timestamp createTime;
|
||||
|
||||
@Column(name = "`update_time`")
|
||||
@UpdateTimestamp
|
||||
@ApiModelProperty(value = "更新时间", hidden = true)
|
||||
@ApiModelProperty(value = "Update time", hidden = true)
|
||||
private Timestamp updateTime;
|
||||
|
||||
@Column(name = "`rate_score`")
|
||||
@ApiModelProperty(value = "评分")
|
||||
@ApiModelProperty(value = "Score")
|
||||
private Double rateScore;
|
||||
|
||||
@Column(name = "`user_id`",nullable = false)
|
||||
|
|
|
@ -47,33 +47,33 @@ public class Sport implements Serializable {
|
|||
|
||||
@Column(name = "`name`",nullable = false)
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "名称")
|
||||
@ApiModelProperty(value = "Name")
|
||||
private String name;
|
||||
|
||||
@Column(name = "`description`")
|
||||
@ApiModelProperty(value = "描述")
|
||||
@ApiModelProperty(value = "Description")
|
||||
private String description;
|
||||
|
||||
@Column(name = "`create_time`")
|
||||
@CreationTimestamp
|
||||
@ApiModelProperty(value = "创建时间", hidden = true)
|
||||
@ApiModelProperty(value = "Creation time", hidden = true)
|
||||
private Timestamp createTime;
|
||||
|
||||
@Column(name = "`update_time`")
|
||||
@UpdateTimestamp
|
||||
@ApiModelProperty(value = "更新时间", hidden = true)
|
||||
@ApiModelProperty(value = "Update time", hidden = true)
|
||||
private Timestamp updateTime;
|
||||
|
||||
@Column(name = "`icon`")
|
||||
@ApiModelProperty(value = "图标")
|
||||
@ApiModelProperty(value = "Icon")
|
||||
private String icon;
|
||||
|
||||
@Column(name = "`sort`")
|
||||
@ApiModelProperty(value = "排序")
|
||||
@ApiModelProperty(value = "Sort")
|
||||
private Integer sort;
|
||||
|
||||
@Column(name = "`enabled`")
|
||||
@ApiModelProperty(value = "是否启用")
|
||||
@ApiModelProperty(value = "Enabled")
|
||||
private Boolean enabled;
|
||||
|
||||
public void copy(Sport source){
|
||||
|
|
|
@ -45,7 +45,7 @@ public class ClubController {
|
|||
|
||||
private final ClubService clubService;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@ApiOperation("Export Data")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('club:list')")
|
||||
public void exportClub(HttpServletResponse response, ClubQueryCriteria criteria) throws IOException {
|
||||
|
@ -53,15 +53,15 @@ public class ClubController {
|
|||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询clubs")
|
||||
@ApiOperation("Query clubs")
|
||||
@PreAuthorize("@el.check('club:list')")
|
||||
public ResponseEntity<PageResult<ClubDto>> queryClub(ClubQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(clubService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增clubs")
|
||||
@ApiOperation("新增clubs")
|
||||
@Log("Add clubs")
|
||||
@ApiOperation("Add clubs")
|
||||
@PreAuthorize("@el.check('club:add')")
|
||||
public ResponseEntity<Object> createClub(@Validated @RequestBody Club resources){
|
||||
clubService.create(resources);
|
||||
|
@ -69,8 +69,8 @@ public class ClubController {
|
|||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改clubs")
|
||||
@ApiOperation("修改clubs")
|
||||
@Log("Edit clubs")
|
||||
@ApiOperation("Edit clubs")
|
||||
@PreAuthorize("@el.check('club:edit')")
|
||||
public ResponseEntity<Object> updateClub(@Validated @RequestBody Club resources){
|
||||
clubService.update(resources);
|
||||
|
@ -78,10 +78,10 @@ public class ClubController {
|
|||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除clubs")
|
||||
@ApiOperation("删除clubs")
|
||||
@Log("Delete clubs")
|
||||
@ApiOperation("Delete clubs")
|
||||
@PreAuthorize("@el.check('club:del')")
|
||||
public ResponseEntity<Object> deleteClub(@ApiParam(value = "传ID数组[]") @RequestBody Long[] ids) {
|
||||
public ResponseEntity<Object> deleteClub(@ApiParam(value = "Pass ID array []") @RequestBody Long[] ids) {
|
||||
clubService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class CourtController {
|
|||
|
||||
private final CourtService courtService;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@ApiOperation("Export Data")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('court:list')")
|
||||
public void exportCourt(HttpServletResponse response, CourtQueryCriteria criteria) throws IOException {
|
||||
|
@ -53,15 +53,15 @@ public class CourtController {
|
|||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询court")
|
||||
@ApiOperation("Query court")
|
||||
@PreAuthorize("@el.check('court:list')")
|
||||
public ResponseEntity<PageResult<CourtDto>> queryCourt(CourtQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(courtService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增court")
|
||||
@ApiOperation("新增court")
|
||||
@Log("Add court")
|
||||
@ApiOperation("Add court")
|
||||
@PreAuthorize("@el.check('court:add')")
|
||||
public ResponseEntity<Object> createCourt(@Validated @RequestBody Court resources){
|
||||
courtService.create(resources);
|
||||
|
@ -69,8 +69,8 @@ public class CourtController {
|
|||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改court")
|
||||
@ApiOperation("修改court")
|
||||
@Log("Modify court")
|
||||
@ApiOperation("Modify court")
|
||||
@PreAuthorize("@el.check('court:edit')")
|
||||
public ResponseEntity<Object> updateCourt(@Validated @RequestBody Court resources){
|
||||
courtService.update(resources);
|
||||
|
@ -78,10 +78,10 @@ public class CourtController {
|
|||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除court")
|
||||
@ApiOperation("删除court")
|
||||
@Log("Delete court")
|
||||
@ApiOperation("Delete court")
|
||||
@PreAuthorize("@el.check('court:del')")
|
||||
public ResponseEntity<Object> deleteCourt(@ApiParam(value = "传ID数组[]") @RequestBody Long[] ids) {
|
||||
public ResponseEntity<Object> deleteCourt(@ApiParam(value = "Pass ID array[]") @RequestBody Long[] ids) {
|
||||
courtService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class EventController {
|
|||
|
||||
private final EventService eventService;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@ApiOperation("Export Data")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('event:list')")
|
||||
public void exportEvent(HttpServletResponse response, EventQueryCriteria criteria) throws IOException {
|
||||
|
@ -53,15 +53,15 @@ public class EventController {
|
|||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询event")
|
||||
@ApiOperation("Query event")
|
||||
@PreAuthorize("@el.check('event:list')")
|
||||
public ResponseEntity<PageResult<EventDto>> queryEvent(EventQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(eventService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增event")
|
||||
@ApiOperation("新增event")
|
||||
@Log("Add event")
|
||||
@ApiOperation("Add event")
|
||||
@PreAuthorize("@el.check('event:add')")
|
||||
public ResponseEntity<Object> createEvent(@Validated @RequestBody Event resources){
|
||||
eventService.create(resources);
|
||||
|
@ -69,8 +69,8 @@ public class EventController {
|
|||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改event")
|
||||
@ApiOperation("修改event")
|
||||
@Log("Modify event")
|
||||
@ApiOperation("Modify event")
|
||||
@PreAuthorize("@el.check('event:edit')")
|
||||
public ResponseEntity<Object> updateEvent(@Validated @RequestBody Event resources){
|
||||
eventService.update(resources);
|
||||
|
@ -78,10 +78,10 @@ public class EventController {
|
|||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除event")
|
||||
@ApiOperation("删除event")
|
||||
@Log("Delete event")
|
||||
@ApiOperation("Delete event")
|
||||
@PreAuthorize("@el.check('event:del')")
|
||||
public ResponseEntity<Object> deleteEvent(@ApiParam(value = "传ID数组[]") @RequestBody Long[] ids) {
|
||||
public ResponseEntity<Object> deleteEvent(@ApiParam(value = "Pass ID array[]") @RequestBody Long[] ids) {
|
||||
eventService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class PlayerController {
|
|||
|
||||
private final PlayerService playerService;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@ApiOperation("Export Data")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('player:list')")
|
||||
public void exportPlayer(HttpServletResponse response, PlayerQueryCriteria criteria) throws IOException {
|
||||
|
@ -53,15 +53,15 @@ public class PlayerController {
|
|||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询sport")
|
||||
@ApiOperation("Query sport")
|
||||
@PreAuthorize("@el.check('player:list')")
|
||||
public ResponseEntity<PageResult<PlayerDto>> queryPlayer(PlayerQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(playerService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增sport")
|
||||
@ApiOperation("新增sport")
|
||||
@Log("Add sport")
|
||||
@ApiOperation("Add sport")
|
||||
@PreAuthorize("@el.check('player:add')")
|
||||
public ResponseEntity<Object> createPlayer(@Validated @RequestBody Player resources){
|
||||
playerService.create(resources);
|
||||
|
@ -69,8 +69,8 @@ public class PlayerController {
|
|||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改sport")
|
||||
@ApiOperation("修改sport")
|
||||
@Log("Edit sport")
|
||||
@ApiOperation("Edit sport")
|
||||
@PreAuthorize("@el.check('player:edit')")
|
||||
public ResponseEntity<Object> updatePlayer(@Validated @RequestBody Player resources){
|
||||
playerService.update(resources);
|
||||
|
@ -78,10 +78,10 @@ public class PlayerController {
|
|||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除sport")
|
||||
@ApiOperation("删除sport")
|
||||
@Log("Delete sport")
|
||||
@ApiOperation("Delete sport")
|
||||
@PreAuthorize("@el.check('player:del')")
|
||||
public ResponseEntity<Object> deletePlayer(@ApiParam(value = "传ID数组[]") @RequestBody Long[] ids) {
|
||||
public ResponseEntity<Object> deletePlayer(@ApiParam(value = "Pass ID array []") @RequestBody Long[] ids) {
|
||||
playerService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class SportController {
|
|||
return "pong";
|
||||
}
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@ApiOperation("Export Data")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('sport:list')")
|
||||
public void exportSport(HttpServletResponse response, SportQueryCriteria criteria) throws IOException {
|
||||
|
@ -59,15 +59,15 @@ public class SportController {
|
|||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询sport")
|
||||
@ApiOperation("Query sport")
|
||||
@PreAuthorize("@el.check('sport:list')")
|
||||
public ResponseEntity<PageResult<SportDto>> querySport(SportQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(sportService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增sport")
|
||||
@ApiOperation("新增sport")
|
||||
@Log("Add sport")
|
||||
@ApiOperation("Add sport")
|
||||
@PreAuthorize("@el.check('sport:add')")
|
||||
public ResponseEntity<Object> createSport(@Validated @RequestBody Sport resources){
|
||||
sportService.create(resources);
|
||||
|
@ -75,8 +75,8 @@ public class SportController {
|
|||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改sport")
|
||||
@ApiOperation("修改sport")
|
||||
@Log("Edit sport")
|
||||
@ApiOperation("Edit sport")
|
||||
@PreAuthorize("@el.check('sport:edit')")
|
||||
public ResponseEntity<Object> updateSport(@Validated @RequestBody Sport resources){
|
||||
sportService.update(resources);
|
||||
|
@ -84,10 +84,10 @@ public class SportController {
|
|||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除sport")
|
||||
@ApiOperation("删除sport")
|
||||
@Log("Delete sport")
|
||||
@ApiOperation("Delete sport")
|
||||
@PreAuthorize("@el.check('sport:del')")
|
||||
public ResponseEntity<Object> deleteSport(@ApiParam(value = "传ID数组[]") @RequestBody Long[] ids) {
|
||||
public ResponseEntity<Object> deleteSport(@ApiParam(value = "Pass ID array []") @RequestBody Long[] ids) {
|
||||
sportService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
|
|
@ -27,55 +27,55 @@ import me.zhengjie.utils.PageResult;
|
|||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description 服务接口
|
||||
* @description Service Interface
|
||||
* @author Chanheng
|
||||
* @date 2025-05-18
|
||||
**/
|
||||
public interface ClubService {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* Query data with pagination
|
||||
* @param criteria criteria
|
||||
* @param pageable pagination parameters
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
PageResult<ClubDto> queryAll(ClubQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria 条件参数
|
||||
* Query all data without pagination
|
||||
* @param criteria criteria parameters
|
||||
* @return List<ClubDto>
|
||||
*/
|
||||
List<ClubDto> queryAll(ClubQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* Query by ID
|
||||
* @param id ID
|
||||
* @return ClubDto
|
||||
*/
|
||||
ClubDto findById(Long id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* Create
|
||||
* @param resources /
|
||||
*/
|
||||
void create(Club resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* Edit
|
||||
* @param resources /
|
||||
*/
|
||||
void update(Club resources);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* Multiple selection delete
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* Export data
|
||||
* @param all data to be exported
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
|
|
|
@ -27,55 +27,55 @@ import me.zhengjie.utils.PageResult;
|
|||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description 服务接口
|
||||
* @description Service Interface
|
||||
* @author Chanheng
|
||||
* @date 2025-05-18
|
||||
**/
|
||||
public interface CourtService {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* Query data with pagination
|
||||
* @param criteria criteria
|
||||
* @param pageable pagination parameters
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
PageResult<CourtDto> queryAll(CourtQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria 条件参数
|
||||
* Query all data without pagination
|
||||
* @param criteria criteria parameters
|
||||
* @return List<CourtDto>
|
||||
*/
|
||||
List<CourtDto> queryAll(CourtQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* Query by ID
|
||||
* @param id ID
|
||||
* @return CourtDto
|
||||
*/
|
||||
CourtDto findById(Long id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* Create
|
||||
* @param resources /
|
||||
*/
|
||||
void create(Court resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* Edit
|
||||
* @param resources /
|
||||
*/
|
||||
void update(Court resources);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* Multi-select delete
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* Export data
|
||||
* @param all data to be exported
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
|
|
|
@ -27,55 +27,55 @@ import me.zhengjie.utils.PageResult;
|
|||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description 服务接口
|
||||
* @description Service Interface
|
||||
* @author Chanheng
|
||||
* @date 2025-05-18
|
||||
**/
|
||||
public interface EventService {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* Query data with pagination
|
||||
* @param criteria criteria
|
||||
* @param pageable pagination parameters
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
PageResult<EventDto> queryAll(EventQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria 条件参数
|
||||
* Query all data without pagination
|
||||
* @param criteria criteria parameters
|
||||
* @return List<EventDto>
|
||||
*/
|
||||
List<EventDto> queryAll(EventQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* Query by ID
|
||||
* @param id ID
|
||||
* @return EventDto
|
||||
*/
|
||||
EventDto findById(Long id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* Create
|
||||
* @param resources /
|
||||
*/
|
||||
void create(Event resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* Edit
|
||||
* @param resources /
|
||||
*/
|
||||
void update(Event resources);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* Multi-select delete
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* Export data
|
||||
* @param all data to be exported
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
|
|
|
@ -27,55 +27,55 @@ import me.zhengjie.utils.PageResult;
|
|||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description 服务接口
|
||||
* @description Service Interface
|
||||
* @author Chanheng
|
||||
* @date 2025-05-18
|
||||
**/
|
||||
public interface PlayerService {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* Query data with pagination
|
||||
* @param criteria criteria
|
||||
* @param pageable pagination parameters
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
PageResult<PlayerDto> queryAll(PlayerQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria 条件参数
|
||||
* Query all data without pagination
|
||||
* @param criteria criteria parameters
|
||||
* @return List<PlayerDto>
|
||||
*/
|
||||
List<PlayerDto> queryAll(PlayerQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* Query by ID
|
||||
* @param id ID
|
||||
* @return PlayerDto
|
||||
*/
|
||||
PlayerDto findById(Long id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* Create
|
||||
* @param resources /
|
||||
*/
|
||||
void create(Player resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* Edit
|
||||
* @param resources /
|
||||
*/
|
||||
void update(Player resources);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* Multi-select delete
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* Export data
|
||||
* @param all data to be exported
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
|
|
|
@ -27,55 +27,55 @@ import me.zhengjie.utils.PageResult;
|
|||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description 服务接口
|
||||
* @description Service Interface
|
||||
* @author Chanheng
|
||||
* @date 2025-05-17
|
||||
**/
|
||||
public interface SportService {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* Query data with pagination
|
||||
* @param criteria criteria
|
||||
* @param pageable pagination parameters
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
PageResult<SportDto> queryAll(SportQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria 条件参数
|
||||
* Query all data without pagination
|
||||
* @param criteria criteria parameters
|
||||
* @return List<SportDto>
|
||||
*/
|
||||
List<SportDto> queryAll(SportQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* Query by ID
|
||||
* @param id ID
|
||||
* @return SportDto
|
||||
*/
|
||||
SportDto findById(Long id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* Create
|
||||
* @param resources /
|
||||
*/
|
||||
void create(Sport resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* Edit
|
||||
* @param resources /
|
||||
*/
|
||||
void update(Sport resources);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* Multi-select delete
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* Export data
|
||||
* @param all data to be exported
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
|
|
674
sql/eladmin.sql
674
sql/eladmin.sql
|
@ -23,22 +23,22 @@ SET FOREIGN_KEY_CHECKS = 0;
|
|||
DROP TABLE IF EXISTS `code_column`;
|
||||
CREATE TABLE `code_column` (
|
||||
`column_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`table_name` varchar(180) DEFAULT NULL COMMENT '表名',
|
||||
`column_name` varchar(255) DEFAULT NULL COMMENT '数据库字段名称',
|
||||
`column_type` varchar(255) DEFAULT NULL COMMENT '数据库字段类型',
|
||||
`dict_name` varchar(255) DEFAULT NULL COMMENT '字典名称',
|
||||
`extra` varchar(255) DEFAULT NULL COMMENT '字段额外的参数',
|
||||
`form_show` bit(1) DEFAULT NULL COMMENT '是否表单显示',
|
||||
`form_type` varchar(255) DEFAULT NULL COMMENT '表单类型',
|
||||
`key_type` varchar(255) DEFAULT NULL COMMENT '数据库字段键类型',
|
||||
`list_show` bit(1) DEFAULT NULL COMMENT '是否在列表显示',
|
||||
`not_null` bit(1) DEFAULT NULL COMMENT '是否为空',
|
||||
`query_type` varchar(255) DEFAULT NULL COMMENT '查询类型',
|
||||
`remark` varchar(255) DEFAULT NULL COMMENT '描述',
|
||||
`date_annotation` varchar(255) DEFAULT NULL COMMENT '日期注解',
|
||||
`table_name` varchar(180) DEFAULT NULL COMMENT 'Table Name',
|
||||
`column_name` varchar(255) DEFAULT NULL COMMENT 'Database Field Name',
|
||||
`column_type` varchar(255) DEFAULT NULL COMMENT 'Database Field Type',
|
||||
`dict_name` varchar(255) DEFAULT NULL COMMENT 'Dictionary Name',
|
||||
`extra` varchar(255) DEFAULT NULL COMMENT 'Additional Field Parameters',
|
||||
`form_show` bit(1) DEFAULT NULL COMMENT 'Show in Form',
|
||||
`form_type` varchar(255) DEFAULT NULL COMMENT 'Form Type',
|
||||
`key_type` varchar(255) DEFAULT NULL COMMENT 'Database Field Key Type',
|
||||
`list_show` bit(1) DEFAULT NULL COMMENT 'Show in List',
|
||||
`not_null` bit(1) DEFAULT NULL COMMENT 'Not Null',
|
||||
`query_type` varchar(255) DEFAULT NULL COMMENT 'Query Type',
|
||||
`remark` varchar(255) DEFAULT NULL COMMENT 'Description',
|
||||
`date_annotation` varchar(255) DEFAULT NULL COMMENT 'Date Annotation',
|
||||
PRIMARY KEY (`column_id`) USING BTREE,
|
||||
KEY `idx_table_name` (`table_name`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=259 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='代码生成字段信息存储';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=259 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Code Generation Field Information Storage';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of code_column
|
||||
|
@ -52,18 +52,18 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `code_config`;
|
||||
CREATE TABLE `code_config` (
|
||||
`config_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`table_name` varchar(255) DEFAULT NULL COMMENT '表名',
|
||||
`author` varchar(255) DEFAULT NULL COMMENT '作者',
|
||||
`cover` bit(1) DEFAULT NULL COMMENT '是否覆盖',
|
||||
`module_name` varchar(255) DEFAULT NULL COMMENT '模块名称',
|
||||
`pack` varchar(255) DEFAULT NULL COMMENT '至于哪个包下',
|
||||
`path` varchar(255) DEFAULT NULL COMMENT '前端代码生成的路径',
|
||||
`api_path` varchar(255) DEFAULT NULL COMMENT '前端Api文件路径',
|
||||
`prefix` varchar(255) DEFAULT NULL COMMENT '表前缀',
|
||||
`api_alias` varchar(255) DEFAULT NULL COMMENT '接口名称',
|
||||
`table_name` varchar(255) DEFAULT NULL COMMENT 'Table Name',
|
||||
`author` varchar(255) DEFAULT NULL COMMENT 'Author',
|
||||
`cover` bit(1) DEFAULT NULL COMMENT 'Override',
|
||||
`module_name` varchar(255) DEFAULT NULL COMMENT 'Module Name',
|
||||
`pack` varchar(255) DEFAULT NULL COMMENT 'Package Location',
|
||||
`path` varchar(255) DEFAULT NULL COMMENT 'Frontend Code Generation Path',
|
||||
`api_path` varchar(255) DEFAULT NULL COMMENT 'Frontend API File Path',
|
||||
`prefix` varchar(255) DEFAULT NULL COMMENT 'Table Prefix',
|
||||
`api_alias` varchar(255) DEFAULT NULL COMMENT 'Interface Name',
|
||||
PRIMARY KEY (`config_id`) USING BTREE,
|
||||
KEY `idx_table_name` (`table_name`(100))
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='代码生成器配置';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Code Generator Configuration';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of code_config
|
||||
|
@ -77,19 +77,19 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `mnt_app`;
|
||||
CREATE TABLE `mnt_app` (
|
||||
`app_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '应用名称',
|
||||
`upload_path` varchar(255) DEFAULT NULL COMMENT '上传目录',
|
||||
`deploy_path` varchar(255) DEFAULT NULL COMMENT '部署路径',
|
||||
`backup_path` varchar(255) DEFAULT NULL COMMENT '备份路径',
|
||||
`port` int(255) DEFAULT NULL COMMENT '应用端口',
|
||||
`start_script` varchar(4000) DEFAULT NULL COMMENT '启动脚本',
|
||||
`deploy_script` varchar(4000) DEFAULT NULL COMMENT '部署脚本',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT 'Application Name',
|
||||
`upload_path` varchar(255) DEFAULT NULL COMMENT 'Upload Directory',
|
||||
`deploy_path` varchar(255) DEFAULT NULL COMMENT 'Deployment Path',
|
||||
`backup_path` varchar(255) DEFAULT NULL COMMENT 'Backup Path',
|
||||
`port` int(255) DEFAULT NULL COMMENT 'Application Port',
|
||||
`start_script` varchar(4000) DEFAULT NULL COMMENT 'Start Script',
|
||||
`deploy_script` varchar(4000) DEFAULT NULL COMMENT 'Deployment Script',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Date',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Time',
|
||||
PRIMARY KEY (`app_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='应用管理';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Application Management';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of mnt_app
|
||||
|
@ -103,16 +103,16 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `mnt_database`;
|
||||
CREATE TABLE `mnt_database` (
|
||||
`db_id` varchar(50) NOT NULL COMMENT 'ID',
|
||||
`name` varchar(255) NOT NULL COMMENT '名称',
|
||||
`jdbc_url` varchar(255) NOT NULL COMMENT 'jdbc连接',
|
||||
`user_name` varchar(255) NOT NULL COMMENT '账号',
|
||||
`pwd` varchar(255) NOT NULL COMMENT '密码',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`name` varchar(255) NOT NULL COMMENT 'Name',
|
||||
`jdbc_url` varchar(255) NOT NULL COMMENT 'JDBC Connection',
|
||||
`user_name` varchar(255) NOT NULL COMMENT 'Username',
|
||||
`pwd` varchar(255) NOT NULL COMMENT 'Password',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Time',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Time',
|
||||
PRIMARY KEY (`db_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='数据库管理';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Database Management';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of mnt_database
|
||||
|
@ -126,14 +126,14 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `mnt_deploy`;
|
||||
CREATE TABLE `mnt_deploy` (
|
||||
`deploy_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`app_id` bigint(20) DEFAULT NULL COMMENT '应用编号',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`app_id` bigint(20) DEFAULT NULL COMMENT 'Application ID',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Time',
|
||||
PRIMARY KEY (`deploy_id`) USING BTREE,
|
||||
KEY `idx_app_id` (`app_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='部署管理';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Deployment Management';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of mnt_deploy
|
||||
|
@ -147,13 +147,13 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `mnt_deploy_history`;
|
||||
CREATE TABLE `mnt_deploy_history` (
|
||||
`history_id` varchar(50) NOT NULL COMMENT 'ID',
|
||||
`app_name` varchar(255) NOT NULL COMMENT '应用名称',
|
||||
`deploy_date` datetime NOT NULL COMMENT '部署日期',
|
||||
`deploy_user` varchar(50) NOT NULL COMMENT '部署用户',
|
||||
`ip` varchar(20) NOT NULL COMMENT '服务器IP',
|
||||
`deploy_id` bigint(20) DEFAULT NULL COMMENT '部署编号',
|
||||
`app_name` varchar(255) NOT NULL COMMENT 'Application Name',
|
||||
`deploy_date` datetime NOT NULL COMMENT 'Deployment Date',
|
||||
`deploy_user` varchar(50) NOT NULL COMMENT 'Deployment User',
|
||||
`ip` varchar(20) NOT NULL COMMENT 'Server IP',
|
||||
`deploy_id` bigint(20) DEFAULT NULL COMMENT 'Deployment ID',
|
||||
PRIMARY KEY (`history_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='部署历史管理';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Deployment History Management';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of mnt_deploy_history
|
||||
|
@ -166,12 +166,12 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `mnt_deploy_server`;
|
||||
CREATE TABLE `mnt_deploy_server` (
|
||||
`deploy_id` bigint(20) NOT NULL COMMENT '部署ID',
|
||||
`server_id` bigint(20) NOT NULL COMMENT '服务ID',
|
||||
`deploy_id` bigint(20) NOT NULL COMMENT 'Deployment ID',
|
||||
`server_id` bigint(20) NOT NULL COMMENT 'Server ID',
|
||||
PRIMARY KEY (`deploy_id`,`server_id`) USING BTREE,
|
||||
KEY `idx_deploy_id` (`deploy_id`),
|
||||
KEY `idx_server_id` (`server_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='应用与服务器关联';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Application and Server Association';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of mnt_deploy_server
|
||||
|
@ -185,18 +185,18 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `mnt_server`;
|
||||
CREATE TABLE `mnt_server` (
|
||||
`server_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`account` varchar(50) DEFAULT NULL COMMENT '账号',
|
||||
`ip` varchar(20) DEFAULT NULL COMMENT 'IP地址',
|
||||
`name` varchar(100) DEFAULT NULL COMMENT '名称',
|
||||
`password` varchar(100) DEFAULT NULL COMMENT '密码',
|
||||
`port` int(11) DEFAULT NULL COMMENT '端口',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`account` varchar(50) DEFAULT NULL COMMENT 'Account',
|
||||
`ip` varchar(20) DEFAULT NULL COMMENT 'IP Address',
|
||||
`name` varchar(100) DEFAULT NULL COMMENT 'Name',
|
||||
`password` varchar(100) DEFAULT NULL COMMENT 'Password',
|
||||
`port` int(11) DEFAULT NULL COMMENT 'Port',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Time',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Time',
|
||||
PRIMARY KEY (`server_id`) USING BTREE,
|
||||
KEY `idx_ip` (`ip`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='服务器管理';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Server Management';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of mnt_server
|
||||
|
@ -210,31 +210,31 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `sys_dept`;
|
||||
CREATE TABLE `sys_dept` (
|
||||
`dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`pid` bigint(20) DEFAULT NULL COMMENT '上级部门',
|
||||
`sub_count` int(5) DEFAULT 0 COMMENT '子部门数目',
|
||||
`name` varchar(255) NOT NULL COMMENT '名称',
|
||||
`dept_sort` int(5) DEFAULT 999 COMMENT '排序',
|
||||
`enabled` bit(1) NOT NULL COMMENT '状态',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`pid` bigint(20) DEFAULT NULL COMMENT 'Parent Department',
|
||||
`sub_count` int(5) DEFAULT 0 COMMENT 'Number of Sub-departments',
|
||||
`name` varchar(255) NOT NULL COMMENT 'Name',
|
||||
`dept_sort` int(5) DEFAULT 999 COMMENT 'Sort Order',
|
||||
`enabled` bit(1) NOT NULL COMMENT 'Status',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Date',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Time',
|
||||
PRIMARY KEY (`dept_id`) USING BTREE,
|
||||
KEY `idx_pid` (`pid`),
|
||||
KEY `idx_enabled` (`enabled`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='部门';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Department';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_dept
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 7, 1, '研发部', 3, b'1', 'admin', 'admin', '2019-03-25 09:15:32', '2020-08-02 14:48:47');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 7, 0, '运维部', 4, b'1', 'admin', 'admin', '2019-03-25 09:20:44', '2020-05-17 14:27:27');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 8, 0, '测试部', 6, b'1', 'admin', 'admin', '2019-03-25 09:52:18', '2020-06-08 11:59:21');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (7, NULL, 2, '华南分部', 0, b'1', 'admin', 'admin', '2019-03-25 11:04:50', '2020-06-08 12:08:56');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (8, NULL, 2, '华北分部', 1, b'1', 'admin', 'admin', '2019-03-25 11:04:53', '2020-05-14 12:54:00');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (15, 8, 0, 'UI部门', 7, b'1', 'admin', 'admin', '2020-05-13 22:56:53', '2020-05-14 12:54:13');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (17, 2, 0, '研发一组', 999, b'1', 'admin', 'admin', '2020-08-02 14:49:07', '2020-08-02 14:49:07');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 7, 1, 'R&D Department', 3, b'1', 'admin', 'admin', '2019-03-25 09:15:32', '2020-08-02 14:48:47');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 7, 0, 'Operations Department', 4, b'1', 'admin', 'admin', '2019-03-25 09:20:44', '2020-05-17 14:27:27');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 8, 0, 'Testing Department', 6, b'1', 'admin', 'admin', '2019-03-25 09:52:18', '2020-06-08 11:59:21');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (7, NULL, 2, 'South China Branch', 0, b'1', 'admin', 'admin', '2019-03-25 11:04:50', '2020-06-08 12:08:56');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (8, NULL, 2, 'North China Branch', 1, b'1', 'admin', 'admin', '2019-03-25 11:04:53', '2020-05-14 12:54:00');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (15, 8, 0, 'UI Department', 7, b'1', 'admin', 'admin', '2020-05-13 22:56:53', '2020-05-14 12:54:13');
|
||||
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (17, 2, 0, 'Development Group 1', 999, b'1', 'admin', 'admin', '2020-08-02 14:49:07', '2020-08-02 14:49:07');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -243,22 +243,22 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `sys_dict`;
|
||||
CREATE TABLE `sys_dict` (
|
||||
`dict_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`name` varchar(255) NOT NULL COMMENT '字典名称',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT '描述',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`name` varchar(255) NOT NULL COMMENT 'Dictionary Name',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT 'Description',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Date',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Time',
|
||||
PRIMARY KEY (`dict_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='数据字典';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Data Dictionary';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_dict
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 'user_status', '用户状态', NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||
INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (4, 'dept_status', '部门状态', NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||
INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 'job_status', '岗位状态', NULL, 'admin', '2019-10-27 20:31:36', '2025-01-14 15:48:29');
|
||||
INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 'user_status', 'User Status', NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||
INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (4, 'dept_status', 'Department Status', NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||
INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 'job_status', 'Job Status', NULL, 'admin', '2019-10-27 20:31:36', '2025-01-14 15:48:29');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -267,28 +267,28 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `sys_dict_detail`;
|
||||
CREATE TABLE `sys_dict_detail` (
|
||||
`detail_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`dict_id` bigint(11) DEFAULT NULL COMMENT '字典id',
|
||||
`label` varchar(255) NOT NULL COMMENT '字典标签',
|
||||
`value` varchar(255) NOT NULL COMMENT '字典值',
|
||||
`dict_sort` int(5) DEFAULT NULL COMMENT '排序',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`dict_id` bigint(11) DEFAULT NULL COMMENT 'Dictionary ID',
|
||||
`label` varchar(255) NOT NULL COMMENT 'Dictionary Label',
|
||||
`value` varchar(255) NOT NULL COMMENT 'Dictionary Value',
|
||||
`dict_sort` int(5) DEFAULT NULL COMMENT 'Sort Order',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Date',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Time',
|
||||
PRIMARY KEY (`detail_id`) USING BTREE,
|
||||
KEY `idx_dict_id` (`dict_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='数据字典详情';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Data Dictionary Details';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_dict_detail
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 1, '激活', 'true', 1, NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 1, '禁用', 'false', 2, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 4, '启用', 'true', 1, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (4, 4, '停用', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 5, '启用', 'true', 1, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 5, '停用', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 1, 'Active', 'true', 1, NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 1, 'Disabled', 'false', 2, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 4, 'Enabled', 'true', 1, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (4, 4, 'Disabled', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 5, 'Enabled', 'true', 1, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 5, 'Disabled', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -297,26 +297,26 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `sys_job`;
|
||||
CREATE TABLE `sys_job` (
|
||||
`job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`name` varchar(180) NOT NULL COMMENT '岗位名称',
|
||||
`enabled` bit(1) NOT NULL COMMENT '岗位状态',
|
||||
`job_sort` int(5) DEFAULT NULL COMMENT '排序',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`name` varchar(180) NOT NULL COMMENT 'Job Name',
|
||||
`enabled` bit(1) NOT NULL COMMENT 'Job Status',
|
||||
`job_sort` int(5) DEFAULT NULL COMMENT 'Sort Order',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Date',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Time',
|
||||
PRIMARY KEY (`job_id`) USING BTREE,
|
||||
UNIQUE KEY `uniq_name` (`name`),
|
||||
KEY `idx_enabled` (`enabled`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='岗位';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Job';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_job
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (8, '人事专员', b'1', 3, NULL, NULL, '2019-03-29 14:52:28', NULL);
|
||||
INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (10, '产品经理', b'1', 4, NULL, NULL, '2019-03-29 14:55:51', NULL);
|
||||
INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (11, '全栈开发', b'1', 2, NULL, 'admin', '2019-03-31 13:39:30', '2020-05-05 11:33:43');
|
||||
INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (12, '软件测试', b'1', 5, NULL, 'admin', '2019-03-31 13:39:43', '2020-05-10 19:56:26');
|
||||
INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (8, 'HR Specialist', b'1', 3, NULL, NULL, '2019-03-29 14:52:28', NULL);
|
||||
INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (10, 'Product Manager', b'1', 4, NULL, NULL, '2019-03-29 14:55:51', NULL);
|
||||
INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (11, 'Full Stack Developer', b'1', 2, NULL, 'admin', '2019-03-31 13:39:30', '2020-05-05 11:33:43');
|
||||
INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (12, 'Software Tester', b'1', 5, NULL, 'admin', '2019-03-31 13:39:43', '2020-05-10 19:56:26');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -325,21 +325,21 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `sys_log`;
|
||||
CREATE TABLE `sys_log` (
|
||||
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT '描述',
|
||||
`log_type` varchar(10) NOT NULL COMMENT '日志类型:INFI/ERROR',
|
||||
`method` varchar(255) DEFAULT NULL COMMENT '方法名',
|
||||
`params` text DEFAULT NULL COMMENT '参数',
|
||||
`request_ip` varchar(255) DEFAULT NULL COMMENT '请求IP',
|
||||
`time` bigint(20) DEFAULT NULL COMMENT '执行时间',
|
||||
`username` varchar(255) DEFAULT NULL COMMENT '用户名',
|
||||
`address` varchar(255) DEFAULT NULL COMMENT '地址',
|
||||
`browser` varchar(255) DEFAULT NULL COMMENT '浏览器',
|
||||
`exception_detail` text DEFAULT NULL COMMENT '异常',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT 'Description',
|
||||
`log_type` varchar(10) NOT NULL COMMENT 'Log Type: INFO/ERROR',
|
||||
`method` varchar(255) DEFAULT NULL COMMENT 'Method Name',
|
||||
`params` text DEFAULT NULL COMMENT 'Parameters',
|
||||
`request_ip` varchar(255) DEFAULT NULL COMMENT 'Request IP',
|
||||
`time` bigint(20) DEFAULT NULL COMMENT 'Execution Time',
|
||||
`username` varchar(255) DEFAULT NULL COMMENT 'Username',
|
||||
`address` varchar(255) DEFAULT NULL COMMENT 'Address',
|
||||
`browser` varchar(255) DEFAULT NULL COMMENT 'Browser',
|
||||
`exception_detail` text DEFAULT NULL COMMENT 'Exception',
|
||||
`create_time` datetime NOT NULL COMMENT 'Creation Time',
|
||||
PRIMARY KEY (`log_id`) USING BTREE,
|
||||
KEY `idx_create_time_index` (`create_time`),
|
||||
KEY `idx_log_type` (`log_type`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3636 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='系统日志';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3636 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='System Log';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_log
|
||||
|
@ -353,105 +353,105 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `sys_menu`;
|
||||
CREATE TABLE `sys_menu` (
|
||||
`menu_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`pid` bigint(20) DEFAULT NULL COMMENT '上级菜单ID',
|
||||
`sub_count` int(5) DEFAULT 0 COMMENT '子菜单数目',
|
||||
`type` int(11) DEFAULT NULL COMMENT '菜单类型',
|
||||
`title` varchar(100) DEFAULT NULL COMMENT '菜单标题',
|
||||
`name` varchar(100) DEFAULT NULL COMMENT '组件名称',
|
||||
`component` varchar(255) DEFAULT NULL COMMENT '组件',
|
||||
`menu_sort` int(5) DEFAULT NULL COMMENT '排序',
|
||||
`icon` varchar(255) DEFAULT NULL COMMENT '图标',
|
||||
`path` varchar(255) DEFAULT NULL COMMENT '链接地址',
|
||||
`i_frame` bit(1) DEFAULT NULL COMMENT '是否外链',
|
||||
`cache` bit(1) DEFAULT b'0' COMMENT '缓存',
|
||||
`hidden` bit(1) DEFAULT b'0' COMMENT '隐藏',
|
||||
`permission` varchar(255) DEFAULT NULL COMMENT '权限',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`pid` bigint(20) DEFAULT NULL COMMENT 'Parent Menu ID',
|
||||
`sub_count` int(5) DEFAULT 0 COMMENT 'Number of Sub-menus',
|
||||
`type` int(11) DEFAULT NULL COMMENT 'Menu Type',
|
||||
`title` varchar(100) DEFAULT NULL COMMENT 'Menu Title',
|
||||
`name` varchar(100) DEFAULT NULL COMMENT 'Component Name',
|
||||
`component` varchar(255) DEFAULT NULL COMMENT 'Component',
|
||||
`menu_sort` int(5) DEFAULT NULL COMMENT 'Sort Order',
|
||||
`icon` varchar(255) DEFAULT NULL COMMENT 'Icon',
|
||||
`path` varchar(255) DEFAULT NULL COMMENT 'Link Address',
|
||||
`i_frame` bit(1) DEFAULT NULL COMMENT 'Is External Link',
|
||||
`cache` bit(1) DEFAULT b'0' COMMENT 'Cache',
|
||||
`hidden` bit(1) DEFAULT b'0' COMMENT 'Hidden',
|
||||
`permission` varchar(255) DEFAULT NULL COMMENT 'Permission',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Date',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Date',
|
||||
PRIMARY KEY (`menu_id`) USING BTREE,
|
||||
UNIQUE KEY `uniq_name` (`name`),
|
||||
UNIQUE KEY `uniq_title` (`title`),
|
||||
KEY `idx_pid` (`pid`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=117 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='系统菜单';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=117 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='System Menu';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_menu
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, NULL, 7, 0, '系统管理', NULL, NULL, 1, 'system', 'system', b'0', b'0', b'0', NULL, NULL, 'admin', '2018-12-18 15:11:29', '2025-01-14 15:48:18');
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 1, 3, 1, '用户管理', 'User', 'system/user/index', 2, 'peoples', 'user', b'0', b'0', b'0', 'user:list', NULL, NULL, '2018-12-18 15:14:44', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 1, 3, 1, '角色管理', 'Role', 'system/role/index', 3, 'role', 'role', b'0', b'0', b'0', 'roles:list', NULL, NULL, '2018-12-18 15:16:07', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 1, 3, 1, '菜单管理', 'Menu', 'system/menu/index', 5, 'menu', 'menu', b'0', b'0', b'0', 'menu:list', NULL, NULL, '2018-12-18 15:17:28', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, NULL, 5, 0, '系统监控', NULL, NULL, 10, 'monitor', 'monitor', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:17:48', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (7, 6, 0, 1, '操作日志', 'Log', 'monitor/log/index', 11, 'log', 'logs', b'0', b'1', b'0', NULL, NULL, 'admin', '2018-12-18 15:18:26', '2020-06-06 13:11:57');
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (9, 6, 0, 1, 'SQL监控', 'Sql', 'monitor/sql/index', 18, 'sqlMonitor', 'druid', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:19:34', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (10, NULL, 5, 0, '组件管理', NULL, NULL, 50, 'zujian', 'components', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:16', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (11, 10, 0, 1, '图标库', 'Icons', 'components/icons/index', 51, 'icon', 'icon', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:49', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (14, 36, 0, 1, '邮件工具', 'Email', 'tools/email/index', 35, 'email', 'email', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 10:13:09', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (15, 10, 0, 1, '富文本', 'Editor', 'components/Editor', 52, 'fwb', 'tinymce', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 11:58:25', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (18, 36, 3, 1, '存储管理', 'Storage', 'tools/storage/index', 34, 'qiniu', 'storage', b'0', b'0', b'0', 'storage:list', NULL, NULL, '2018-12-31 11:12:15', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (19, 36, 0, 1, '支付宝工具', 'AliPay', 'tools/aliPay/index', 37, 'alipay', 'aliPay', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-31 14:52:38', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (21, NULL, 2, 0, '多级菜单', NULL, '', 900, 'menu', 'nested', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:22:03', '2020-06-21 17:27:35');
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (22, 21, 2, 0, '二级菜单1', NULL, '', 999, 'menu', 'menu1', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:23:29', '2020-06-21 17:27:20');
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (23, 21, 0, 1, '二级菜单2', NULL, 'nested/menu2/index', 999, 'menu', 'menu2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:23:57', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (24, 22, 0, 1, '三级菜单1', 'Test', 'nested/menu1/menu1-1', 999, 'menu', 'menu1-1', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:24:48', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (27, 22, 0, 1, '三级菜单2', NULL, 'nested/menu1/menu1-2', 999, 'menu', 'menu1-2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-07 17:27:32', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (28, 1, 3, 1, '任务调度', 'Timing', 'system/timing/index', 999, 'timing', 'timing', b'0', b'0', b'0', 'timing:list', NULL, NULL, '2019-01-07 20:34:40', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (30, 36, 0, 1, '代码生成', 'GeneratorIndex', 'generator/index', 32, 'dev', 'generator', b'0', b'1', b'0', NULL, NULL, NULL, '2019-01-11 15:45:55', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (32, 6, 0, 1, '异常日志', 'ErrorLog', 'monitor/log/errorLog', 12, 'error', 'errorLog', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-13 13:49:03', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, NULL, 7, 0, 'System Management', NULL, NULL, 1, 'system', 'system', b'0', b'0', b'0', NULL, NULL, 'admin', '2018-12-18 15:11:29', '2025-01-14 15:48:18');
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 1, 3, 1, 'User Management', 'User', 'system/user/index', 2, 'peoples', 'user', b'0', b'0', b'0', 'user:list', NULL, NULL, '2018-12-18 15:14:44', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 1, 3, 1, 'Role Management', 'Role', 'system/role/index', 3, 'role', 'role', b'0', b'0', b'0', 'roles:list', NULL, NULL, '2018-12-18 15:16:07', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 1, 3, 1, 'Menu Management', 'Menu', 'system/menu/index', 5, 'menu', 'menu', b'0', b'0', b'0', 'menu:list', NULL, NULL, '2018-12-18 15:17:28', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, NULL, 5, 0, 'System Monitoring', NULL, NULL, 10, 'monitor', 'monitor', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:17:48', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (7, 6, 0, 1, 'Operation Log', 'Log', 'monitor/log/index', 11, 'log', 'logs', b'0', b'1', b'0', NULL, NULL, 'admin', '2018-12-18 15:18:26', '2020-06-06 13:11:57');
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (9, 6, 0, 1, 'SQL Monitoring', 'Sql', 'monitor/sql/index', 18, 'sqlMonitor', 'druid', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:19:34', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (10, NULL, 5, 0, 'Component Management', NULL, NULL, 50, 'zujian', 'components', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:16', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (11, 10, 0, 1, 'Icon Library', 'Icons', 'components/icons/index', 51, 'icon', 'icon', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:49', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (14, 36, 0, 1, 'Email Tool', 'Email', 'tools/email/index', 35, 'email', 'email', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 10:13:09', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (15, 10, 0, 1, 'Rich Text', 'Editor', 'components/Editor', 52, 'fwb', 'tinymce', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 11:58:25', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (18, 36, 3, 1, 'Storage Management', 'Storage', 'tools/storage/index', 34, 'qiniu', 'storage', b'0', b'0', b'0', 'storage:list', NULL, NULL, '2018-12-31 11:12:15', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (19, 36, 0, 1, 'Alipay Tool', 'AliPay', 'tools/aliPay/index', 37, 'alipay', 'aliPay', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-31 14:52:38', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (21, NULL, 2, 0, 'Multi-level Menu', NULL, '', 900, 'menu', 'nested', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:22:03', '2020-06-21 17:27:35');
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (22, 21, 2, 0, 'Second Level Menu 1', NULL, '', 999, 'menu', 'menu1', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:23:29', '2020-06-21 17:27:20');
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (23, 21, 0, 1, 'Second Level Menu 2', NULL, 'nested/menu2/index', 999, 'menu', 'menu2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:23:57', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (24, 22, 0, 1, 'Third Level Menu 1', 'Test', 'nested/menu1/menu1-1', 999, 'menu', 'menu1-1', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:24:48', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (27, 22, 0, 1, 'Third Level Menu 2', NULL, 'nested/menu1/menu1-2', 999, 'menu', 'menu1-2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-07 17:27:32', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (28, 1, 3, 1, 'Task Scheduling', 'Timing', 'system/timing/index', 999, 'timing', 'timing', b'0', b'0', b'0', 'timing:list', NULL, NULL, '2019-01-07 20:34:40', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (30, 36, 0, 1, 'Code Generation', 'GeneratorIndex', 'generator/index', 32, 'dev', 'generator', b'0', b'1', b'0', NULL, NULL, NULL, '2019-01-11 15:45:55', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (32, 6, 0, 1, 'Exception Log', 'ErrorLog', 'monitor/log/errorLog', 12, 'error', 'errorLog', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-13 13:49:03', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (33, 10, 0, 1, 'Markdown', 'Markdown', 'components/MarkDown', 53, 'markdown', 'markdown', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-08 13:46:44', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (34, 10, 0, 1, 'Yaml编辑器', 'YamlEdit', 'components/YamlEdit', 54, 'dev', 'yaml', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-08 15:49:40', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (35, 1, 3, 1, '部门管理', 'Dept', 'system/dept/index', 6, 'dept', 'dept', b'0', b'0', b'0', 'dept:list', NULL, NULL, '2019-03-25 09:46:00', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (36, NULL, 6, 0, '系统工具', NULL, '', 30, 'sys-tools', 'sys-tools', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-29 10:57:35', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (37, 1, 3, 1, '岗位管理', 'Job', 'system/job/index', 7, 'Steve-Jobs', 'job', b'0', b'0', b'0', 'job:list', NULL, NULL, '2019-03-29 13:51:18', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (39, 1, 3, 1, '字典管理', 'Dict', 'system/dict/index', 8, 'dictionary', 'dict', b'0', b'0', b'0', 'dict:list', NULL, NULL, '2019-04-10 11:49:04', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (41, 6, 0, 1, '在线用户', 'OnlineUser', 'monitor/online/index', 10, 'Steve-Jobs', 'online', b'0', b'0', b'0', NULL, NULL, NULL, '2019-10-26 22:08:43', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (44, 2, 0, 2, '用户新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'user:add', NULL, NULL, '2019-10-29 10:59:46', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (45, 2, 0, 2, '用户编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'user:edit', NULL, NULL, '2019-10-29 11:00:08', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (46, 2, 0, 2, '用户删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'user:del', NULL, NULL, '2019-10-29 11:00:23', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (48, 3, 0, 2, '角色创建', NULL, '', 2, '', '', b'0', b'0', b'0', 'roles:add', NULL, NULL, '2019-10-29 12:45:34', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (49, 3, 0, 2, '角色修改', NULL, '', 3, '', '', b'0', b'0', b'0', 'roles:edit', NULL, NULL, '2019-10-29 12:46:16', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (50, 3, 0, 2, '角色删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'roles:del', NULL, NULL, '2019-10-29 12:46:51', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (52, 5, 0, 2, '菜单新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'menu:add', NULL, NULL, '2019-10-29 12:55:07', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (53, 5, 0, 2, '菜单编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'menu:edit', NULL, NULL, '2019-10-29 12:55:40', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (54, 5, 0, 2, '菜单删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'menu:del', NULL, NULL, '2019-10-29 12:56:00', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (56, 35, 0, 2, '部门新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dept:add', NULL, NULL, '2019-10-29 12:57:09', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (57, 35, 0, 2, '部门编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dept:edit', NULL, NULL, '2019-10-29 12:57:27', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (58, 35, 0, 2, '部门删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dept:del', NULL, NULL, '2019-10-29 12:57:41', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (60, 37, 0, 2, '岗位新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'job:add', NULL, NULL, '2019-10-29 12:58:27', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (61, 37, 0, 2, '岗位编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'job:edit', NULL, NULL, '2019-10-29 12:58:45', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (62, 37, 0, 2, '岗位删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'job:del', NULL, NULL, '2019-10-29 12:59:04', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (64, 39, 0, 2, '字典新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dict:add', NULL, NULL, '2019-10-29 13:00:17', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (65, 39, 0, 2, '字典编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dict:edit', NULL, NULL, '2019-10-29 13:00:42', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (66, 39, 0, 2, '字典删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dict:del', NULL, NULL, '2019-10-29 13:00:59', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (73, 28, 0, 2, '任务新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'timing:add', NULL, NULL, '2019-10-29 13:07:28', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (74, 28, 0, 2, '任务编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'timing:edit', NULL, NULL, '2019-10-29 13:07:41', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (75, 28, 0, 2, '任务删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'timing:del', NULL, NULL, '2019-10-29 13:07:54', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (77, 18, 0, 2, '上传文件', NULL, '', 2, '', '', b'0', b'0', b'0', 'storage:add', NULL, NULL, '2019-10-29 13:09:09', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (78, 18, 0, 2, '文件编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'storage:edit', NULL, NULL, '2019-10-29 13:09:22', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (79, 18, 0, 2, '文件删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'storage:del', NULL, NULL, '2019-10-29 13:09:34', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (80, 6, 0, 1, '服务监控', 'ServerMonitor', 'monitor/server/index', 14, 'codeConsole', 'server', b'0', b'0', b'0', 'monitor:list', NULL, 'admin', '2019-11-07 13:06:39', '2020-05-04 18:20:50');
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (82, 36, 0, 1, '生成配置', 'GeneratorConfig', 'generator/config', 33, 'dev', 'generator/config/:tableName', b'0', b'1', b'1', '', NULL, NULL, '2019-11-17 20:08:56', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (83, 10, 0, 1, '图表库', 'Echarts', 'components/Echarts', 50, 'chart', 'echarts', b'0', b'1', b'0', '', NULL, NULL, '2019-11-21 09:04:32', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (90, NULL, 5, 1, '运维管理', 'Mnt', '', 20, 'mnt', 'mnt', b'0', b'0', b'0', NULL, NULL, NULL, '2019-11-09 10:31:08', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (92, 90, 3, 1, '服务器', 'ServerDeploy', 'maint/server/index', 22, 'server', 'maint/serverDeploy', b'0', b'0', b'0', 'serverDeploy:list', NULL, NULL, '2019-11-10 10:29:25', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (93, 90, 3, 1, '应用管理', 'App', 'maint/app/index', 23, 'app', 'maint/app', b'0', b'0', b'0', 'app:list', NULL, NULL, '2019-11-10 11:05:16', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (94, 90, 3, 1, '部署管理', 'Deploy', 'maint/deploy/index', 24, 'deploy', 'maint/deploy', b'0', b'0', b'0', 'deploy:list', NULL, NULL, '2019-11-10 15:56:55', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (97, 90, 1, 1, '部署备份', 'DeployHistory', 'maint/deployHistory/index', 25, 'backup', 'maint/deployHistory', b'0', b'0', b'0', 'deployHistory:list', NULL, NULL, '2019-11-10 16:49:44', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (98, 90, 3, 1, '数据库管理', 'Database', 'maint/database/index', 26, 'database', 'maint/database', b'0', b'0', b'0', 'database:list', NULL, NULL, '2019-11-10 20:40:04', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (102, 97, 0, 2, '删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'deployHistory:del', NULL, NULL, '2019-11-17 09:32:48', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (103, 92, 0, 2, '服务器新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:add', NULL, NULL, '2019-11-17 11:08:33', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (104, 92, 0, 2, '服务器编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:edit', NULL, NULL, '2019-11-17 11:08:57', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (105, 92, 0, 2, '服务器删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:del', NULL, NULL, '2019-11-17 11:09:15', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (106, 93, 0, 2, '应用新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:add', NULL, NULL, '2019-11-17 11:10:03', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (107, 93, 0, 2, '应用编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:edit', NULL, NULL, '2019-11-17 11:10:28', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (108, 93, 0, 2, '应用删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:del', NULL, NULL, '2019-11-17 11:10:55', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (109, 94, 0, 2, '部署新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:add', NULL, NULL, '2019-11-17 11:11:22', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (110, 94, 0, 2, '部署编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:edit', NULL, NULL, '2019-11-17 11:11:41', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (111, 94, 0, 2, '部署删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:del', NULL, NULL, '2019-11-17 11:12:01', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (116, 36, 0, 1, '生成预览', 'Preview', 'generator/preview', 999, 'java', 'generator/preview/:tableName', b'0', b'1', b'1', NULL, NULL, NULL, '2019-11-26 14:54:36', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (34, 10, 0, 1, 'Yaml Editor', 'YamlEdit', 'components/YamlEdit', 54, 'dev', 'yaml', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-08 15:49:40', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (35, 1, 3, 1, 'Department Management', 'Dept', 'system/dept/index', 6, 'dept', 'dept', b'0', b'0', b'0', 'dept:list', NULL, NULL, '2019-03-25 09:46:00', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (36, NULL, 6, 0, 'System Tools', NULL, '', 30, 'sys-tools', 'sys-tools', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-29 10:57:35', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (37, 1, 3, 1, 'Job Management', 'Job', 'system/job/index', 7, 'Steve-Jobs', 'job', b'0', b'0', b'0', 'job:list', NULL, NULL, '2019-03-29 13:51:18', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (39, 1, 3, 1, 'Dictionary Management', 'Dict', 'system/dict/index', 8, 'dictionary', 'dict', b'0', b'0', b'0', 'dict:list', NULL, NULL, '2019-04-10 11:49:04', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (41, 6, 0, 1, 'Online User', 'OnlineUser', 'monitor/online/index', 10, 'Steve-Jobs', 'online', b'0', b'0', b'0', NULL, NULL, NULL, '2019-10-26 22:08:43', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (44, 2, 0, 2, 'User Add', NULL, '', 2, '', '', b'0', b'0', b'0', 'user:add', NULL, NULL, '2019-10-29 10:59:46', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (45, 2, 0, 2, 'User Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'user:edit', NULL, NULL, '2019-10-29 11:00:08', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (46, 2, 0, 2, 'User Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'user:del', NULL, NULL, '2019-10-29 11:00:23', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (48, 3, 0, 2, 'Role Create', NULL, '', 2, '', '', b'0', b'0', b'0', 'roles:add', NULL, NULL, '2019-10-29 12:45:34', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (49, 3, 0, 2, 'Role Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'roles:edit', NULL, NULL, '2019-10-29 12:46:16', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (50, 3, 0, 2, 'Role Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'roles:del', NULL, NULL, '2019-10-29 12:46:51', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (52, 5, 0, 2, 'Menu Add', NULL, '', 2, '', '', b'0', b'0', b'0', 'menu:add', NULL, NULL, '2019-10-29 12:55:07', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (53, 5, 0, 2, 'Menu Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'menu:edit', NULL, NULL, '2019-10-29 12:55:40', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (54, 5, 0, 2, 'Menu Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'menu:del', NULL, NULL, '2019-10-29 12:56:00', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (56, 35, 0, 2, 'Department Add', NULL, '', 2, '', '', b'0', b'0', b'0', 'dept:add', NULL, NULL, '2019-10-29 12:57:09', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (57, 35, 0, 2, 'Department Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'dept:edit', NULL, NULL, '2019-10-29 12:57:27', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (58, 35, 0, 2, 'Department Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'dept:del', NULL, NULL, '2019-10-29 12:57:41', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (60, 37, 0, 2, 'Job Add', NULL, '', 2, '', '', b'0', b'0', b'0', 'job:add', NULL, NULL, '2019-10-29 12:58:27', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (61, 37, 0, 2, 'Job Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'job:edit', NULL, NULL, '2019-10-29 12:58:45', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (62, 37, 0, 2, 'Job Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'job:del', NULL, NULL, '2019-10-29 12:59:04', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (64, 39, 0, 2, 'Dictionary Add', NULL, '', 2, '', '', b'0', b'0', b'0', 'dict:add', NULL, NULL, '2019-10-29 13:00:17', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (65, 39, 0, 2, 'Dictionary Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'dict:edit', NULL, NULL, '2019-10-29 13:00:42', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (66, 39, 0, 2, 'Dictionary Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'dict:del', NULL, NULL, '2019-10-29 13:00:59', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (73, 28, 0, 2, 'Task Add', NULL, '', 2, '', '', b'0', b'0', b'0', 'timing:add', NULL, NULL, '2019-10-29 13:07:28', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (74, 28, 0, 2, 'Task Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'timing:edit', NULL, NULL, '2019-10-29 13:07:41', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (75, 28, 0, 2, 'Task Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'timing:del', NULL, NULL, '2019-10-29 13:07:54', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (77, 18, 0, 2, 'Upload File', NULL, '', 2, '', '', b'0', b'0', b'0', 'storage:add', NULL, NULL, '2019-10-29 13:09:09', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (78, 18, 0, 2, 'Edit File', NULL, '', 3, '', '', b'0', b'0', b'0', 'storage:edit', NULL, NULL, '2019-10-29 13:09:22', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (79, 18, 0, 2, 'Delete File', NULL, '', 4, '', '', b'0', b'0', b'0', 'storage:del', NULL, NULL, '2019-10-29 13:09:34', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (80, 6, 0, 1, 'Server Monitoring', 'ServerMonitor', 'monitor/server/index', 14, 'codeConsole', 'server', b'0', b'0', b'0', 'monitor:list', NULL, 'admin', '2019-11-07 13:06:39', '2020-05-04 18:20:50');
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (82, 36, 0, 1, 'Generate Configuration', 'GeneratorConfig', 'generator/config', 33, 'dev', 'generator/config/:tableName', b'0', b'1', b'1', '', NULL, NULL, '2019-11-17 20:08:56', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (83, 10, 0, 1, 'Chart Library', 'Echarts', 'components/Echarts', 50, 'chart', 'echarts', b'0', b'1', b'0', '', NULL, NULL, '2019-11-21 09:04:32', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (90, NULL, 5, 1, 'Operation and Maintenance', 'Mnt', '', 20, 'mnt', 'mnt', b'0', b'0', b'0', NULL, NULL, NULL, '2019-11-09 10:31:08', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (92, 90, 3, 1, 'Server', 'ServerDeploy', 'maint/server/index', 22, 'server', 'maint/serverDeploy', b'0', b'0', b'0', 'serverDeploy:list', NULL, NULL, '2019-11-10 10:29:25', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (93, 90, 3, 1, 'Application Management', 'App', 'maint/app/index', 23, 'app', 'maint/app', b'0', b'0', b'0', 'app:list', NULL, NULL, '2019-11-10 11:05:16', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (94, 90, 3, 1, 'Deployment Management', 'Deploy', 'maint/deploy/index', 24, 'deploy', 'maint/deploy', b'0', b'0', b'0', 'deploy:list', NULL, NULL, '2019-11-10 15:56:55', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (97, 90, 1, 1, 'Deployment Backup', 'DeployHistory', 'maint/deployHistory/index', 25, 'backup', 'maint/deployHistory', b'0', b'0', b'0', 'deployHistory:list', NULL, NULL, '2019-11-10 16:49:44', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (98, 90, 3, 1, 'Database Management', 'Database', 'maint/database/index', 26, 'database', 'maint/database', b'0', b'0', b'0', 'database:list', NULL, NULL, '2019-11-10 20:40:04', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (102, 97, 0, 2, 'Delete', NULL, '', 999, '', '', b'0', b'0', b'0', 'deployHistory:del', NULL, NULL, '2019-11-17 09:32:48', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (103, 92, 0, 2, 'Server Add', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:add', NULL, NULL, '2019-11-17 11:08:33', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (104, 92, 0, 2, 'Server Edit', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:edit', NULL, NULL, '2019-11-17 11:08:57', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (105, 92, 0, 2, 'Server Delete', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:del', NULL, NULL, '2019-11-17 11:09:15', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (106, 93, 0, 2, 'Application Add', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:add', NULL, NULL, '2019-11-17 11:10:03', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (107, 93, 0, 2, 'Application Edit', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:edit', NULL, NULL, '2019-11-17 11:10:28', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (108, 93, 0, 2, 'Application Delete', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:del', NULL, NULL, '2019-11-17 11:10:55', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (109, 94, 0, 2, 'Deployment Add', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:add', NULL, NULL, '2019-11-17 11:11:22', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (110, 94, 0, 2, 'Deployment Edit', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:edit', NULL, NULL, '2019-11-17 11:11:41', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (111, 94, 0, 2, 'Deployment Delete', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:del', NULL, NULL, '2019-11-17 11:12:01', NULL);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (116, 36, 0, 1, 'Generate Preview', 'Preview', 'generator/preview', 999, 'java', 'generator/preview/:tableName', b'0', b'1', b'1', NULL, NULL, NULL, '2019-11-26 14:54:36', NULL);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -460,33 +460,33 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `sys_quartz_job`;
|
||||
CREATE TABLE `sys_quartz_job` (
|
||||
`job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`bean_name` varchar(255) DEFAULT NULL COMMENT 'Spring Bean名称',
|
||||
`cron_expression` varchar(255) DEFAULT NULL COMMENT 'cron 表达式',
|
||||
`is_pause` bit(1) DEFAULT NULL COMMENT '状态:1暂停、0启用',
|
||||
`job_name` varchar(255) DEFAULT NULL COMMENT '任务名称',
|
||||
`method_name` varchar(255) DEFAULT NULL COMMENT '方法名称',
|
||||
`params` varchar(255) DEFAULT NULL COMMENT '参数',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT '备注',
|
||||
`person_in_charge` varchar(100) DEFAULT NULL COMMENT '负责人',
|
||||
`email` varchar(100) DEFAULT NULL COMMENT '报警邮箱',
|
||||
`sub_task` varchar(100) DEFAULT NULL COMMENT '子任务ID',
|
||||
`pause_after_failure` bit(1) DEFAULT NULL COMMENT '任务失败后是否暂停',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`bean_name` varchar(255) DEFAULT NULL COMMENT 'Spring Bean Name',
|
||||
`cron_expression` varchar(255) DEFAULT NULL COMMENT 'Cron Expression',
|
||||
`is_pause` bit(1) DEFAULT NULL COMMENT 'Status: 1 Paused, 0 Enabled',
|
||||
`job_name` varchar(255) DEFAULT NULL COMMENT 'Job Name',
|
||||
`method_name` varchar(255) DEFAULT NULL COMMENT 'Method Name',
|
||||
`params` varchar(255) DEFAULT NULL COMMENT 'Parameters',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT 'Description',
|
||||
`person_in_charge` varchar(100) DEFAULT NULL COMMENT 'Person in Charge',
|
||||
`email` varchar(100) DEFAULT NULL COMMENT 'Alert Email',
|
||||
`sub_task` varchar(100) DEFAULT NULL COMMENT 'Sub-task ID',
|
||||
`pause_after_failure` bit(1) DEFAULT NULL COMMENT 'Pause After Failure',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Date',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Date',
|
||||
PRIMARY KEY (`job_id`) USING BTREE,
|
||||
KEY `idx_is_pause` (`is_pause`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='定时任务';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Scheduled Task';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_quartz_job
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 'testTask', '0/5 * * * * ?', b'1', '测试1', 'run1', 'test', '带参测试,多参使用json', '测试', NULL, NULL, NULL, NULL, 'admin', '2019-08-22 14:08:29', '2020-05-24 13:58:33');
|
||||
INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 'testTask', '0/5 * * * * ?', b'1', '测试', 'run', '', '不带参测试', 'Zheng Jie', '', '6', b'1', NULL, 'admin', '2019-09-26 16:44:39', '2020-05-24 14:48:12');
|
||||
INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 'Test', '0/5 * * * * ?', b'1', '任务告警测试', 'run', NULL, '测试', 'test', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:32:41', '2020-05-05 20:36:13');
|
||||
INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 'testTask', '0/5 * * * * ?', b'1', '测试3', 'run2', NULL, '测试3', 'Zheng Jie', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:35:41', '2020-05-05 20:36:07');
|
||||
INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 'testTask', '0/5 * * * * ?', b'1', 'Test 1', 'run1', 'test', 'Test with parameters, use JSON for multiple parameters', 'Test', NULL, NULL, NULL, NULL, 'admin', '2019-08-22 14:08:29', '2020-05-24 13:58:33');
|
||||
INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 'testTask', '0/5 * * * * ?', b'1', 'Test', 'run', '', 'Test without parameters', 'Zheng Jie', '', '6', b'1', NULL, 'admin', '2019-09-26 16:44:39', '2020-05-24 14:48:12');
|
||||
INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 'Test', '0/5 * * * * ?', b'1', 'Task Alarm Test', 'run', NULL, 'Test', 'test', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:32:41', '2020-05-05 20:36:13');
|
||||
INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 'testTask', '0/5 * * * * ?', b'1', 'Test 3', 'run2', NULL, 'Test 3', 'Zheng Jie', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:35:41', '2020-05-05 20:36:07');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -495,17 +495,17 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `sys_quartz_log`;
|
||||
CREATE TABLE `sys_quartz_log` (
|
||||
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`bean_name` varchar(255) DEFAULT NULL COMMENT 'Bean名称',
|
||||
`cron_expression` varchar(255) DEFAULT NULL COMMENT 'cron 表达式',
|
||||
`is_success` bit(1) DEFAULT NULL COMMENT '是否执行成功',
|
||||
`job_name` varchar(255) DEFAULT NULL COMMENT '任务名称',
|
||||
`method_name` varchar(255) DEFAULT NULL COMMENT '方法名称',
|
||||
`params` varchar(255) DEFAULT NULL COMMENT '参数',
|
||||
`time` bigint(20) DEFAULT NULL COMMENT '执行耗时',
|
||||
`exception_detail` text DEFAULT NULL COMMENT '异常详情',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`bean_name` varchar(255) DEFAULT NULL COMMENT 'Bean Name',
|
||||
`cron_expression` varchar(255) DEFAULT NULL COMMENT 'Cron Expression',
|
||||
`is_success` bit(1) DEFAULT NULL COMMENT 'Execution Success',
|
||||
`job_name` varchar(255) DEFAULT NULL COMMENT 'Job Name',
|
||||
`method_name` varchar(255) DEFAULT NULL COMMENT 'Method Name',
|
||||
`params` varchar(255) DEFAULT NULL COMMENT 'Parameters',
|
||||
`time` bigint(20) DEFAULT NULL COMMENT 'Execution Time',
|
||||
`exception_detail` text DEFAULT NULL COMMENT 'Exception Details',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Time',
|
||||
PRIMARY KEY (`log_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=262 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='定时任务日志';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=262 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Scheduled Task Log';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_quartz_log
|
||||
|
@ -519,25 +519,25 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `sys_role`;
|
||||
CREATE TABLE `sys_role` (
|
||||
`role_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`name` varchar(100) NOT NULL COMMENT '名称',
|
||||
`level` int(50) DEFAULT NULL COMMENT '角色级别',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT '描述',
|
||||
`data_scope` varchar(255) DEFAULT NULL COMMENT '数据权限',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`name` varchar(100) NOT NULL COMMENT 'Name',
|
||||
`level` int(50) DEFAULT NULL COMMENT 'Role Level',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT 'Description',
|
||||
`data_scope` varchar(255) DEFAULT NULL COMMENT 'Data Scope',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Date',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Date',
|
||||
PRIMARY KEY (`role_id`) USING BTREE,
|
||||
UNIQUE KEY `uniq_name` (`name`),
|
||||
KEY `idx_level` (`level`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='角色表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Role Table';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_role
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_role` (`role_id`, `name`, `level`, `description`, `data_scope`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, '超级管理员', 1, '-', '全部', NULL, 'admin', '2018-11-23 11:04:37', '2020-08-06 16:10:24');
|
||||
INSERT INTO `sys_role` (`role_id`, `name`, `level`, `description`, `data_scope`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, '普通用户', 2, '-', '本级', NULL, 'admin', '2018-11-23 13:09:06', '2020-09-05 10:45:12');
|
||||
INSERT INTO `sys_role` (`role_id`, `name`, `level`, `description`, `data_scope`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 'Super Administrator', 1, '-', 'All', NULL, 'admin', '2018-11-23 11:04:37', '2020-08-06 16:10:24');
|
||||
INSERT INTO `sys_role` (`role_id`, `name`, `level`, `description`, `data_scope`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 'Regular User', 2, '-', 'Current Level', NULL, 'admin', '2018-11-23 13:09:06', '2020-09-05 10:45:12');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -545,12 +545,12 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_roles_depts`;
|
||||
CREATE TABLE `sys_roles_depts` (
|
||||
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
|
||||
`dept_id` bigint(20) NOT NULL COMMENT '部门ID',
|
||||
`role_id` bigint(20) NOT NULL COMMENT 'Role ID',
|
||||
`dept_id` bigint(20) NOT NULL COMMENT 'Department ID',
|
||||
PRIMARY KEY (`role_id`,`dept_id`) USING BTREE,
|
||||
KEY `idx_role_id` (`role_id`),
|
||||
KEY `idx_dept_id` (`dept_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='角色部门关联';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Role-Department Association';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_roles_depts
|
||||
|
@ -563,12 +563,12 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_roles_menus`;
|
||||
CREATE TABLE `sys_roles_menus` (
|
||||
`menu_id` bigint(20) NOT NULL COMMENT '菜单ID',
|
||||
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
|
||||
`menu_id` bigint(20) NOT NULL COMMENT 'Menu ID',
|
||||
`role_id` bigint(20) NOT NULL COMMENT 'Role ID',
|
||||
PRIMARY KEY (`menu_id`,`role_id`) USING BTREE,
|
||||
KEY `idx_menu_id` (`menu_id`),
|
||||
KEY `idx_role_id` (`role_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='角色菜单关联';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Role-Menu Association';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_roles_menus
|
||||
|
@ -678,35 +678,35 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `sys_user`;
|
||||
CREATE TABLE `sys_user` (
|
||||
`user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`dept_id` bigint(20) DEFAULT NULL COMMENT '部门名称',
|
||||
`username` varchar(180) DEFAULT NULL COMMENT '用户名',
|
||||
`nick_name` varchar(255) DEFAULT NULL COMMENT '昵称',
|
||||
`gender` varchar(2) DEFAULT NULL COMMENT '性别',
|
||||
`phone` varchar(255) DEFAULT NULL COMMENT '手机号码',
|
||||
`email` varchar(180) DEFAULT NULL COMMENT '邮箱',
|
||||
`avatar_name` varchar(255) DEFAULT NULL COMMENT '头像地址',
|
||||
`avatar_path` varchar(255) DEFAULT NULL COMMENT '头像真实路径',
|
||||
`password` varchar(255) DEFAULT NULL COMMENT '密码',
|
||||
`is_admin` bit(1) DEFAULT b'0' COMMENT '是否为admin账号',
|
||||
`enabled` bit(1) DEFAULT NULL COMMENT '状态:1启用、0禁用',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`pwd_reset_time` datetime DEFAULT NULL COMMENT '修改密码的时间',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`dept_id` bigint(20) DEFAULT NULL COMMENT 'Department Name',
|
||||
`username` varchar(180) DEFAULT NULL COMMENT 'Username',
|
||||
`nick_name` varchar(255) DEFAULT NULL COMMENT 'Nickname',
|
||||
`gender` varchar(2) DEFAULT NULL COMMENT 'Gender',
|
||||
`phone` varchar(255) DEFAULT NULL COMMENT 'Phone Number',
|
||||
`email` varchar(180) DEFAULT NULL COMMENT 'Email',
|
||||
`avatar_name` varchar(255) DEFAULT NULL COMMENT 'Avatar Address',
|
||||
`avatar_path` varchar(255) DEFAULT NULL COMMENT 'Avatar Real Path',
|
||||
`password` varchar(255) DEFAULT NULL COMMENT 'Password',
|
||||
`is_admin` bit(1) DEFAULT b'0' COMMENT 'Is Admin Account',
|
||||
`enabled` bit(1) DEFAULT NULL COMMENT 'Status: 1 Enabled, 0 Disabled',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`pwd_reset_time` datetime DEFAULT NULL COMMENT 'Password Reset Time',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Date',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Date',
|
||||
PRIMARY KEY (`user_id`) USING BTREE,
|
||||
UNIQUE KEY `uniq_email` (`email`) USING BTREE,
|
||||
UNIQUE KEY `uniq_username` (`username`) USING BTREE,
|
||||
KEY `idx_dept_id` (`dept_id`) USING BTREE,
|
||||
KEY `idx_enabled` (`enabled`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='系统用户';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='System User';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_user
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_user` (`user_id`, `dept_id`, `username`, `nick_name`, `gender`, `phone`, `email`, `avatar_name`, `avatar_path`, `password`, `is_admin`, `enabled`, `create_by`, `update_by`, `pwd_reset_time`, `create_time`, `update_time`) VALUES (1, 2, 'admin', '管理员', '男', '18888888888', '201507802@qq.com', 'avatar-20250114101539224.png', '/Users/jie/Documents/work/me/admin/eladmin-mp/eladmin/~/avatar/avatar-20250114101539224.png', '$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa', b'1', b'1', NULL, 'admin', '2020-05-03 16:38:31', '2018-08-23 09:11:56', '2020-09-05 10:43:31');
|
||||
INSERT INTO `sys_user` (`user_id`, `dept_id`, `username`, `nick_name`, `gender`, `phone`, `email`, `avatar_name`, `avatar_path`, `password`, `is_admin`, `enabled`, `create_by`, `update_by`, `pwd_reset_time`, `create_time`, `update_time`) VALUES (2, 2, 'test', '测试', '男', '19999999999', '231@qq.com', NULL, NULL, '$2a$10$4XcyudOYTSz6fue6KFNMHeUQnCX5jbBQypLEnGk1PmekXt5c95JcK', b'0', b'1', 'admin', 'admin', NULL, '2020-05-05 11:15:49', '2020-09-05 10:43:38');
|
||||
INSERT INTO `sys_user` (`user_id`, `dept_id`, `username`, `nick_name`, `gender`, `phone`, `email`, `avatar_name`, `avatar_path`, `password`, `is_admin`, `enabled`, `create_by`, `update_by`, `pwd_reset_time`, `create_time`, `update_time`) VALUES (1, 2, 'admin', 'Administrator', 'Male', '18888888888', '201507802@qq.com', 'avatar-20250114101539224.png', '/Users/jie/Documents/work/me/admin/eladmin-mp/eladmin/~/avatar/avatar-20250114101539224.png', '$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa', b'1', b'1', NULL, 'admin', '2020-05-03 16:38:31', '2018-08-23 09:11:56', '2020-09-05 10:43:31');
|
||||
INSERT INTO `sys_user` (`user_id`, `dept_id`, `username`, `nick_name`, `gender`, `phone`, `email`, `avatar_name`, `avatar_path`, `password`, `is_admin`, `enabled`, `create_by`, `update_by`, `pwd_reset_time`, `create_time`, `update_time`) VALUES (2, 2, 'test', 'Test', 'Male', '19999999999', '231@qq.com', NULL, NULL, '$2a$10$4XcyudOYTSz6fue6KFNMHeUQnCX5jbBQypLEnGk1PmekXt5c95JcK', b'0', b'1', 'admin', 'admin', NULL, '2020-05-05 11:15:49', '2020-09-05 10:43:38');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -714,12 +714,12 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_users_jobs`;
|
||||
CREATE TABLE `sys_users_jobs` (
|
||||
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||
`job_id` bigint(20) NOT NULL COMMENT '岗位ID',
|
||||
`user_id` bigint(20) NOT NULL COMMENT 'User ID',
|
||||
`job_id` bigint(20) NOT NULL COMMENT 'Job ID',
|
||||
PRIMARY KEY (`user_id`,`job_id`),
|
||||
KEY `idx_user_id` (`user_id`),
|
||||
KEY `idx_job_id` (`job_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='用户与岗位关联表';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='User-Job Association Table';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_users_jobs
|
||||
|
@ -734,12 +734,12 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_users_roles`;
|
||||
CREATE TABLE `sys_users_roles` (
|
||||
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
|
||||
`user_id` bigint(20) NOT NULL COMMENT 'User ID',
|
||||
`role_id` bigint(20) NOT NULL COMMENT 'Role ID',
|
||||
PRIMARY KEY (`user_id`,`role_id`) USING BTREE,
|
||||
KEY `idx_user_id` (`user_id`),
|
||||
KEY `idx_role_id` (`role_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='用户角色关联';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='User-Role Association';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_users_roles
|
||||
|
@ -755,18 +755,18 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `tool_alipay_config`;
|
||||
CREATE TABLE `tool_alipay_config` (
|
||||
`config_id` bigint(20) NOT NULL COMMENT 'ID',
|
||||
`app_id` varchar(255) DEFAULT NULL COMMENT '应用ID',
|
||||
`charset` varchar(255) DEFAULT NULL COMMENT '编码',
|
||||
`format` varchar(255) DEFAULT NULL COMMENT '类型 固定格式json',
|
||||
`gateway_url` varchar(255) DEFAULT NULL COMMENT '网关地址',
|
||||
`notify_url` varchar(255) DEFAULT NULL COMMENT '异步回调',
|
||||
`private_key` text DEFAULT NULL COMMENT '私钥',
|
||||
`public_key` text DEFAULT NULL COMMENT '公钥',
|
||||
`return_url` varchar(255) DEFAULT NULL COMMENT '回调地址',
|
||||
`sign_type` varchar(255) DEFAULT NULL COMMENT '签名方式',
|
||||
`sys_service_provider_id` varchar(255) DEFAULT NULL COMMENT '商户号',
|
||||
`app_id` varchar(255) DEFAULT NULL COMMENT 'App ID',
|
||||
`charset` varchar(255) DEFAULT NULL COMMENT 'Encoding',
|
||||
`format` varchar(255) DEFAULT NULL COMMENT 'Type (fixed format: json)',
|
||||
`gateway_url` varchar(255) DEFAULT NULL COMMENT 'Gateway URL',
|
||||
`notify_url` varchar(255) DEFAULT NULL COMMENT 'Async Callback',
|
||||
`private_key` text DEFAULT NULL COMMENT 'Private Key',
|
||||
`public_key` text DEFAULT NULL COMMENT 'Public Key',
|
||||
`return_url` varchar(255) DEFAULT NULL COMMENT 'Callback URL',
|
||||
`sign_type` varchar(255) DEFAULT NULL COMMENT 'Signature Type',
|
||||
`sys_service_provider_id` varchar(255) DEFAULT NULL COMMENT 'Merchant ID',
|
||||
PRIMARY KEY (`config_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='支付宝配置类';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Alipay Configuration';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of tool_alipay_config
|
||||
|
@ -780,13 +780,13 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `tool_email_config`;
|
||||
CREATE TABLE `tool_email_config` (
|
||||
`config_id` bigint(20) NOT NULL COMMENT 'ID',
|
||||
`from_user` varchar(255) DEFAULT NULL COMMENT '收件人',
|
||||
`host` varchar(255) DEFAULT NULL COMMENT '邮件服务器SMTP地址',
|
||||
`pass` varchar(255) DEFAULT NULL COMMENT '密码',
|
||||
`port` varchar(255) DEFAULT NULL COMMENT '端口',
|
||||
`user` varchar(255) DEFAULT NULL COMMENT '发件者用户名',
|
||||
`from_user` varchar(255) DEFAULT NULL COMMENT 'Sender',
|
||||
`host` varchar(255) DEFAULT NULL COMMENT 'SMTP Server Address',
|
||||
`pass` varchar(255) DEFAULT NULL COMMENT 'Password',
|
||||
`port` varchar(255) DEFAULT NULL COMMENT 'Port',
|
||||
`user` varchar(255) DEFAULT NULL COMMENT 'Sender Username',
|
||||
PRIMARY KEY (`config_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='邮箱配置';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Email Configuration';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of tool_email_config
|
||||
|
@ -800,18 +800,18 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `tool_local_storage`;
|
||||
CREATE TABLE `tool_local_storage` (
|
||||
`storage_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`real_name` varchar(255) DEFAULT NULL COMMENT '文件真实的名称',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '文件名',
|
||||
`suffix` varchar(255) DEFAULT NULL COMMENT '后缀',
|
||||
`path` varchar(255) DEFAULT NULL COMMENT '路径',
|
||||
`type` varchar(255) DEFAULT NULL COMMENT '类型',
|
||||
`size` varchar(100) DEFAULT NULL COMMENT '大小',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`real_name` varchar(255) DEFAULT NULL COMMENT 'Real File Name',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT 'File Name',
|
||||
`suffix` varchar(255) DEFAULT NULL COMMENT 'Suffix',
|
||||
`path` varchar(255) DEFAULT NULL COMMENT 'Path',
|
||||
`type` varchar(255) DEFAULT NULL COMMENT 'Type',
|
||||
`size` varchar(100) DEFAULT NULL COMMENT 'Size',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT 'Created By',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By',
|
||||
`create_time` datetime DEFAULT NULL COMMENT 'Creation Date',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Update Time',
|
||||
PRIMARY KEY (`storage_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='本地存储';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Local Storage';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of tool_local_storage
|
||||
|
@ -826,13 +826,13 @@ DROP TABLE IF EXISTS `tool_qiniu_config`;
|
|||
CREATE TABLE `tool_qiniu_config` (
|
||||
`config_id` bigint(20) NOT NULL COMMENT 'ID',
|
||||
`access_key` text DEFAULT NULL COMMENT 'accessKey',
|
||||
`bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket 识别符',
|
||||
`host` varchar(255) NOT NULL COMMENT '外链域名',
|
||||
`bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket Identifier',
|
||||
`host` varchar(255) NOT NULL COMMENT 'External Domain',
|
||||
`secret_key` text DEFAULT NULL COMMENT 'secretKey',
|
||||
`type` varchar(255) DEFAULT NULL COMMENT '空间类型',
|
||||
`zone` varchar(255) DEFAULT NULL COMMENT '机房',
|
||||
`type` varchar(255) DEFAULT NULL COMMENT 'Space Type',
|
||||
`zone` varchar(255) DEFAULT NULL COMMENT 'Zone',
|
||||
PRIMARY KEY (`config_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='七牛云配置';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Qiniu Cloud Configuration';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of tool_qiniu_config
|
||||
|
@ -846,16 +846,16 @@ COMMIT;
|
|||
DROP TABLE IF EXISTS `tool_qiniu_content`;
|
||||
CREATE TABLE `tool_qiniu_content` (
|
||||
`content_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket 识别符',
|
||||
`name` varchar(180) DEFAULT NULL COMMENT '文件名称',
|
||||
`size` varchar(255) DEFAULT NULL COMMENT '文件大小',
|
||||
`type` varchar(255) DEFAULT NULL COMMENT '文件类型:私有或公开',
|
||||
`url` varchar(255) DEFAULT NULL COMMENT '文件url',
|
||||
`suffix` varchar(255) DEFAULT NULL COMMENT '文件后缀',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '上传或同步的时间',
|
||||
`bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket Identifier',
|
||||
`name` varchar(180) DEFAULT NULL COMMENT 'File Name',
|
||||
`size` varchar(255) DEFAULT NULL COMMENT 'File Size',
|
||||
`type` varchar(255) DEFAULT NULL COMMENT 'File Type: Private or Public',
|
||||
`url` varchar(255) DEFAULT NULL COMMENT 'File URL',
|
||||
`suffix` varchar(255) DEFAULT NULL COMMENT 'File Suffix',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'Upload or Sync Time',
|
||||
PRIMARY KEY (`content_id`) USING BTREE,
|
||||
UNIQUE KEY `uniq_name` (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='七牛云文件存储';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Qiniu Cloud File Storage';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of tool_qiniu_content
|
||||
|
|
Loading…
Reference in New Issue