-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/easy-trans' of https://gitee.com/zhijiantianya/…
…ruoyi-vue-pro # Conflicts: # yudao-dependencies/pom.xml # yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApiImpl.java # yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java # yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java
- Loading branch information
Showing
17 changed files
with
134 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...ao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/package-info.java
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
...ain/java/cn/iocoder/yudao/framework/translate/config/YudaoTranslateAutoConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cn.iocoder.yudao.framework.translate.config; | ||
|
||
import cn.iocoder.yudao.framework.translate.core.TranslateUtils; | ||
import com.fhs.trans.service.impl.TransService; | ||
import org.springframework.boot.autoconfigure.AutoConfiguration; | ||
import org.springframework.context.annotation.Bean; | ||
|
||
@AutoConfiguration | ||
public class YudaoTranslateAutoConfiguration { | ||
|
||
@Bean | ||
@SuppressWarnings({"InstantiationOfUtilityClass", "SpringJavaInjectionPointsAutowiringInspection"}) | ||
public TranslateUtils translateUtils(TransService transService) { | ||
TranslateUtils.init(transService); | ||
return new TranslateUtils(); | ||
} | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
...arter-mybatis/src/main/java/cn/iocoder/yudao/framework/translate/core/TranslateUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package cn.iocoder.yudao.framework.translate.core; | ||
|
||
import cn.hutool.core.collection.CollUtil; | ||
import com.fhs.core.trans.vo.VO; | ||
import com.fhs.trans.service.impl.TransService; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* VO 数据翻译 Utils | ||
* | ||
* @author 芋道源码 | ||
*/ | ||
public class TranslateUtils { | ||
|
||
private static TransService transService; | ||
|
||
public static void init(TransService transService) { | ||
TranslateUtils.transService = transService; | ||
} | ||
|
||
/** | ||
* 数据翻译 | ||
* | ||
* 使用场景:无法使用 @TransMethodResult 注解的场景,只能通过手动触发翻译 | ||
* | ||
* @param data 数据 | ||
* @return 翻译结果 | ||
*/ | ||
public static <T extends VO> List<T> translate(List<T> data) { | ||
if (CollUtil.isNotEmpty((data))) { | ||
transService.transBatch(data); | ||
} | ||
return data; | ||
} | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
...boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/translate/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** | ||
* 使用 Easy-Trans 提升使用 VO 数据翻译的开发效率 | ||
*/ | ||
package cn.iocoder.yudao.framework.translate; |
3 changes: 2 additions & 1 deletion
3
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
cn.iocoder.yudao.framework.datasource.config.YudaoDataSourceAutoConfiguration | ||
cn.iocoder.yudao.framework.mybatis.config.YudaoMybatisAutoConfiguration | ||
cn.iocoder.yudao.framework.mybatis.config.YudaoMybatisAutoConfiguration | ||
cn.iocoder.yudao.framework.translate.config.YudaoTranslateAutoConfiguration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ain/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.http
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
### 请求 /system/operate-log/demo 接口 => 成功 | ||
GET {{baseUrl}}/system/operate-log/demo | ||
### 请求 /system/operate-log/page 接口 => 成功 | ||
GET {{baseUrl}}/system/operate-log/page | ||
Authorization: Bearer {{token}} | ||
tenant-id: {{adminTenentId}} |
Oops, something went wrong.