全局:增加 VO 数据翻译的支持
This commit is contained in:
parent
3e8e3374f9
commit
c1b5670027
@ -30,6 +30,7 @@
|
|||||||
<mybatis-plus-generator.version>3.5.5</mybatis-plus-generator.version>
|
<mybatis-plus-generator.version>3.5.5</mybatis-plus-generator.version>
|
||||||
<dynamic-datasource.version>4.3.0</dynamic-datasource.version>
|
<dynamic-datasource.version>4.3.0</dynamic-datasource.version>
|
||||||
<mybatis-plus-join.version>1.4.10</mybatis-plus-join.version>
|
<mybatis-plus-join.version>1.4.10</mybatis-plus-join.version>
|
||||||
|
<easy-trans.version>2.2.11</easy-trans.version>
|
||||||
<redisson.version>3.18.0</redisson.version> <!-- Spring Boot 2.X 最多使用 3.18.0 版本,否则会报 Tuple NoClassDefFoundError -->
|
<redisson.version>3.18.0</redisson.version> <!-- Spring Boot 2.X 最多使用 3.18.0 版本,否则会报 Tuple NoClassDefFoundError -->
|
||||||
<dm8.jdbc.version>8.1.3.62</dm8.jdbc.version>
|
<dm8.jdbc.version>8.1.3.62</dm8.jdbc.version>
|
||||||
<!-- 消息队列 -->
|
<!-- 消息队列 -->
|
||||||
@ -236,6 +237,32 @@
|
|||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fhs-opensource</groupId> <!-- VO 数据翻译 -->
|
||||||
|
<artifactId>easy-trans-spring-boot-starter</artifactId>
|
||||||
|
<version>${easy-trans.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-context</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-commons</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fhs-opensource</groupId>
|
||||||
|
<artifactId>easy-trans-mybatis-plus-extend</artifactId>
|
||||||
|
<version>${easy-trans.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fhs-opensource</groupId>
|
||||||
|
<artifactId>easy-trans-anno</artifactId>
|
||||||
|
<version>${easy-trans.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.redisson</groupId>
|
<groupId>org.redisson</groupId>
|
||||||
<artifactId>redisson-spring-boot-starter</artifactId>
|
<artifactId>redisson-spring-boot-starter</artifactId>
|
||||||
|
@ -138,6 +138,11 @@
|
|||||||
<artifactId>jsoup</artifactId>
|
<artifactId>jsoup</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fhs-opensource</groupId> <!-- VO 数据翻译 -->
|
||||||
|
<artifactId>easy-trans-anno</artifactId> <!-- 默认引入的原因,方便 xxx-module-api 包使用 -->
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Test 测试相关 -->
|
<!-- Test 测试相关 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
@ -8,9 +8,10 @@ import io.swagger.v3.oas.annotations.Operation;
|
|||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
||||||
@Tag(name = "RPC 服务 - 邮件发送")
|
@Tag(name = "RPC 服务 - 邮件发送")
|
||||||
public interface MailSendApi {
|
public interface MailSendApi {
|
||||||
|
@ -8,9 +8,10 @@ import io.swagger.v3.oas.annotations.Operation;
|
|||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
||||||
@Tag(name = "RPC 服务 - 站内信发送")
|
@Tag(name = "RPC 服务 - 站内信发送")
|
||||||
public interface NotifyMessageSendApi {
|
public interface NotifyMessageSendApi {
|
||||||
|
@ -7,7 +7,7 @@ import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
|||||||
import cn.iocoder.yudao.module.system.enums.ApiConstants;
|
import cn.iocoder.yudao.module.system.enums.ApiConstants;
|
||||||
import com.fhs.core.trans.anno.AutoTrans;
|
import com.fhs.core.trans.anno.AutoTrans;
|
||||||
import com.fhs.trans.service.AutoTransable;
|
import com.fhs.trans.service.AutoTransable;
|
||||||
import feign.FeignIgnore;
|
import feign.RequestLine;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@ -79,13 +79,13 @@ public interface AdminUserApi extends AutoTransable<AdminUserRespDTO> {
|
|||||||
CommonResult<Boolean> validateUserList(@RequestParam("ids") Collection<Long> ids);
|
CommonResult<Boolean> validateUserList(@RequestParam("ids") Collection<Long> ids);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@FeignIgnore
|
@GetMapping("select")
|
||||||
default List<AdminUserRespDTO> selectByIds(List<?> ids) {
|
default List<AdminUserRespDTO> selectByIds(List<?> ids) {
|
||||||
return getUserList(Convert.toList(Long.class, ids)).getCheckedData();
|
return getUserList(Convert.toList(Long.class, ids)).getCheckedData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@FeignIgnore
|
@GetMapping("select-list")
|
||||||
default AdminUserRespDTO selectById(Object id) {
|
default AdminUserRespDTO selectById(Object id) {
|
||||||
return getUser(Convert.toLong(id)).getCheckedData();
|
return getUser(Convert.toLong(id)).getCheckedData();
|
||||||
}
|
}
|
||||||
|
@ -9,10 +9,11 @@ import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO;
|
|||||||
import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2RespDTO;
|
import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2RespDTO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogV2DO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogV2DO;
|
||||||
import cn.iocoder.yudao.module.system.service.logger.OperateLogService;
|
import cn.iocoder.yudao.module.system.service.logger.OperateLogService;
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||||
|
@ -13,15 +13,15 @@ import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO;
|
|||||||
import cn.iocoder.yudao.module.system.service.logger.OperateLogService;
|
import cn.iocoder.yudao.module.system.service.logger.OperateLogService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.Valid;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@ import com.fhs.core.trans.anno.Trans;
|
|||||||
import com.fhs.core.trans.constant.TransType;
|
import com.fhs.core.trans.constant.TransType;
|
||||||
import com.fhs.core.trans.vo.VO;
|
import com.fhs.core.trans.vo.VO;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user