From 7cc4fb427b0ca7bab3fd93fbd2f134b02285e3ce Mon Sep 17 00:00:00 2001 From: vamsikrishnagv Date: Sun, 25 May 2025 08:48:09 -0700 Subject: [PATCH] English Translation phase 1 --- eladmin-common/pom.xml | 4 +- .../java/me/zhengjie/annotation/Query.java | 39 +++++----- .../rest/AnonymousPatchMapping.java | 2 +- .../annotation/rest/AnonymousPutMapping.java | 2 +- .../java/me/zhengjie/aspect/LimitAspect.java | 6 +- .../main/java/me/zhengjie/base/BaseDTO.java | 10 +-- .../java/me/zhengjie/base/BaseMapper.java | 8 +-- .../me/zhengjie/config/AuditorConfig.java | 8 +-- .../zhengjie/config/RemoveDruidAdConfig.java | 14 ++-- .../java/me/zhengjie/utils/EncryptUtils.java | 8 +-- .../me/zhengjie/utils/EncryptUtilsTest.java | 4 +- eladmin-generator/pom.xml | 4 +- .../java/me/zhengjie/domain/ColumnInfo.java | 28 ++++---- .../java/me/zhengjie/domain/GenConfig.java | 20 +++--- .../me/zhengjie/rest/GenConfigController.java | 6 +- .../me/zhengjie/service/GenConfigService.java | 14 ++-- .../me/zhengjie/service/GeneratorService.java | 48 ++++++------- .../main/java/me/zhengjie/utils/ColUtil.java | 8 +-- eladmin-logging/pom.xml | 2 +- .../java/me/zhengjie/aspect/LogAspect.java | 10 +-- .../main/java/me/zhengjie/domain/SysLog.java | 24 +++---- .../me/zhengjie/repository/LogRepository.java | 4 +- .../me/zhengjie/rest/SysLogController.java | 26 +++---- .../me/zhengjie/service/SysLogService.java | 40 +++++------ eladmin-system/pom.xml | 16 ++--- .../src/main/java/me/zhengjie/AppRun.java | 8 +-- .../maint/rest/ServerDeployController.java | 22 +++--- .../me/zhengjie/sysrunner/SystemRunner.java | 2 +- .../src/main/resources/config/application.yml | 44 ++++++------ .../src/main/resources/spy.properties | 20 +++--- .../src/main/resources/template/email.ftl | 6 +- .../src/main/resources/template/taskAlarm.ftl | 18 ++--- eladmin-tools/pom.xml | 10 +-- .../java/me/zhengjie/domain/LocalStorage.java | 12 ++-- .../java/me/zhengjie/domain/QiniuConfig.java | 28 ++++---- .../java/me/zhengjie/domain/QiniuContent.java | 18 ++--- .../me/zhengjie/rest/EmailController.java | 14 ++-- .../zhengjie/rest/LocalStorageController.java | 22 +++--- pom.xml | 40 +++++------ sport/index.vue | 72 +++++++++---------- sport/src/main/java/com/srr/domain/Club.java | 20 +++--- sport/src/main/java/com/srr/domain/Court.java | 6 +- .../src/main/java/com/srr/domain/Player.java | 16 ++--- sport/src/main/java/com/srr/domain/Sport.java | 14 ++-- 44 files changed, 373 insertions(+), 374 deletions(-) diff --git a/eladmin-common/pom.xml b/eladmin-common/pom.xml index e1510a7a..7ee9eefa 100644 --- a/eladmin-common/pom.xml +++ b/eladmin-common/pom.xml @@ -11,10 +11,10 @@ eladmin-common - 公共模块 + Common Module - + cn.hutool hutool-all diff --git a/eladmin-common/src/main/java/me/zhengjie/annotation/Query.java b/eladmin-common/src/main/java/me/zhengjie/annotation/Query.java index 18bc4c4a..744d2b40 100644 --- a/eladmin-common/src/main/java/me/zhengjie/annotation/Query.java +++ b/eladmin-common/src/main/java/me/zhengjie/annotation/Query.java @@ -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 { } } - diff --git a/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPatchMapping.java b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPatchMapping.java index 67d941c0..c6db87de 100644 --- a/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPatchMapping.java +++ b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPatchMapping.java @@ -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 diff --git a/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPutMapping.java b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPutMapping.java index bb2d890e..e014ce7e 100644 --- a/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPutMapping.java +++ b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPutMapping.java @@ -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 diff --git a/eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java b/eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java index 5cc3c6df..08b5351b 100644 --- a/eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java +++ b/eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java @@ -75,15 +75,15 @@ public class LimitAspect { RedisScript 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" + diff --git a/eladmin-common/src/main/java/me/zhengjie/base/BaseDTO.java b/eladmin-common/src/main/java/me/zhengjie/base/BaseDTO.java index 84dad94d..162b43cc 100644 --- a/eladmin-common/src/main/java/me/zhengjie/base/BaseDTO.java +++ b/eladmin-common/src/main/java/me/zhengjie/base/BaseDTO.java @@ -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; diff --git a/eladmin-common/src/main/java/me/zhengjie/base/BaseMapper.java b/eladmin-common/src/main/java/me/zhengjie/base/BaseMapper.java index 6f69b138..4065df05 100644 --- a/eladmin-common/src/main/java/me/zhengjie/base/BaseMapper.java +++ b/eladmin-common/src/main/java/me/zhengjie/base/BaseMapper.java @@ -24,28 +24,28 @@ import java.util.List; public interface BaseMapper { /** - * 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 toEntity(List dtoList); /** - * Entity集合转DTO集合 + * Entity List to DTO List * @param entityList / * @return / */ diff --git a/eladmin-common/src/main/java/me/zhengjie/config/AuditorConfig.java b/eladmin-common/src/main/java/me/zhengjie/config/AuditorConfig.java index d693c58a..2214f1d5 100644 --- a/eladmin-common/src/main/java/me/zhengjie/config/AuditorConfig.java +++ b/eladmin-common/src/main/java/me/zhengjie/config/AuditorConfig.java @@ -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 { /** - * 返回操作员标志信息 + * Return operator identification information * * @return / */ @Override public Optional 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"); } } diff --git a/eladmin-common/src/main/java/me/zhengjie/config/RemoveDruidAdConfig.java b/eladmin-common/src/main/java/me/zhengjie/config/RemoveDruidAdConfig.java index 8757ead1..b61682e3 100644 --- a/eladmin-common/src/main/java/me/zhengjie/config/RemoveDruidAdConfig.java +++ b/eladmin-common/src/main/java/me/zhengjie/config/RemoveDruidAdConfig.java @@ -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("
", ""); text = text.replaceAll("powered by.*?shrek.wang", ""); httpResponse.setContentType("application/javascript"); diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java b/eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java index 83bf918f..05564ed1 100644 --- a/eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java +++ b/eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java @@ -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) { diff --git a/eladmin-common/src/test/java/me/zhengjie/utils/EncryptUtilsTest.java b/eladmin-common/src/test/java/me/zhengjie/utils/EncryptUtilsTest.java index 3ec73752..85d7fb7c 100644 --- a/eladmin-common/src/test/java/me/zhengjie/utils/EncryptUtilsTest.java +++ b/eladmin-common/src/test/java/me/zhengjie/utils/EncryptUtilsTest.java @@ -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() { diff --git a/eladmin-generator/pom.xml b/eladmin-generator/pom.xml index 46b8e757..c4a8f455 100644 --- a/eladmin-generator/pom.xml +++ b/eladmin-generator/pom.xml @@ -8,7 +8,7 @@ 4.0.0 eladmin-generator - 代码生成模块 + Code Generation Module 1.10 @@ -21,7 +21,7 @@ 2.7
- + org.springframework.boot spring-boot-starter-freemarker diff --git a/eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java b/eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java index fddc1993..992ee998 100644 --- a/eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java +++ b/eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java @@ -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) { diff --git a/eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java b/eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java index 47e87d31..6daca39a 100644 --- a/eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java +++ b/eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java @@ -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; } diff --git a/eladmin-generator/src/main/java/me/zhengjie/rest/GenConfigController.java b/eladmin-generator/src/main/java/me/zhengjie/rest/GenConfigController.java index 85a2a4bb..c4de71f1 100644 --- a/eladmin-generator/src/main/java/me/zhengjie/rest/GenConfigController.java +++ b/eladmin-generator/src/main/java/me/zhengjie/rest/GenConfigController.java @@ -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 queryGenConfig(@PathVariable String tableName){ return new ResponseEntity<>(genConfigService.find(tableName), HttpStatus.OK); } @PutMapping - @ApiOperation("修改") + @ApiOperation("Update") public ResponseEntity updateGenConfig(@Validated @RequestBody GenConfig genConfig){ return new ResponseEntity<>(genConfigService.update(genConfig.getTableName(), genConfig),HttpStatus.OK); } diff --git a/eladmin-generator/src/main/java/me/zhengjie/service/GenConfigService.java b/eladmin-generator/src/main/java/me/zhengjie/service/GenConfigService.java index 175439ab..85d77ef7 100644 --- a/eladmin-generator/src/main/java/me/zhengjie/service/GenConfigService.java +++ b/eladmin-generator/src/main/java/me/zhengjie/service/GenConfigService.java @@ -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); } diff --git a/eladmin-generator/src/main/java/me/zhengjie/service/GeneratorService.java b/eladmin-generator/src/main/java/me/zhengjie/service/GeneratorService.java index 6e59160a..e34d61cc 100644 --- a/eladmin-generator/src/main/java/me/zhengjie/service/GeneratorService.java +++ b/eladmin-generator/src/main/java/me/zhengjie/service/GeneratorService.java @@ -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 getTables(String name, int[] startEnd); /** - * 得到数据表的元数据 - * @param name 表名 + * Get table metadata + * @param name Table name * @return / */ List getColumns(String name); /** - * 同步表数据 - * @param columnInfos / - * @param columnInfoList / + * Synchronize table data + * @param columnInfos + * @param columnInfoList */ void sync(List columnInfos, List columnInfoList); /** - * 保持数据 - * @param columnInfos / + * Save data + * @param columnInfos */ void save(List 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 columns); /** - * 预览 - * @param genConfig 配置信息 - * @param columns 字段信息 + * Preview + * @param genConfig Configuration information + * @param columns Field information * @return / */ ResponseEntity preview(GenConfig genConfig, List 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 columns, HttpServletRequest request, HttpServletResponse response); /** - * 查询数据库的表字段数据数据 - * @param table / + * Query database table field data + * @param table * @return / */ List query(String table); diff --git a/eladmin-generator/src/main/java/me/zhengjie/utils/ColUtil.java b/eladmin-generator/src/main/java/me/zhengjie/utils/ColUtil.java index cee76364..4eb888cb 100644 --- a/eladmin-generator/src/main/java/me/zhengjie/utils/ColUtil.java +++ b/eladmin-generator/src/main/java/me/zhengjie/utils/ColUtil.java @@ -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 { diff --git a/eladmin-logging/pom.xml b/eladmin-logging/pom.xml index db4808cb..7b3d9ada 100644 --- a/eladmin-logging/pom.xml +++ b/eladmin-logging/pom.xml @@ -8,7 +8,7 @@ 4.0.0 eladmin-logging - 日志模块 + Logging Module diff --git a/eladmin-logging/src/main/java/me/zhengjie/aspect/LogAspect.java b/eladmin-logging/src/main/java/me/zhengjie/aspect/LogAspect.java index b091d7ba..f37fda68 100644 --- a/eladmin-logging/src/main/java/me/zhengjie/aspect/LogAspect.java +++ b/eladmin-logging/src/main/java/me/zhengjie/aspect/LogAspect.java @@ -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() { diff --git a/eladmin-logging/src/main/java/me/zhengjie/domain/SysLog.java b/eladmin-logging/src/main/java/me/zhengjie/domain/SysLog.java index f15a333c..c1563152 100644 --- a/eladmin-logging/src/main/java/me/zhengjie/domain/SysLog.java +++ b/eladmin-logging/src/main/java/me/zhengjie/domain/SysLog.java @@ -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; diff --git a/eladmin-logging/src/main/java/me/zhengjie/repository/LogRepository.java b/eladmin-logging/src/main/java/me/zhengjie/repository/LogRepository.java index 5a68c1c5..67b8c769 100644 --- a/eladmin-logging/src/main/java/me/zhengjie/repository/LogRepository.java +++ b/eladmin-logging/src/main/java/me/zhengjie/repository/LogRepository.java @@ -30,8 +30,8 @@ import org.springframework.stereotype.Repository; public interface LogRepository extends JpaRepository, JpaSpecificationExecutor { /** - * 根据日志类型删除信息 - * @param logType 日志类型 + * Delete information by log type + * @param logType Log type */ @Modifying @Query(value = "delete from sys_log where log_type = ?1", nativeQuery = true) diff --git a/eladmin-logging/src/main/java/me/zhengjie/rest/SysLogController.java b/eladmin-logging/src/main/java/me/zhengjie/rest/SysLogController.java index 59dc4f80..8c81b82f 100644 --- a/eladmin-logging/src/main/java/me/zhengjie/rest/SysLogController.java +++ b/eladmin-logging/src/main/java/me/zhengjie/rest/SysLogController.java @@ -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 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> 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 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 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 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 delAllInfoLog(){ sysLogService.delAllByInfo(); diff --git a/eladmin-logging/src/main/java/me/zhengjie/service/SysLogService.java b/eladmin-logging/src/main/java/me/zhengjie/service/SysLogService.java index c4a873fe..3f38379f 100644 --- a/eladmin-logging/src/main/java/me/zhengjie/service/SysLogService.java +++ b/eladmin-logging/src/main/java/me/zhengjie/service/SysLogService.java @@ -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 queryAll(SysLogQueryCriteria criteria); /** - * 查询用户日志 - * @param criteria 查询条件 - * @param pageable 分页参数 - * @return - + * Query user logs + * @param criteria Query criteria + * @param pageable Pagination parameters + * @return / */ PageResult 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 sysLogs, HttpServletResponse response) throws IOException; /** - * 删除所有错误日志 + * Delete all error logs */ void delAllByError(); /** - * 删除所有INFO日志 + * Delete all INFO logs */ void delAllByInfo(); } diff --git a/eladmin-system/pom.xml b/eladmin-system/pom.xml index 2a295953..fb51fb3f 100644 --- a/eladmin-system/pom.xml +++ b/eladmin-system/pom.xml @@ -8,16 +8,16 @@ 4.0.0 eladmin-system - 核心模块 + Core Module 0.11.5 - + 5.8.0 - + me.zhengjie eladmin-generator @@ -30,7 +30,7 @@ - + me.zhengjie eladmin-tools @@ -65,7 +65,7 @@ ${jjwt.version} - + ch.ethz.ganymed ganymed-ssh2 @@ -77,7 +77,7 @@ 0.1.55 - + com.github.oshi oshi-core @@ -85,14 +85,14 @@ - + org.springframework.boot spring-boot-maven-plugin - + org.apache.maven.plugins maven-surefire-plugin diff --git a/eladmin-system/src/main/java/me/zhengjie/AppRun.java b/eladmin-system/src/main/java/me/zhengjie/AppRun.java index 69120a72..466fbb96 100644 --- a/eladmin-system/src/main/java/me/zhengjie/AppRun.java +++ b/eladmin-system/src/main/java/me/zhengjie/AppRun.java @@ -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 / */ diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/ServerDeployController.java b/eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/ServerDeployController.java index 5fde7be6..63e4d5e2 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/ServerDeployController.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/ServerDeployController.java @@ -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> 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 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 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 deleteServerDeploy(@RequestBody Set 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 testConnectServerDeploy(@Validated @RequestBody ServerDeploy resources){ diff --git a/eladmin-system/src/main/java/me/zhengjie/sysrunner/SystemRunner.java b/eladmin-system/src/main/java/me/zhengjie/sysrunner/SystemRunner.java index b69aba26..58c9287f 100644 --- a/eladmin-system/src/main/java/me/zhengjie/sysrunner/SystemRunner.java +++ b/eladmin-system/src/main/java/me/zhengjie/sysrunner/SystemRunner.java @@ -23,7 +23,7 @@ import org.springframework.stereotype.Component; /** * @author Zheng Jie - * @description 程序启动后处理数据 + * @description Process data after program startup * @date 2025-01-13 **/ @Slf4j diff --git a/eladmin-system/src/main/resources/config/application.yml b/eladmin-system/src/main/resources/config/application.yml index 2a263e3b..7190fcc8 100644 --- a/eladmin-system/src/main/resources/config/application.yml +++ b/eladmin-system/src/main/resources/config/application.yml @@ -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== \ No newline at end of file diff --git a/eladmin-system/src/main/resources/spy.properties b/eladmin-system/src/main/resources/spy.properties index fc814804..065e1019 100644 --- a/eladmin-system/src/main/resources/spy.properties +++ b/eladmin-system/src/main/resources/spy.properties @@ -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 \ No newline at end of file diff --git a/eladmin-system/src/main/resources/template/email.ftl b/eladmin-system/src/main/resources/template/email.ftl index 606d490e..f56da54e 100644 --- a/eladmin-system/src/main/resources/template/email.ftl +++ b/eladmin-system/src/main/resources/template/email.ftl @@ -19,8 +19,8 @@ margin-top: 20px; border: 1px solid #eee;">
-

尊敬的用户,您好:

-

您正在申请邮箱验证,您的验证码为:

+

Dear user, hello:

+

You are applying for email verification, your verification code is:

- Copyright ©${.now?string("yyyy")} ELADMIN 后台管理系统 All Rights Reserved. + Copyright ©${.now?string("yyyy")} ELADMIN Backend Management System All Rights Reserved.

diff --git a/eladmin-system/src/main/resources/template/taskAlarm.ftl b/eladmin-system/src/main/resources/template/taskAlarm.ftl index a29b0780..785c1e81 100644 --- a/eladmin-system/src/main/resources/template/taskAlarm.ftl +++ b/eladmin-system/src/main/resources/template/taskAlarm.ftl @@ -18,15 +18,15 @@ padding: 20px; border: 1px solid #eee;">
-

任务信息:

+

Task Information:

- - - - - - + + + + + + @@ -39,7 +39,7 @@
任务名称Bean名称执行方法参数内容Cron表达式描述内容Task NameBean NameExecution MethodParameter ContentCron ExpressionDescription
${task.jobName}
-

异常信息:

+

Exception Information:

-            Copyright ©${.now?string("yyyy")} ELADMIN 后台管理系统 All Rights Reserved.
+            Copyright ©${.now?string("yyyy")} ELADMIN Backend Management System All Rights Reserved.
         
diff --git a/eladmin-tools/pom.xml b/eladmin-tools/pom.xml index 24cd54cd..5801c74d 100644 --- a/eladmin-tools/pom.xml +++ b/eladmin-tools/pom.xml @@ -8,7 +8,7 @@ 4.0.0 eladmin-tools - 工具模块 + Tools Module 1.4.7 @@ -17,28 +17,28 @@ - + me.zhengjie eladmin-logging 2.7 - + javax.mail mail ${mail.version} - + com.qiniu qiniu-java-sdk ${qiniu.version} - + com.alipay.sdk alipay-sdk-java diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/LocalStorage.java b/eladmin-tools/src/main/java/me/zhengjie/domain/LocalStorage.java index 51d5cf6c..cfc853e7 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/domain/LocalStorage.java +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/LocalStorage.java @@ -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) { diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuConfig.java b/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuConfig.java index f9140b1d..34d14c3a 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuConfig.java +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuConfig.java @@ -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"; } diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuContent.java b/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuContent.java index b7511db0..9143036d 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuContent.java +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuContent.java @@ -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; } diff --git a/eladmin-tools/src/main/java/me/zhengjie/rest/EmailController.java b/eladmin-tools/src/main/java/me/zhengjie/rest/EmailController.java index 9ce5258c..e983470e 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/rest/EmailController.java +++ b/eladmin-tools/src/main/java/me/zhengjie/rest/EmailController.java @@ -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 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 sendEmail(@Validated @RequestBody EmailVo emailVo){ emailService.send(emailVo,emailService.find()); return new ResponseEntity<>(HttpStatus.OK); diff --git a/eladmin-tools/src/main/java/me/zhengjie/rest/LocalStorageController.java b/eladmin-tools/src/main/java/me/zhengjie/rest/LocalStorageController.java index beb0ec3c..c876d5b8 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/rest/LocalStorageController.java +++ b/eladmin-tools/src/main/java/me/zhengjie/rest/LocalStorageController.java @@ -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> 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 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 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 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 deleteFile(@RequestBody Long[] ids) { localStorageService.deleteAll(ids); return new ResponseEntity<>(HttpStatus.OK); diff --git a/pom.xml b/pom.xml index cb0c6d03..f636015f 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ sport - ELADMIN 后台管理 + ELADMIN Admin Backend https://eladmin.vip @@ -37,7 +37,7 @@ - + org.springframework.boot spring-boot-starter-data-jpa @@ -49,12 +49,12 @@ spring-boot-starter-websocket - + org.springframework.boot spring-boot-starter-web - + org.springframework.boot spring-boot-starter-json @@ -62,20 +62,20 @@ - + org.springframework.boot spring-boot-starter-test test - + org.springframework.boot spring-boot-starter-security - + org.springframework.boot spring-boot-starter-cache @@ -94,7 +94,7 @@ 3.17.1 - + org.apache.commons @@ -106,20 +106,20 @@ commons-lang3 - + p6spy p6spy 3.9.1 - + com.github.xiaoymin knife4j-spring-boot-starter 3.0.3 - + io.swagger swagger-annotations @@ -127,14 +127,14 @@ - + io.swagger swagger-annotations 1.5.22 - + com.mysql mysql-connector-j @@ -142,28 +142,28 @@ runtime - + com.alibaba druid-spring-boot-starter ${druid.version} - + net.dreamlu mica-ip2region 2.7.18.9 - + org.projectlombok lombok true - + org.apache.poi poi @@ -193,7 +193,7 @@ ${fastjson2.version} - + com.github.whvcse easy-captcha @@ -206,7 +206,7 @@ 1.13.0 - + org.mapstruct mapstruct @@ -233,7 +233,7 @@ - + org.apache.maven.plugins maven-surefire-plugin diff --git a/sport/index.vue b/sport/index.vue index 9998e685..8dfdd8a2 100644 --- a/sport/index.vue +++ b/sport/index.vue @@ -1,64 +1,64 @@