diff --git a/demo/demo-application/src/main/java/cn/iocoder/mall/demo/application/controller/DemoUserController.java b/demo/demo-application/src/main/java/cn/iocoder/mall/demo/application/controller/DemoUserController.java index 0d74a44c4..5feb28a2d 100644 --- a/demo/demo-application/src/main/java/cn/iocoder/mall/demo/application/controller/DemoUserController.java +++ b/demo/demo-application/src/main/java/cn/iocoder/mall/demo/application/controller/DemoUserController.java @@ -4,6 +4,7 @@ import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.mall.demo.application.convert.DemoUserConvert; import cn.iocoder.mall.demo.application.vo.DemoUserVO; import cn.iocoder.mall.demo.rpc.api.DemoUserRpcService; +import cn.iocoder.mall.demo.rpc.dto.DemoUserDTO; import org.apache.dubbo.config.annotation.Reference; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -20,7 +21,7 @@ public class DemoUserController { // TODO 芋艿,这里只是做一个 demo 。实际一般不会这么玩,更多是内嵌的,像 {@link #get(Integer id)} 的情况。 @GetMapping("/get") public CommonResult get(@RequestParam("id") Integer id) { - cn.iocoder.mall.demo.rpc.vo.DemoUserVO user = userRpcService.get(id); + DemoUserDTO user = userRpcService.get(id); return CommonResult.success(DemoUserConvert.INSTANCE.convert(user)); } diff --git a/demo/demo-application/src/main/java/cn/iocoder/mall/demo/application/convert/DemoUserConvert.java b/demo/demo-application/src/main/java/cn/iocoder/mall/demo/application/convert/DemoUserConvert.java index aa6fde944..177d25707 100644 --- a/demo/demo-application/src/main/java/cn/iocoder/mall/demo/application/convert/DemoUserConvert.java +++ b/demo/demo-application/src/main/java/cn/iocoder/mall/demo/application/convert/DemoUserConvert.java @@ -1,6 +1,7 @@ package cn.iocoder.mall.demo.application.convert; import cn.iocoder.mall.demo.application.vo.DemoUserVO; +import cn.iocoder.mall.demo.rpc.dto.DemoUserDTO; import org.mapstruct.Mapper; import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; @@ -11,6 +12,6 @@ public interface DemoUserConvert { DemoUserConvert INSTANCE = Mappers.getMapper(DemoUserConvert.class); @Mappings({}) - DemoUserVO convert(cn.iocoder.mall.demo.rpc.vo.DemoUserVO vo); + DemoUserVO convert(DemoUserDTO vo); } diff --git a/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/api/DemoProductRpcService.java b/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/api/DemoProductRpcService.java index e99647d0d..cb3e132eb 100644 --- a/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/api/DemoProductRpcService.java +++ b/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/api/DemoProductRpcService.java @@ -1,9 +1,9 @@ package cn.iocoder.mall.demo.rpc.api; -import cn.iocoder.mall.demo.rpc.vo.DemoProductVO; +import cn.iocoder.mall.demo.rpc.dto.DemoProductDTO; public interface DemoProductRpcService { - DemoProductVO get(Integer id); + DemoProductDTO get(Integer id); } diff --git a/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/api/DemoUserRpcService.java b/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/api/DemoUserRpcService.java index 0aca7d3ca..02bb34c45 100644 --- a/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/api/DemoUserRpcService.java +++ b/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/api/DemoUserRpcService.java @@ -1,9 +1,9 @@ package cn.iocoder.mall.demo.rpc.api; -import cn.iocoder.mall.demo.rpc.vo.DemoUserVO; +import cn.iocoder.mall.demo.rpc.dto.DemoUserDTO; public interface DemoUserRpcService { - DemoUserVO get(Integer id); + DemoUserDTO get(Integer id); } diff --git a/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/vo/DemoProductVO.java b/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/dto/DemoProductDTO.java similarity index 85% rename from demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/vo/DemoProductVO.java rename to demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/dto/DemoProductDTO.java index 06c0c5bd1..5c10af5de 100644 --- a/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/vo/DemoProductVO.java +++ b/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/dto/DemoProductDTO.java @@ -1,12 +1,12 @@ -package cn.iocoder.mall.demo.rpc.vo; +package cn.iocoder.mall.demo.rpc.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -@ApiModel("Demo 商品 BO") +@ApiModel("Demo 商品 DTO") @Data -public class DemoProductVO { +public class DemoProductDTO { @ApiModelProperty(value = "编号", required = true, example = "1") private Integer id; diff --git a/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/vo/DemoUserVO.java b/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/dto/DemoUserDTO.java similarity index 80% rename from demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/vo/DemoUserVO.java rename to demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/dto/DemoUserDTO.java index e8212f2df..ea8e2fcdb 100644 --- a/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/vo/DemoUserVO.java +++ b/demo/demo-rpc-service-api/src/main/java/cn/iocoder/mall/demo/rpc/dto/DemoUserDTO.java @@ -1,11 +1,11 @@ -package cn.iocoder.mall.demo.rpc.vo; +package cn.iocoder.mall.demo.rpc.dto; import lombok.Data; import lombok.experimental.Accessors; @Data @Accessors(chain = true) -public class DemoUserVO { +public class DemoUserDTO { /** * 用户编号 diff --git a/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/convert/DemoProductConvert.java b/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/convert/DemoProductConvert.java index d0eb97d87..fd5733ef6 100644 --- a/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/convert/DemoProductConvert.java +++ b/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/convert/DemoProductConvert.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.demo.rpc.convert; import cn.iocoder.mall.demo.business.bo.product.DemoProductBO; -import cn.iocoder.mall.demo.rpc.vo.DemoProductVO; +import cn.iocoder.mall.demo.rpc.dto.DemoProductDTO; import org.mapstruct.Mapper; import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; @@ -12,6 +12,6 @@ public interface DemoProductConvert { DemoProductConvert INSTANCE = Mappers.getMapper(DemoProductConvert.class); @Mappings({}) - DemoProductVO convert(DemoProductBO object); + DemoProductDTO convert(DemoProductBO object); } diff --git a/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/convert/DemoUserConvert.java b/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/convert/DemoUserConvert.java index f9d4352cc..e36b9571b 100644 --- a/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/convert/DemoUserConvert.java +++ b/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/convert/DemoUserConvert.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.demo.rpc.convert; import cn.iocoder.mall.demo.business.bo.user.DemoUserBO; -import cn.iocoder.mall.demo.rpc.vo.DemoUserVO; +import cn.iocoder.mall.demo.rpc.dto.DemoUserDTO; import org.mapstruct.Mapper; import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; @@ -12,6 +12,6 @@ public interface DemoUserConvert { DemoUserConvert INSTANCE = Mappers.getMapper(DemoUserConvert.class); @Mappings({}) - DemoUserVO convert(DemoUserBO object); + DemoUserDTO convert(DemoUserBO object); } diff --git a/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/service/DemoProductRpcServiceImpl.java b/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/service/DemoProductRpcServiceImpl.java index 2d74c7841..2425573b1 100644 --- a/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/service/DemoProductRpcServiceImpl.java +++ b/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/service/DemoProductRpcServiceImpl.java @@ -4,7 +4,7 @@ import cn.iocoder.mall.demo.business.api.DemoProductService; import cn.iocoder.mall.demo.business.bo.product.DemoProductBO; import cn.iocoder.mall.demo.rpc.api.DemoProductRpcService; import cn.iocoder.mall.demo.rpc.convert.DemoProductConvert; -import cn.iocoder.mall.demo.rpc.vo.DemoProductVO; +import cn.iocoder.mall.demo.rpc.dto.DemoProductDTO; import org.apache.dubbo.config.annotation.Service; import org.springframework.beans.factory.annotation.Autowired; @@ -15,7 +15,7 @@ public class DemoProductRpcServiceImpl implements DemoProductRpcService { private DemoProductService productService; @Override - public DemoProductVO get(Integer id) { + public DemoProductDTO get(Integer id) { DemoProductBO product = productService.get(id); return DemoProductConvert.INSTANCE.convert(product); } diff --git a/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/service/DemoUserRpcServiceImpl.java b/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/service/DemoUserRpcServiceImpl.java index 776f92ded..94267e185 100644 --- a/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/service/DemoUserRpcServiceImpl.java +++ b/demo/demo-rpc-service/src/main/java/cn/iocoder/mall/demo/rpc/service/DemoUserRpcServiceImpl.java @@ -4,7 +4,7 @@ import cn.iocoder.mall.demo.business.api.DemoUserService; import cn.iocoder.mall.demo.business.bo.user.DemoUserBO; import cn.iocoder.mall.demo.rpc.api.DemoUserRpcService; import cn.iocoder.mall.demo.rpc.convert.DemoUserConvert; -import cn.iocoder.mall.demo.rpc.vo.DemoUserVO; +import cn.iocoder.mall.demo.rpc.dto.DemoUserDTO; import org.apache.dubbo.config.annotation.Service; import org.springframework.beans.factory.annotation.Autowired; @@ -15,7 +15,7 @@ public class DemoUserRpcServiceImpl implements DemoUserRpcService { private DemoUserService demoUserService; @Override - public DemoUserVO get(Integer id) { + public DemoUserDTO get(Integer id) { DemoUserBO userBO = demoUserService.get(id); return DemoUserConvert.INSTANCE.convert(userBO); }