Browse Source

feign替换dubbo

woody 1 year ago
parent
commit
3b136fec1f
37 changed files with 504 additions and 498 deletions
  1. 13 13
      pom.xml
  2. 4 0
      src/main/java/com/chelvc/cloud/admin/AdminServer.java
  3. 3 4
      src/main/java/com/chelvc/cloud/admin/controller/AuthorizeController.java
  4. 17 17
      src/main/java/com/chelvc/cloud/admin/controller/CarouselImagesController.java
  5. 18 19
      src/main/java/com/chelvc/cloud/admin/controller/CategoryController.java
  6. 17 17
      src/main/java/com/chelvc/cloud/admin/controller/CommissionConfigController.java
  7. 23 17
      src/main/java/com/chelvc/cloud/admin/controller/CouponController.java
  8. 35 32
      src/main/java/com/chelvc/cloud/admin/controller/DynamicCommentController.java
  9. 24 19
      src/main/java/com/chelvc/cloud/admin/controller/DynamicContentController.java
  10. 14 13
      src/main/java/com/chelvc/cloud/admin/controller/EmployeeController.java
  11. 16 21
      src/main/java/com/chelvc/cloud/admin/controller/FeedbackController.java
  12. 28 23
      src/main/java/com/chelvc/cloud/admin/controller/GoodsController.java
  13. 19 20
      src/main/java/com/chelvc/cloud/admin/controller/HelpCategoryController.java
  14. 17 17
      src/main/java/com/chelvc/cloud/admin/controller/HelpController.java
  15. 14 14
      src/main/java/com/chelvc/cloud/admin/controller/InviteUserController.java
  16. 11 9
      src/main/java/com/chelvc/cloud/admin/controller/LoginController.java
  17. 12 12
      src/main/java/com/chelvc/cloud/admin/controller/MenuController.java
  18. 18 16
      src/main/java/com/chelvc/cloud/admin/controller/MerchantAuthController.java
  19. 29 30
      src/main/java/com/chelvc/cloud/admin/controller/MerchantController.java
  20. 15 15
      src/main/java/com/chelvc/cloud/admin/controller/NoticeController.java
  21. 17 15
      src/main/java/com/chelvc/cloud/admin/controller/OrderController.java
  22. 13 14
      src/main/java/com/chelvc/cloud/admin/controller/ProfitRatioConfigController.java
  23. 12 11
      src/main/java/com/chelvc/cloud/admin/controller/ProfitRatioController.java
  24. 13 15
      src/main/java/com/chelvc/cloud/admin/controller/RankAwardConfigController.java
  25. 10 12
      src/main/java/com/chelvc/cloud/admin/controller/RankAwardRecordController.java
  26. 19 15
      src/main/java/com/chelvc/cloud/admin/controller/ReservationController.java
  27. 16 16
      src/main/java/com/chelvc/cloud/admin/controller/RoleController.java
  28. 26 32
      src/main/java/com/chelvc/cloud/admin/controller/UserController.java
  29. 1 1
      src/main/java/com/chelvc/cloud/admin/copier/EmployeeCopier.java
  30. 1 1
      src/main/java/com/chelvc/cloud/admin/copier/UserCopier.java
  31. 6 4
      src/main/resources/application-dev.yml
  32. 6 4
      src/main/resources/application-pre.yml
  33. 6 4
      src/main/resources/application-prod.yml
  34. 6 4
      src/main/resources/application-test.yml
  35. 1 17
      src/main/resources/application.yml
  36. 0 0
      src/main/resources/config.properties
  37. 4 5
      src/main/resources/logback-spring.xml

+ 13 - 13
pom.xml

@@ -6,7 +6,7 @@
 
     <parent>
         <groupId>com.chelvc.framework</groupId>
-        <artifactId>framework-cloud-nacos-dubbo</artifactId>
+        <artifactId>framework-cloud-nacos-feign</artifactId>
         <version>1.0.0-RELEASE</version>
         <relativePath/>
     </parent>
@@ -16,36 +16,31 @@
     <version>1.0.0-SNAPSHOT</version>
 
     <properties>
-        <uc-api.version>1.0.0-SNAPSHOT</uc-api.version>
-        <vehicle-api.version>1.0.0-SNAPSHOT</vehicle-api.version>
+        <user-client.version>1.0.0-SNAPSHOT</user-client.version>
+        <vehicle-client.version>1.0.0-SNAPSHOT</vehicle-client.version>
         <framework-sms.version>1.0.0-RELEASE</framework-sms.version>
         <framework-redis.version>1.0.0-RELEASE</framework-redis.version>
         <framework-oauth.version>1.0.0-RELEASE</framework-oauth.version>
-        <framework-security.version>1.0.0-RELEASE</framework-security.version>
         <framework-upload.version>1.0.0-RELEASE</framework-upload.version>
+        <framework-security.version>1.0.0-RELEASE</framework-security.version>
     </properties>
 
     <dependencies>
         <dependency>
             <groupId>com.chelvc.cloud</groupId>
-            <artifactId>uc-api</artifactId>
-            <version>${uc-api.version}</version>
+            <artifactId>user-client</artifactId>
+            <version>${user-client.version}</version>
         </dependency>
         <dependency>
             <groupId>com.chelvc.cloud</groupId>
-            <artifactId>vehicle-api</artifactId>
-            <version>${vehicle-api.version}</version>
+            <artifactId>vehicle-client</artifactId>
+            <version>${vehicle-client.version}</version>
         </dependency>
         <dependency>
             <groupId>com.chelvc.framework</groupId>
             <artifactId>framework-sms</artifactId>
             <version>${framework-sms.version}</version>
         </dependency>
-        <dependency>
-            <groupId>com.chelvc.framework</groupId>
-            <artifactId>framework-upload</artifactId>
-            <version>${framework-upload.version}</version>
-        </dependency>
         <dependency>
             <groupId>com.chelvc.framework</groupId>
             <artifactId>framework-redis</artifactId>
@@ -56,6 +51,11 @@
             <artifactId>framework-oauth</artifactId>
             <version>${framework-oauth.version}</version>
         </dependency>
+        <dependency>
+            <groupId>com.chelvc.framework</groupId>
+            <artifactId>framework-upload</artifactId>
+            <version>${framework-upload.version}</version>
+        </dependency>
         <dependency>
             <groupId>com.chelvc.framework</groupId>
             <artifactId>framework-security</artifactId>

+ 4 - 0
src/main/java/com/chelvc/cloud/admin/AdminServer.java

@@ -2,6 +2,8 @@ package com.chelvc.cloud.admin;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
 
 /**
  * 后台管理服务启动类
@@ -9,6 +11,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
  * @author Woody
  * @date 2021/10/20
  */
+@EnableDiscoveryClient
+@EnableFeignClients(basePackages = "com.chelvc")
 @SpringBootApplication(scanBasePackages = "com.chelvc")
 public class AdminServer {
     public static void main(String[] args) {

+ 3 - 4
src/main/java/com/chelvc/cloud/admin/controller/AuthorizeController.java

@@ -3,9 +3,9 @@ package com.chelvc.cloud.admin.controller;
 import javax.validation.Valid;
 
 import com.chelvc.cloud.admin.param.MobileParam;
-import com.chelvc.cloud.uc.api.AuthorizeClient;
-import com.chelvc.cloud.uc.api.model.Authorization;
-import com.chelvc.cloud.uc.api.param.AuthorizeParam;
+import com.chelvc.cloud.user.client.AuthorizeClient;
+import com.chelvc.cloud.user.client.model.Authorization;
+import com.chelvc.cloud.user.client.param.AuthorizeParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.oauth.annotation.Authorize;
 import com.chelvc.framework.sms.CaptchaSmsHandler;
@@ -28,7 +28,6 @@ import org.springframework.web.bind.annotation.RestController;
 @RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class AuthorizeController {
     private final AuthorizeClient authorizeClient;
-
     private final CaptchaSmsHandler captchaSmsHandler;
 
     /**

+ 17 - 17
src/main/java/com/chelvc/cloud/admin/controller/CarouselImagesController.java

@@ -1,13 +1,16 @@
 package com.chelvc.cloud.admin.controller;
 
-import com.chelvc.cloud.vehicle.api.dto.CarouselImagesDTO;
-import com.chelvc.cloud.vehicle.api.param.CarouselImagesModifyParam;
-import com.chelvc.cloud.vehicle.api.param.CarouselImagesPagingParam;
-import com.chelvc.cloud.vehicle.api.service.CarouselImagesService;
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+
+import com.chelvc.cloud.vehicle.client.CarouselImagesClient;
+import com.chelvc.cloud.vehicle.client.dto.CarouselImagesDTO;
+import com.chelvc.cloud.vehicle.client.param.CarouselImagesModifyParam;
+import com.chelvc.cloud.vehicle.client.param.CarouselImagesPagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -16,9 +19,6 @@ import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
-import javax.validation.constraints.Min;
-
 /**
  * 轮播图接口
  *
@@ -28,9 +28,9 @@ import javax.validation.constraints.Min;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class CarouselImagesController {
-    @DubboReference
-    private CarouselImagesService carouselImagesService;
+    private final CarouselImagesClient carouselImagesClient;
 
     /**
      * 新增轮播图
@@ -40,7 +40,7 @@ public class CarouselImagesController {
      */
     @PostMapping("/carouselImages")
     public Long addCarouselImages(@RequestBody @Valid CarouselImagesModifyParam param) {
-        return this.carouselImagesService.addCarouselImages(param);
+        return this.carouselImagesClient.addCarouselImages(param);
     }
 
     /**
@@ -51,18 +51,18 @@ public class CarouselImagesController {
      */
     @PutMapping("/carouselImages/{id}")
     public void updateCarouselImages(@PathVariable("id") @Min(value = 1, message = "轮播图主键不能小于1") Long id,
-                               @RequestBody @Valid CarouselImagesModifyParam param) {
-        this.carouselImagesService.updateCarouselImages(id, param);
+                                     @RequestBody @Valid CarouselImagesModifyParam param) {
+        this.carouselImagesClient.updateCarouselImages(id, param);
     }
 
     /**
      * 删除轮播图
      *
-     * @param id    轮播图主键
+     * @param id 轮播图主键
      */
     @PutMapping("/carouselImages/delete/{id}")
     public void deleteCarouselImages(@PathVariable("id") @Min(value = 1, message = "轮播图主键不能小于1") Long id) {
-        this.carouselImagesService.deleteCarouselImages(id);
+        this.carouselImagesClient.deleteCarouselImages(id);
     }
 
     /**
@@ -73,6 +73,6 @@ public class CarouselImagesController {
      */
     @GetMapping("/carouselImages/paging")
     public Pagination<CarouselImagesDTO> getCarouselImagesPaging(@Valid CarouselImagesPagingParam param) {
-        return this.carouselImagesService.getCarouselImagesPaging(param);
+        return this.carouselImagesClient.getCarouselImagesPaging(param);
     }
 }

+ 18 - 19
src/main/java/com/chelvc/cloud/admin/controller/CategoryController.java

@@ -1,17 +1,18 @@
 package com.chelvc.cloud.admin.controller;
 
+import java.util.List;
 import javax.validation.Valid;
 import javax.validation.constraints.Min;
 
-import com.chelvc.cloud.vehicle.api.dto.CategoryDTO;
-import com.chelvc.cloud.vehicle.api.param.CategoryListParam;
-import com.chelvc.cloud.vehicle.api.param.CategoryModifyParam;
-import com.chelvc.cloud.vehicle.api.param.CategoryPagingParam;
-import com.chelvc.cloud.vehicle.api.service.CategoryService;
+import com.chelvc.cloud.vehicle.client.CategoryClient;
+import com.chelvc.cloud.vehicle.client.dto.CategoryDTO;
+import com.chelvc.cloud.vehicle.client.param.CategoryListParam;
+import com.chelvc.cloud.vehicle.client.param.CategoryModifyParam;
+import com.chelvc.cloud.vehicle.client.param.CategoryPagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -20,8 +21,6 @@ import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.List;
-
 /**
  * 分类接口
  *
@@ -31,9 +30,9 @@ import java.util.List;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class CategoryController {
-    @DubboReference
-    private CategoryService categoryService;
+    private final CategoryClient categoryClient;
 
     /**
      * 新增分类
@@ -43,7 +42,7 @@ public class CategoryController {
      */
     @PostMapping("/category")
     public Long addCategory(@RequestBody @Valid CategoryModifyParam param) {
-        return this.categoryService.addCategory(param);
+        return this.categoryClient.addCategory(param);
     }
 
     /**
@@ -55,7 +54,7 @@ public class CategoryController {
     @PutMapping("/category/{id}")
     public void updateCategory(@PathVariable("id") @Min(value = 1, message = "分类主键不能小于1") Long id,
                                @RequestBody @Valid CategoryModifyParam param) {
-        this.categoryService.updateCategory(id, param);
+        this.categoryClient.updateCategory(id, param);
     }
 
     /**
@@ -66,18 +65,18 @@ public class CategoryController {
      */
     @GetMapping("/category/paging")
     public Pagination<CategoryDTO> getCategoryPaging(@Valid CategoryPagingParam param) {
-        return this.categoryService.getCategoryPaging(param);
+        return this.categoryClient.getCategoryPaging(param);
     }
 
 
     /**
      * 删除分类
      *
-     * @param id    分类主键
+     * @param id 分类主键
      */
     @GetMapping("/category/delete/{id}")
     public void deleteCategory(@PathVariable("id") @Min(value = 1, message = "分类主键不能小于1") Long id) {
-        this.categoryService.deleteCategory(id);
+        this.categoryClient.deleteCategory(id);
     }
 
     /**
@@ -87,7 +86,7 @@ public class CategoryController {
      */
     @PostMapping("/categories")
     public List<CategoryDTO> listCategories(@RequestBody @Valid CategoryListParam param) {
-        return this.categoryService.listActiveCategories(param);
+        return this.categoryClient.listActiveCategories(param);
     }
 
     /**
@@ -97,7 +96,7 @@ public class CategoryController {
      */
     @PostMapping("/getRootCategories")
     public List<CategoryDTO> getRootCategories(@RequestBody @Valid CategoryListParam param) {
-        return this.categoryService.getRootCategories(param);
+        return this.categoryClient.getRootCategories(param);
     }
 
 
@@ -108,6 +107,6 @@ public class CategoryController {
      */
     @PostMapping("/getParentCategories")
     public List<CategoryDTO> getParentCategories(@RequestBody @Valid CategoryListParam param) {
-        return this.categoryService.getParentCategories(param);
+        return this.categoryClient.getParentCategories(param);
     }
 }

+ 17 - 17
src/main/java/com/chelvc/cloud/admin/controller/CommissionConfigController.java

@@ -1,13 +1,16 @@
 package com.chelvc.cloud.admin.controller;
 
-import com.chelvc.cloud.vehicle.api.dto.CommissionConfigDTO;
-import com.chelvc.cloud.vehicle.api.param.CommissionConfigModifyParam;
-import com.chelvc.cloud.vehicle.api.param.CommissionConfigPagingParam;
-import com.chelvc.cloud.vehicle.api.service.CommissionConfigService;
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+
+import com.chelvc.cloud.vehicle.client.CommissionConfigClient;
+import com.chelvc.cloud.vehicle.client.dto.CommissionConfigDTO;
+import com.chelvc.cloud.vehicle.client.param.CommissionConfigModifyParam;
+import com.chelvc.cloud.vehicle.client.param.CommissionConfigPagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -16,9 +19,6 @@ import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
-import javax.validation.constraints.Min;
-
 /**
  * 抽成比列接口接口
  *
@@ -28,9 +28,9 @@ import javax.validation.constraints.Min;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class CommissionConfigController {
-    @DubboReference
-    private CommissionConfigService commissionConfigService;
+    private final CommissionConfigClient commissionConfigClient;
 
     /**
      * 新增抽成比列
@@ -40,7 +40,7 @@ public class CommissionConfigController {
      */
     @PostMapping("/commissionConfig")
     public Long addCommissionConfig(@RequestBody @Valid CommissionConfigModifyParam param) {
-        return this.commissionConfigService.addCommissionConfig(param);
+        return this.commissionConfigClient.addCommissionConfig(param);
     }
 
     /**
@@ -51,18 +51,18 @@ public class CommissionConfigController {
      */
     @PutMapping("/commissionConfig/{id}")
     public void updateCommissionConfig(@PathVariable("id") @Min(value = 1, message = "轮播图主键不能小于1") Long id,
-                               @RequestBody @Valid CommissionConfigModifyParam param) {
-        this.commissionConfigService.updateCommissionConfig(id, param);
+                                       @RequestBody @Valid CommissionConfigModifyParam param) {
+        this.commissionConfigClient.updateCommissionConfig(id, param);
     }
 
     /**
      * 删除抽成比列
      *
-     * @param id    抽成比列主键
+     * @param id 抽成比列主键
      */
     @PutMapping("/commissionConfig/delete/{id}")
     public void deleteCommissionConfig(@PathVariable("id") @Min(value = 1, message = "轮播图主键不能小于1") Long id) {
-        this.commissionConfigService.deleteCommissionConfig(id);
+        this.commissionConfigClient.deleteCommissionConfig(id);
     }
 
     /**
@@ -73,6 +73,6 @@ public class CommissionConfigController {
      */
     @GetMapping("/CommissionConfig/paging")
     public Pagination<CommissionConfigDTO> getCommissionConfigPaging(@Valid CommissionConfigPagingParam param) {
-        return this.commissionConfigService.getCommissionConfigPaging(param);
+        return this.commissionConfigClient.getCommissionConfigPaging(param);
     }
 }

+ 23 - 17
src/main/java/com/chelvc/cloud/admin/controller/CouponController.java

@@ -1,17 +1,23 @@
 package com.chelvc.cloud.admin.controller;
 
-import com.chelvc.cloud.vehicle.api.dto.CouponDTO;
-import com.chelvc.cloud.vehicle.api.param.CouponModifyParam;
-import com.chelvc.cloud.vehicle.api.param.CouponPagingParam;
-import com.chelvc.cloud.vehicle.api.service.CouponService;
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+
+import com.chelvc.cloud.vehicle.client.CouponClient;
+import com.chelvc.cloud.vehicle.client.dto.CouponDTO;
+import com.chelvc.cloud.vehicle.client.param.CouponModifyParam;
+import com.chelvc.cloud.vehicle.client.param.CouponPagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import javax.validation.Valid;
-import javax.validation.constraints.Min;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * 商品优惠券接口
@@ -22,9 +28,9 @@ import javax.validation.constraints.Min;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class CouponController {
-    @DubboReference
-    private CouponService couponService;
+    private final CouponClient couponClient;
 
     /**
      * 新增商品优惠券
@@ -34,7 +40,7 @@ public class CouponController {
      */
     @PostMapping("/coupon")
     public Long addCoupon(@RequestBody @Valid CouponModifyParam param) {
-        return this.couponService.addCoupon(param);
+        return this.couponClient.addCoupon(param);
     }
 
     /**
@@ -45,18 +51,18 @@ public class CouponController {
      */
     @PutMapping("/coupon/{id}")
     public void updateCoupon(@PathVariable("id") @Min(value = 1, message = "商品优惠券主键不能小于1") Long id,
-                               @RequestBody @Valid CouponModifyParam param) {
-        this.couponService.updateCoupon(id, param);
+                             @RequestBody @Valid CouponModifyParam param) {
+        this.couponClient.updateCoupon(id, param);
     }
 
     /**
      * 删除商品优惠券
      *
-     * @param id    商品优惠券主键
+     * @param id 商品优惠券主键
      */
     @PutMapping("/coupon/delete/{id}")
     public void deleteCoupon(@PathVariable("id") @Min(value = 1, message = "商品优惠券主键不能小于1") Long id) {
-        this.couponService.deleteCoupon(id);
+        this.couponClient.deleteCoupon(id);
     }
 
     /**
@@ -67,6 +73,6 @@ public class CouponController {
      */
     @GetMapping("/coupon/paging")
     public Pagination<CouponDTO> getCouponPaging(@Valid CouponPagingParam param) {
-        return this.couponService.getCouponPaging(param);
+        return this.couponClient.getCouponPaging(param);
     }
 }

+ 35 - 32
src/main/java/com/chelvc/cloud/admin/controller/DynamicCommentController.java

@@ -1,52 +1,55 @@
 package com.chelvc.cloud.admin.controller;
 
-import com.chelvc.cloud.vehicle.api.dto.DynamicCommentDTO;
-import com.chelvc.cloud.vehicle.api.param.ExamineDynamicParam;
-import com.chelvc.cloud.vehicle.api.param.QueryAdminDynamicParam;
-import com.chelvc.cloud.vehicle.api.service.DynamicCommentService;
+import com.chelvc.cloud.vehicle.client.DynamicCommentClient;
+import com.chelvc.cloud.vehicle.client.dto.DynamicCommentDTO;
+import com.chelvc.cloud.vehicle.client.param.ExamineDynamicParam;
+import com.chelvc.cloud.vehicle.client.param.QueryAdminDynamicParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import com.chelvc.framework.common.model.Paging;
 import lombok.RequiredArgsConstructor;
-import org.apache.dubbo.config.annotation.DubboReference;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * 评论信息
+ *
  * @author: igl
  * @date: 2023/8/17 22:18
  */
 @Validated
-@RequiredArgsConstructor
 @RestController
 @RequestMapping("/comment")
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class DynamicCommentController {
+    private final DynamicCommentClient dynamicCommentClient;
 
-  @DubboReference
-  private DynamicCommentService dynamicCommentService;
+    /**
+     * 查询列表
+     *
+     * @param param
+     * @author igl
+     * @date 2023/8/9 17:25
+     */
+    @GetMapping("/list")
+    public Pagination<DynamicCommentDTO> list(QueryAdminDynamicParam param) {
+        return this.dynamicCommentClient.queryAdminPageList(param);
+    }
 
-  /**
-   * 查询列表
-   * @param param
-   * @author igl
-   * @date 2023/8/9 17:25
-   */
-  @GetMapping("/list")
-  public Pagination<DynamicCommentDTO> list(QueryAdminDynamicParam param) {
-    return this.dynamicCommentService.queryAdminPageList(param);
-  }
-
-  /**
-   * 动态手动审核
-   *
-   * @param param
-   * @author igl
-   * @date 2023/8/17 17:25
-   */
-  @PutMapping("/examine")
-  public void examine(@Validated @RequestBody ExamineDynamicParam param) {
-    this.dynamicCommentService.examine(param.getId(), param.getExamine());
-  }
+    /**
+     * 动态手动审核
+     *
+     * @param param
+     * @author igl
+     * @date 2023/8/17 17:25
+     */
+    @PutMapping("/examine")
+    public void examine(@Validated @RequestBody ExamineDynamicParam param) {
+        this.dynamicCommentClient.examine(param.getId(), param.getExamine());
+    }
 }

+ 24 - 19
src/main/java/com/chelvc/cloud/admin/controller/DynamicContentController.java

@@ -1,19 +1,23 @@
 package com.chelvc.cloud.admin.controller;
 
-import com.chelvc.cloud.vehicle.api.dto.DynamicContentDTO;
-import com.chelvc.cloud.vehicle.api.param.EditShieldDynamicParam;
-import com.chelvc.cloud.vehicle.api.param.ExamineDynamicParam;
-import com.chelvc.cloud.vehicle.api.param.QueryAdminDynamicParam;
-import com.chelvc.cloud.vehicle.api.service.DynamicContentService;
+import javax.validation.constraints.NotNull;
+
+import com.chelvc.cloud.vehicle.client.DynamicContentClient;
+import com.chelvc.cloud.vehicle.client.dto.DynamicContentDTO;
+import com.chelvc.cloud.vehicle.client.param.EditShieldDynamicParam;
+import com.chelvc.cloud.vehicle.client.param.ExamineDynamicParam;
+import com.chelvc.cloud.vehicle.client.param.QueryAdminDynamicParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import com.chelvc.framework.common.model.Paging;
 import lombok.RequiredArgsConstructor;
-import org.apache.dubbo.config.annotation.DubboReference;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.constraints.NotNull;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * 动态信息
@@ -22,35 +26,35 @@ import javax.validation.constraints.NotNull;
  * @date 2023-02-25
  */
 @Validated
-@RequiredArgsConstructor
 @RestController
 @RequestMapping("/content")
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class DynamicContentController {
-
-    @DubboReference
-    private DynamicContentService iDynamicContentService;
+    private final DynamicContentClient dynamicContentClient;
 
     /**
      * 查询列表
+     *
      * @param param
      * @author igl
      * @date 2023/8/9 17:25
      */
     @GetMapping("/list")
     public Pagination<DynamicContentDTO> list(QueryAdminDynamicParam param) {
-        return this.iDynamicContentService.queryAdminPageList(param);
+        return this.dynamicContentClient.queryAdminPageList(param);
     }
 
     /**
      * 屏蔽某条动态
+     *
      * @param param
      * @author igl
      * @date 2023/8/9 17:25
      */
     @PutMapping("/shield/update")
     public void shieldById(@Validated @RequestBody EditShieldDynamicParam param) {
-        this.iDynamicContentService.shieldById(param.getId(), param.getPlatformStatus());
+        this.dynamicContentClient.shieldById(param.getId(), param.getPlatformStatus());
     }
 
     /**
@@ -62,7 +66,7 @@ public class DynamicContentController {
      */
     @PutMapping("/shield/update-all")
     public void shieldByUserId(@Validated @RequestBody EditShieldDynamicParam param) {
-        iDynamicContentService.shieldByUserId(param.getId(), param.getPlatformStatus());
+        dynamicContentClient.shieldByUserId(param.getId(), param.getPlatformStatus());
     }
 
     /**
@@ -74,17 +78,18 @@ public class DynamicContentController {
      */
     @PutMapping("/examine")
     public void examine(@Validated @RequestBody ExamineDynamicParam param) {
-        iDynamicContentService.examine(param.getId(), param.getExamine());
+        dynamicContentClient.examine(param.getId(), param.getExamine());
     }
 
     /**
      * 获取动态详情
+     *
      * @param id 主键
      * @author igl
      * @date 2023/8/9 17:25
      */
     @GetMapping("/detail")
     public DynamicContentDTO getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
-        return iDynamicContentService.queryById(id, null);
+        return dynamicContentClient.queryById(id, null);
     }
 }

+ 14 - 13
src/main/java/com/chelvc/cloud/admin/controller/EmployeeController.java

@@ -5,14 +5,15 @@ import javax.validation.constraints.Min;
 
 import com.chelvc.cloud.admin.copier.EmployeeCopier;
 import com.chelvc.cloud.admin.vo.PersonalVO;
-import com.chelvc.cloud.uc.api.dto.EmployeeDTO;
-import com.chelvc.cloud.uc.api.dto.EmployeeDetailDTO;
-import com.chelvc.cloud.uc.api.param.EmployeeModifyParam;
-import com.chelvc.cloud.uc.api.param.EmployeePagingParam;
-import com.chelvc.cloud.uc.api.service.EmployeeService;
+import com.chelvc.cloud.user.client.EmployeeClient;
+import com.chelvc.cloud.user.client.dto.EmployeeDTO;
+import com.chelvc.cloud.user.client.dto.EmployeeDetailDTO;
+import com.chelvc.cloud.user.client.param.EmployeeModifyParam;
+import com.chelvc.cloud.user.client.param.EmployeePagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -30,9 +31,9 @@ import org.springframework.web.bind.annotation.RestController;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class EmployeeController {
-    @DubboReference
-    private EmployeeService employeeService;
+    private final EmployeeClient employeeClient;
 
     /**
      * 新增员工
@@ -42,7 +43,7 @@ public class EmployeeController {
      */
     @PostMapping("/employee")
     public Long addEmployee(@RequestBody @Valid EmployeeModifyParam param) {
-        return this.employeeService.addEmployee(param);
+        return this.employeeClient.addEmployee(param);
     }
 
     /**
@@ -54,7 +55,7 @@ public class EmployeeController {
     @PutMapping("/employee/{id}")
     public void updateEmployee(@PathVariable("id") @Min(value = 1, message = "员工主键不能小于1") Long id,
                                @RequestBody @Valid EmployeeModifyParam param) {
-        this.employeeService.updateEmployee(id, param);
+        this.employeeClient.updateEmployee(id, param);
     }
 
     /**
@@ -64,7 +65,7 @@ public class EmployeeController {
      */
     @GetMapping("/employee/mine")
     public PersonalVO getPersonal() {
-        return EmployeeCopier.INSTANCE.copying(this.employeeService.getPersonal());
+        return EmployeeCopier.INSTANCE.copying(this.employeeClient.getPersonal());
     }
 
     /**
@@ -76,7 +77,7 @@ public class EmployeeController {
     @GetMapping("/employee/{id}/detail")
     public EmployeeDetailDTO getEmployeeDetail(
             @PathVariable("id") @Min(value = 1, message = "员工主键不能小于1") Long id) {
-        return this.employeeService.getEmployeeDetail(id);
+        return this.employeeClient.getEmployeeDetail(id);
     }
 
     /**
@@ -87,6 +88,6 @@ public class EmployeeController {
      */
     @GetMapping("/employee/paging")
     public Pagination<EmployeeDTO> getEmployeePaging(@Valid EmployeePagingParam param) {
-        return this.employeeService.getEmployeePaging(param);
+        return this.employeeClient.getEmployeePaging(param);
     }
 }

+ 16 - 21
src/main/java/com/chelvc/cloud/admin/controller/FeedbackController.java

@@ -1,26 +1,22 @@
 package com.chelvc.cloud.admin.controller;
-import com.chelvc.cloud.vehicle.api.dto.FeedBackDTO;
-import com.chelvc.cloud.vehicle.api.dto.GoodsDTO;
-import com.chelvc.cloud.vehicle.api.param.FeedBackModifyParam;
-import com.chelvc.cloud.vehicle.api.param.FeedBackPagingParam;
-import com.chelvc.cloud.vehicle.api.param.GoodsPagingParam;
-import com.chelvc.cloud.vehicle.api.service.FeedbackService;
+
+import java.util.List;
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotEmpty;
+
+import com.chelvc.cloud.vehicle.client.FeedbackClient;
+import com.chelvc.cloud.vehicle.client.dto.FeedBackDTO;
+import com.chelvc.cloud.vehicle.client.param.FeedBackPagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotEmpty;
-import java.util.List;
-
 /**
  * 意见反馈接口
  *
@@ -30,16 +26,16 @@ import java.util.List;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class FeedbackController {
-    @DubboReference
-    private FeedbackService feedbackService;
+    private final FeedbackClient feedbackClient;
 
     /**
      * 查询意见反馈
      */
     @GetMapping("/feedback/query")
     public List<FeedBackDTO> queryById(@Valid @NotEmpty String channel) {
-        return this.feedbackService.getFeedback(channel);
+        return this.feedbackClient.getFeedback(channel);
     }
 
     /**
@@ -50,7 +46,7 @@ public class FeedbackController {
      */
     @GetMapping("/feedback/paging")
     public Pagination<FeedBackDTO> getFeedbackPaging(@Valid FeedBackPagingParam param) {
-        return this.feedbackService.getFeedbackPaging(param);
+        return this.feedbackClient.getFeedbackPaging(param);
     }
 
 
@@ -60,9 +56,8 @@ public class FeedbackController {
     @GetMapping("/feedback/{id}")
     public void updateStatus(@PathVariable("id") @Min(value = 1, message = "商家主键不能小于1") Long id,
                              String state) {
-         this.feedbackService.updateStatus(id,state);
+        this.feedbackClient.updateStatus(id, state);
     }
 
 
-
 }

+ 28 - 23
src/main/java/com/chelvc/cloud/admin/controller/GoodsController.java

@@ -1,19 +1,25 @@
 package com.chelvc.cloud.admin.controller;
-import com.chelvc.cloud.vehicle.api.dto.GoodsDTO;
-import com.chelvc.cloud.vehicle.api.param.GoodsModifyParam;
-import com.chelvc.cloud.vehicle.api.param.GoodsPagingParam;
-import com.chelvc.cloud.vehicle.api.service.GoodsService;
-import com.chelvc.framework.base.annotation.ResponseWrapping;
-import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
 
-import javax.validation.Valid;
-import javax.validation.constraints.Min;
 import java.util.List;
 import java.util.Map;
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+
+import com.chelvc.cloud.vehicle.client.GoodsClient;
+import com.chelvc.cloud.vehicle.client.dto.GoodsDTO;
+import com.chelvc.cloud.vehicle.client.param.GoodsModifyParam;
+import com.chelvc.cloud.vehicle.client.param.GoodsPagingParam;
+import com.chelvc.framework.base.annotation.ResponseWrapping;
+import com.chelvc.framework.common.model.Pagination;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * 商品接口
@@ -24,9 +30,9 @@ import java.util.Map;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class GoodsController {
-    @DubboReference
-    private GoodsService goodsService;
+    private final GoodsClient goodsClient;
 
     /**
      * 新增商品
@@ -36,7 +42,7 @@ public class GoodsController {
      */
     @PostMapping("/goods")
     public Long addGoods(@RequestBody @Valid GoodsModifyParam param) {
-        return this.goodsService.addGoods(param);
+        return this.goodsClient.addGoods(param);
     }
 
     /**
@@ -47,18 +53,18 @@ public class GoodsController {
      */
     @PutMapping("/goods/{id}")
     public void updateGoods(@PathVariable("id") @Min(value = 1, message = "商品主键不能小于1") Long id,
-                               @RequestBody @Valid GoodsModifyParam param) {
-        this.goodsService.updateGoods(id, param);
+                            @RequestBody @Valid GoodsModifyParam param) {
+        this.goodsClient.updateGoods(id, param);
     }
 
     /**
      * 删除商品
      *
-     * @param id    商品主键
+     * @param id 商品主键
      */
     @PutMapping("/goods/delete/{id}")
     public void deleteGoods(@PathVariable("id") @Min(value = 1, message = "商品主键不能小于1") Long id) {
-        this.goodsService.deleteGoods(id);
+        this.goodsClient.deleteGoods(id);
     }
 
     /**
@@ -69,15 +75,14 @@ public class GoodsController {
      */
     @GetMapping("/goods/paging")
     public Pagination<GoodsDTO> getGoodsPaging(@Valid GoodsPagingParam param) {
-        return this.goodsService.getGoodsPaging(param);
+        return this.goodsClient.getGoodsPaging(param);
     }
 
     /**
      * 查询商品得成交量以及成交金额
-     *
      */
     @GetMapping("/goods/orderAmount")
-    public List<Map<String,Object>> orderAmount() {
-        return this.goodsService.getGoodsAmount();
+    public List<Map<String, Object>> orderAmount() {
+        return this.goodsClient.getGoodsAmount();
     }
 }

+ 19 - 20
src/main/java/com/chelvc/cloud/admin/controller/HelpCategoryController.java

@@ -1,14 +1,17 @@
 package com.chelvc.cloud.admin.controller;
 
-import com.chelvc.cloud.vehicle.api.dto.HelpCategoryDTO;
-import com.chelvc.cloud.vehicle.api.param.HelpCategoryModifyParam;
-import com.chelvc.cloud.vehicle.api.param.HelpCategoryPagingParam;
-import com.chelvc.cloud.vehicle.api.param.HelpPagingParam;
-import com.chelvc.cloud.vehicle.api.service.IHelpCategoryService;
+import java.util.List;
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+
+import com.chelvc.cloud.vehicle.client.HelpCategoryClient;
+import com.chelvc.cloud.vehicle.client.dto.HelpCategoryDTO;
+import com.chelvc.cloud.vehicle.client.param.HelpCategoryModifyParam;
+import com.chelvc.cloud.vehicle.client.param.HelpCategoryPagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -17,10 +20,6 @@ import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
-import javax.validation.constraints.Min;
-import java.util.List;
-
 /**
  * 问题分类接口
  *
@@ -30,9 +29,9 @@ import java.util.List;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class HelpCategoryController {
-    @DubboReference
-    private IHelpCategoryService helpCategoryService;
+    private final HelpCategoryClient helpCategoryClient;
 
     /**
      * 新增问题分类配置
@@ -42,7 +41,7 @@ public class HelpCategoryController {
      */
     @PostMapping("/helpCategory")
     public void addHelpCategory(@RequestBody @Valid HelpCategoryModifyParam param) {
-         this.helpCategoryService.insertHelpCategory(param);
+        this.helpCategoryClient.insertHelpCategory(param);
     }
 
     /**
@@ -53,8 +52,8 @@ public class HelpCategoryController {
      */
     @PutMapping("/helpCategory/{id}")
     public void updateHelpCategory(@PathVariable("id") @Min(value = 1, message = "问题分类配置主键不能小于1") Long id,
-                               @RequestBody @Valid HelpCategoryModifyParam param) {
-        this.helpCategoryService.updateHelpCategory(id,param);
+                                   @RequestBody @Valid HelpCategoryModifyParam param) {
+        this.helpCategoryClient.updateHelpCategory(id, param);
     }
 
     /**
@@ -65,18 +64,18 @@ public class HelpCategoryController {
      */
     @GetMapping("/helpCategory/paging")
     public Pagination<HelpCategoryDTO> getHelpCategoryPaging(@Valid HelpCategoryPagingParam param) {
-        return this.helpCategoryService.getHelpCategoryPaging(param);
+        return this.helpCategoryClient.getHelpCategoryPaging(param);
     }
 
 
     /**
      * 删除问题分类配置
      *
-     * @param id    问题分类配置主键
+     * @param id 问题分类配置主键
      */
     @PutMapping("/helpCategory/delete/{id}")
     public void deleteHelpCategory(@PathVariable("id") @Min(value = 1, message = "问题分类配置主键不能小于1") Long id) {
-        this.helpCategoryService.deleteHelpCategoryById(id);
+        this.helpCategoryClient.deleteHelpCategoryById(id);
     }
 
 
@@ -87,6 +86,6 @@ public class HelpCategoryController {
      */
     @GetMapping("/helpCategory/list")
     public List<HelpCategoryDTO> getHelpCategories() {
-        return this.helpCategoryService.selectHelpCategories();
+        return this.helpCategoryClient.selectHelpCategories();
     }
 }

+ 17 - 17
src/main/java/com/chelvc/cloud/admin/controller/HelpController.java

@@ -1,13 +1,16 @@
 package com.chelvc.cloud.admin.controller;
 
-import com.chelvc.cloud.vehicle.api.dto.HelpDTO;
-import com.chelvc.cloud.vehicle.api.param.HelpModifyParam;
-import com.chelvc.cloud.vehicle.api.param.HelpPagingParam;
-import com.chelvc.cloud.vehicle.api.service.IHelpService;
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+
+import com.chelvc.cloud.vehicle.client.HelpClient;
+import com.chelvc.cloud.vehicle.client.dto.HelpDTO;
+import com.chelvc.cloud.vehicle.client.param.HelpModifyParam;
+import com.chelvc.cloud.vehicle.client.param.HelpPagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -16,9 +19,6 @@ import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
-import javax.validation.constraints.Min;
-
 /**
  * 问题接口
  *
@@ -28,9 +28,9 @@ import javax.validation.constraints.Min;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class HelpController {
-    @DubboReference
-    private IHelpService helpService;
+    private final HelpClient helpClient;
 
     /**
      * 新增问题配置
@@ -40,7 +40,7 @@ public class HelpController {
      */
     @PostMapping("/help")
     public void addHelp(@RequestBody @Valid HelpModifyParam param) {
-         this.helpService.insertHelp(param);
+        this.helpClient.insertHelp(param);
     }
 
     /**
@@ -51,8 +51,8 @@ public class HelpController {
      */
     @PutMapping("/help/{id}")
     public void updateHelp(@PathVariable("id") @Min(value = 1, message = "问题配置主键不能小于1") Long id,
-                               @RequestBody @Valid HelpModifyParam param) {
-        this.helpService.updateHelp(id,param);
+                           @RequestBody @Valid HelpModifyParam param) {
+        this.helpClient.updateHelp(id, param);
     }
 
     /**
@@ -63,17 +63,17 @@ public class HelpController {
      */
     @GetMapping("/help/paging")
     public Pagination<HelpDTO> getHelpPaging(@Valid HelpPagingParam param) {
-        return this.helpService.getHelpPaging(param);
+        return this.helpClient.getHelpPaging(param);
     }
 
 
     /**
      * 修改问题配置
      *
-     * @param id    问题配置主键
+     * @param id 问题配置主键
      */
     @PutMapping("/help/delete/{id}")
     public void deleteHelp(@PathVariable("id") @Min(value = 1, message = "问题配置主键不能小于1") Long id) {
-        this.helpService.deleteHelpById(id);
+        this.helpClient.deleteHelpById(id);
     }
 }

+ 14 - 14
src/main/java/com/chelvc/cloud/admin/controller/InviteUserController.java

@@ -1,20 +1,20 @@
 package com.chelvc.cloud.admin.controller;
-import com.chelvc.cloud.uc.api.model.Scope;
-import com.chelvc.cloud.vehicle.api.dto.TeamDTO;
-import com.chelvc.cloud.vehicle.api.param.TeamInvitePageParam;
-import com.chelvc.cloud.vehicle.api.service.UserInviteService;
+
+import javax.validation.Valid;
+
+import com.chelvc.cloud.user.client.model.Scope;
+import com.chelvc.cloud.vehicle.client.UserInviteClient;
+import com.chelvc.cloud.vehicle.client.dto.TeamDTO;
+import com.chelvc.cloud.vehicle.client.param.TeamInvitePageParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.base.context.SessionContextHolder;
-import com.chelvc.framework.common.util.ObjectUtils;
 import com.chelvc.framework.common.util.StringUtils;
-import org.apache.dubbo.config.annotation.DubboReference;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
-import java.util.List;
-
 /**
  * 用户分销接口
  *
@@ -24,9 +24,9 @@ import java.util.List;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class InviteUserController {
-    @DubboReference
-    private UserInviteService userInviteService;
+    private final UserInviteClient userInviteClient;
 
     /**
      * 查询用户分销分页
@@ -39,9 +39,9 @@ public class InviteUserController {
         Long userId = SessionContextHolder.getId();
         Scope scope = StringUtils.ifEmpty(SessionContextHolder.getScope(), Scope::parse);
         if (scope == Scope.ADMIN) {
-            return this.userInviteService.inviteList(param);
-        }else {
-            return this.userInviteService.teamList(param,userId);
+            return this.userInviteClient.inviteList(param);
+        } else {
+            return this.userInviteClient.teamList(param, userId);
         }
     }
 }

+ 11 - 9
src/main/java/com/chelvc/cloud/admin/controller/LoginController.java

@@ -1,17 +1,18 @@
 package com.chelvc.cloud.admin.controller;
 
-import com.chelvc.cloud.uc.api.dto.LoginDTO;
-import com.chelvc.cloud.uc.api.param.LoginPagingParam;
-import com.chelvc.cloud.uc.api.service.LoginService;
+import javax.validation.Valid;
+
+import com.chelvc.cloud.user.client.LoginClient;
+import com.chelvc.cloud.user.client.dto.LoginDTO;
+import com.chelvc.cloud.user.client.param.LoginPagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
-
 /**
  * 用户登陆记录接口
  *
@@ -21,9 +22,10 @@ import javax.validation.Valid;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class LoginController {
-    @DubboReference
-    private LoginService loginService;
+    private final LoginClient loginClient;
+
     /**
      * 查询用户分页
      *
@@ -32,6 +34,6 @@ public class LoginController {
      */
     @GetMapping("/login/paging")
     public Pagination<LoginDTO> getLoginPaging(@Valid LoginPagingParam param) {
-        return this.loginService.getLoginPaging(param);
+        return this.loginClient.getLoginPaging(param);
     }
 }

+ 12 - 12
src/main/java/com/chelvc/cloud/admin/controller/MenuController.java

@@ -4,13 +4,13 @@ import java.util.List;
 import javax.validation.Valid;
 import javax.validation.constraints.Min;
 
-import com.chelvc.cloud.uc.api.dto.MenuDTO;
-import com.chelvc.cloud.uc.api.param.MenuModifyParam;
-import com.chelvc.cloud.uc.api.param.MenuQueryParam;
-import com.chelvc.cloud.uc.api.service.MenuService;
+import com.chelvc.cloud.user.client.MenuClient;
+import com.chelvc.cloud.user.client.dto.MenuDTO;
+import com.chelvc.cloud.user.client.param.MenuModifyParam;
+import com.chelvc.cloud.user.client.param.MenuQueryParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -28,9 +28,9 @@ import org.springframework.web.bind.annotation.RestController;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class MenuController {
-    @DubboReference
-    private MenuService menuService;
+    private final MenuClient menuClient;
 
     /**
      * 新增菜单
@@ -40,7 +40,7 @@ public class MenuController {
      */
     @PostMapping("/menu")
     public Long addMenu(@RequestBody @Valid MenuModifyParam param) {
-        return this.menuService.addMenu(param);
+        return this.menuClient.addMenu(param);
     }
 
     /**
@@ -52,7 +52,7 @@ public class MenuController {
     @PutMapping("/menu/{id}")
     public void updateMenu(@PathVariable("id") @Min(value = 1, message = "菜单主键不能小于1") Long id,
                            @RequestBody @Valid MenuModifyParam param) {
-        this.menuService.updateMenu(id, param);
+        this.menuClient.updateMenu(id, param);
     }
 
     /**
@@ -63,7 +63,7 @@ public class MenuController {
      */
     @GetMapping("/menu/{id}")
     public MenuDTO getMenu(@PathVariable("id") @Min(value = 1, message = "菜单主键不能小于1") Long id) {
-        return this.menuService.getMenu(id);
+        return this.menuClient.getMenu(id);
     }
 
     /**
@@ -74,6 +74,6 @@ public class MenuController {
      */
     @GetMapping("/menu/trees")
     public List<MenuDTO> listMenuTrees(@Valid MenuQueryParam param) {
-        return this.menuService.listMenuTrees(param);
+        return this.menuClient.listMenuTrees(param);
     }
 }

+ 18 - 16
src/main/java/com/chelvc/cloud/admin/controller/MerchantAuthController.java

@@ -1,13 +1,16 @@
 package com.chelvc.cloud.admin.controller;
 
-import com.chelvc.cloud.vehicle.api.dto.MerchantAuthDTO;
-import com.chelvc.cloud.vehicle.api.param.MerchantAuthModifyParam;
-import com.chelvc.cloud.vehicle.api.param.MerchantAuthPagingParam;
-import com.chelvc.cloud.vehicle.api.service.MerchantAuthService;
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+
+import com.chelvc.cloud.vehicle.client.MerchantAuthClient;
+import com.chelvc.cloud.vehicle.client.dto.MerchantAuthDTO;
+import com.chelvc.cloud.vehicle.client.param.MerchantAuthModifyParam;
+import com.chelvc.cloud.vehicle.client.param.MerchantAuthPagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -15,8 +18,6 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
-import javax.validation.Valid;
-import javax.validation.constraints.Min;
 
 /**
  * 商家认证接口
@@ -27,9 +28,10 @@ import javax.validation.constraints.Min;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class MerchantAuthController {
-    @DubboReference
-    private MerchantAuthService merchantAuthService;
+    private final MerchantAuthClient merchantAuthClient;
+
     /**
      * 查询商家商家认证分页
      *
@@ -38,7 +40,7 @@ public class MerchantAuthController {
      */
     @GetMapping("/merchantAuth/paging")
     public Pagination<MerchantAuthDTO> getMerchantAuthPaging(@Valid MerchantAuthPagingParam param) {
-        return this.merchantAuthService.getMerchantAuthPaging(param);
+        return this.merchantAuthClient.getMerchantAuthPaging(param);
     }
 
     /**
@@ -49,8 +51,8 @@ public class MerchantAuthController {
      */
     @GetMapping("/certificationAudit/{id}")
     public void certificationAudit(@PathVariable("id") @Min(value = 1, message = "商家主键不能小于1") Long id,
-                                   String state,String message ) {
-        this.merchantAuthService.certificationAudit(id, state,message);
+                                   String state, String message) {
+        this.merchantAuthClient.certificationAudit(id, state, message);
     }
 
 
@@ -62,7 +64,7 @@ public class MerchantAuthController {
      */
     @PostMapping("/merchantAuth")
     public Long addMerchantAuth(@RequestBody @Valid MerchantAuthModifyParam param) {
-        return this.merchantAuthService.addMerchantAuth(param);
+        return this.merchantAuthClient.addMerchantAuth(param);
     }
 
     /**
@@ -74,7 +76,7 @@ public class MerchantAuthController {
     @PutMapping("/merchantAuth/{id}")
     public void updateMerchantAuth(@PathVariable("id") @Min(value = 1, message = "商家主键不能小于1") Long id,
                                    @RequestBody @Valid MerchantAuthModifyParam param) {
-        this.merchantAuthService.updateMerchantAuth(id, param);
+        this.merchantAuthClient.updateMerchantAuth(id, param);
     }
 
     /**
@@ -82,6 +84,6 @@ public class MerchantAuthController {
      */
     @PostMapping("/merchantAuth/queryById")
     public MerchantAuthDTO queryById() {
-        return this.merchantAuthService.queryById();
+        return this.merchantAuthClient.queryById();
     }
 }

+ 29 - 30
src/main/java/com/chelvc/cloud/admin/controller/MerchantController.java

@@ -6,20 +6,20 @@ import javax.validation.Valid;
 import javax.validation.constraints.Min;
 import javax.validation.constraints.NotEmpty;
 
-import com.chelvc.cloud.vehicle.api.constant.GoodsStatus;
-import com.chelvc.cloud.vehicle.api.constant.MerchantStatus;
-import com.chelvc.cloud.vehicle.api.dto.MerchantDTO;
-import com.chelvc.cloud.vehicle.api.dto.MerchantRankDTO;
-import com.chelvc.cloud.vehicle.api.param.MerchantModifyParam;
-import com.chelvc.cloud.vehicle.api.param.MerchantPagingParam;
-import com.chelvc.cloud.vehicle.api.param.MerchantRankParam;
-import com.chelvc.cloud.vehicle.api.param.ReportModifyParam;
-import com.chelvc.cloud.vehicle.api.service.GoodsService;
-import com.chelvc.cloud.vehicle.api.service.MerchantService;
+import com.chelvc.cloud.vehicle.client.GoodsClient;
+import com.chelvc.cloud.vehicle.client.MerchantClient;
+import com.chelvc.cloud.vehicle.client.constant.GoodsStatus;
+import com.chelvc.cloud.vehicle.client.constant.MerchantStatus;
+import com.chelvc.cloud.vehicle.client.dto.MerchantDTO;
+import com.chelvc.cloud.vehicle.client.dto.MerchantRankDTO;
+import com.chelvc.cloud.vehicle.client.param.MerchantModifyParam;
+import com.chelvc.cloud.vehicle.client.param.MerchantPagingParam;
+import com.chelvc.cloud.vehicle.client.param.MerchantRankParam;
+import com.chelvc.cloud.vehicle.client.param.ReportModifyParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
-import com.chelvc.framework.base.context.SessionContextHolder;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -37,11 +37,10 @@ import org.springframework.web.bind.annotation.RestController;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class MerchantController {
-    @DubboReference
-    private MerchantService merchantService;
-    @DubboReference
-    private GoodsService goodsService;
+    private final GoodsClient goodsClient;
+    private final MerchantClient merchantClient;
 
     /**
      * 新增商家
@@ -51,7 +50,7 @@ public class MerchantController {
      */
     @PostMapping("/merchant")
     public Long addMerchant(@RequestBody @Valid MerchantModifyParam param) {
-        return this.merchantService.addMerchant(param);
+        return this.merchantClient.addMerchant(param);
     }
 
     /**
@@ -63,7 +62,7 @@ public class MerchantController {
     @PutMapping("/merchant/{id}")
     public void updateMerchant(@PathVariable("id") @Min(value = 1, message = "商家主键不能小于1") Long id,
                                @RequestBody @Valid MerchantModifyParam param) {
-        this.merchantService.updateMerchant(id, param);
+        this.merchantClient.updateMerchant(id, param);
     }
 
     /**
@@ -74,7 +73,7 @@ public class MerchantController {
      */
     @GetMapping("/merchant/paging")
     public Pagination<MerchantDTO> getMerchantPaging(@Valid MerchantPagingParam param) {
-        return this.merchantService.getMerchantPaging(param);
+        return this.merchantClient.getMerchantPaging(param);
     }
 
     /**
@@ -95,7 +94,7 @@ public class MerchantController {
      */
     @PutMapping("/merchant/list-goods/{goodsIds}")
     public void listGoods(@PathVariable("goodsIds") @NotEmpty(message = "商品ID不能为空") List<Long> goodsIds) {
-        this.goodsService.updateGoodsStatus(goodsIds, GoodsStatus.ONLINE);
+        this.goodsClient.updateGoodsStatus(goodsIds, GoodsStatus.ONLINE);
     }
 
     /**
@@ -105,7 +104,7 @@ public class MerchantController {
      */
     @PutMapping("/merchant/delist-goods/{goodsIds}")
     public void delistGoods(@PathVariable("goodsIds") @NotEmpty(message = "商品ID不能为空") List<Long> goodsIds) {
-        this.goodsService.updateGoodsStatus(goodsIds, GoodsStatus.OFFLINE);
+        this.goodsClient.updateGoodsStatus(goodsIds, GoodsStatus.OFFLINE);
     }
 
 
@@ -118,7 +117,7 @@ public class MerchantController {
     @PutMapping("/merchant/updateBusinessStatus/{id}")
     public void updateMerchant(@PathVariable("id") @Min(value = 1, message = "商家主键不能小于1") Long id,
                                String businessStatus) {
-        this.merchantService.updateMerchantBusinessStatus(id, businessStatus);
+        this.merchantClient.updateMerchantBusinessStatus(id, businessStatus);
     }
 
     /**
@@ -129,7 +128,7 @@ public class MerchantController {
      */
     @GetMapping("/merchants/rank")
     public List<MerchantRankDTO> listRankMerchants(@Valid MerchantRankParam param) {
-        return this.merchantService.listRankMerchants(param);
+        return this.merchantClient.listRankMerchants(param);
     }
 
 
@@ -139,8 +138,8 @@ public class MerchantController {
      * @return 获取商家营业状况
      */
     @GetMapping("/merchant/operatConditions")
-    public Map<String,Object> listRankMerchants() {
-        return this.merchantService.operatConditions();
+    public Map<String, Object> listRankMerchants() {
+        return this.merchantClient.operatConditions();
     }
 
     /**
@@ -149,19 +148,19 @@ public class MerchantController {
      * @return 获取经营报表状况
      */
     @PostMapping("/merchant/operatReport")
-    public List<Map<String,Object>> operatReport(@RequestBody @Valid ReportModifyParam param) {
-        return this.merchantService.operatReport(param);
+    public List<Map<String, Object>> operatReport(@RequestBody @Valid ReportModifyParam param) {
+        return this.merchantClient.operatReport(param);
     }
 
     /**
      * 商家审核
      *
-     * @param id    商家主键
+     * @param id 商家主键
      * @param
      */
     @GetMapping("/merchantAudit/{id}")
     public void merchantAudit(@PathVariable("id") @Min(value = 1, message = "商家主键不能小于1") Long id,
-                              MerchantStatus status ) {
-        this.merchantService.merchantAudit(id, status);
+                              MerchantStatus status) {
+        this.merchantClient.merchantAudit(id, status);
     }
 }

+ 15 - 15
src/main/java/com/chelvc/cloud/admin/controller/NoticeController.java

@@ -1,13 +1,16 @@
 package com.chelvc.cloud.admin.controller;
 
-import com.chelvc.cloud.vehicle.api.dto.NoticeDTO;
-import com.chelvc.cloud.vehicle.api.param.NoticeModifyParam;
-import com.chelvc.cloud.vehicle.api.param.NoticePagingParam;
-import com.chelvc.cloud.vehicle.api.service.NoticeService;
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+
+import com.chelvc.cloud.vehicle.client.NoticeClient;
+import com.chelvc.cloud.vehicle.client.dto.NoticeDTO;
+import com.chelvc.cloud.vehicle.client.param.NoticeModifyParam;
+import com.chelvc.cloud.vehicle.client.param.NoticePagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -16,9 +19,6 @@ import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
-import javax.validation.constraints.Min;
-
 /**
  * 通知配置接口
  *
@@ -28,9 +28,9 @@ import javax.validation.constraints.Min;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class NoticeController {
-    @DubboReference
-    private NoticeService noticeService;
+    private final NoticeClient noticeClient;
 
     /**
      * 新增通知配置
@@ -40,7 +40,7 @@ public class NoticeController {
      */
     @PostMapping("/notice")
     public Long addNotice(@RequestBody @Valid NoticeModifyParam param) {
-        return this.noticeService.addNotice(param);
+        return this.noticeClient.addNotice(param);
     }
 
     /**
@@ -51,8 +51,8 @@ public class NoticeController {
      */
     @PutMapping("/notice/{id}")
     public void updateNotice(@PathVariable("id") @Min(value = 1, message = "通知配置主键不能小于1") Long id,
-                               @RequestBody @Valid NoticeModifyParam param) {
-        this.noticeService.updateNotice(id, param);
+                             @RequestBody @Valid NoticeModifyParam param) {
+        this.noticeClient.updateNotice(id, param);
     }
 
     /**
@@ -63,6 +63,6 @@ public class NoticeController {
      */
     @GetMapping("/notice/paging")
     public Pagination<NoticeDTO> getNoticePaging(@Valid NoticePagingParam param) {
-        return this.noticeService.getNoticePaging(param);
+        return this.noticeClient.getNoticePaging(param);
     }
 }

+ 17 - 15
src/main/java/com/chelvc/cloud/admin/controller/OrderController.java

@@ -1,19 +1,21 @@
 package com.chelvc.cloud.admin.controller;
-import com.chelvc.cloud.vehicle.api.dto.OmsOrderDTO;
-import com.chelvc.cloud.vehicle.api.dto.OmsOrderDetailDTO;
-import com.chelvc.cloud.vehicle.api.param.OrderPagingParam;
-import com.chelvc.cloud.vehicle.api.service.IOmsOrderService;
+
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+import com.chelvc.cloud.vehicle.client.OmsOrderClient;
+import com.chelvc.cloud.vehicle.client.dto.OmsOrderDTO;
+import com.chelvc.cloud.vehicle.client.dto.OmsOrderDetailDTO;
+import com.chelvc.cloud.vehicle.client.param.OrderPagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RestController;
-import javax.validation.Valid;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
 
 /**
  * 订单接口
@@ -24,9 +26,9 @@ import javax.validation.constraints.NotNull;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class OrderController {
-    @DubboReference
-    private IOmsOrderService orderService;
+    private final OmsOrderClient omsOrderClient;
 
     /**
      * 查询订单分页
@@ -36,7 +38,7 @@ public class OrderController {
      */
     @GetMapping("/order/paging")
     public Pagination<OmsOrderDTO> getOrderPaging(@Valid OrderPagingParam param) {
-        return this.orderService.getOmsOrderPaging(param);
+        return this.omsOrderClient.getOmsOrderPaging(param);
     }
 
 
@@ -48,12 +50,12 @@ public class OrderController {
      */
     @GetMapping("/order/{id}")
     public OmsOrderDetailDTO getOrderDetail(@PathVariable("id") @Min(value = 1, message = "主键不能小于1") Long id) {
-        return this.orderService.detail(id);
+        return this.omsOrderClient.detail(id);
     }
 
     /**
-     *
      * 核验订单
+     *
      * @param orderId
      * @param merchantId
      * @return
@@ -61,6 +63,6 @@ public class OrderController {
     @GetMapping("/order/verification/{orderId}/{merchantId}")
     public void orderVerification(@PathVariable("orderId") @NotNull(message = "订单错误") Long orderId,
                                   @PathVariable("merchantId") @NotNull(message = "订单错误") Long merchantId) {
-        this.orderService.orderVerification(orderId, merchantId);
+        this.omsOrderClient.orderVerification(orderId, merchantId);
     }
 }

+ 13 - 14
src/main/java/com/chelvc/cloud/admin/controller/ProfitRatioConfigController.java

@@ -3,16 +3,16 @@ package com.chelvc.cloud.admin.controller;
 import javax.validation.Valid;
 import javax.validation.constraints.NotNull;
 
-import com.chelvc.cloud.vehicle.api.dto.ProfitRatioConfigDTO;
-import com.chelvc.cloud.vehicle.api.param.AddProfitRatioConfigParams;
-import com.chelvc.cloud.vehicle.api.param.EditProfitRatioConfigParams;
-import com.chelvc.cloud.vehicle.api.param.QueryProfitRatioConfigParam;
-import com.chelvc.cloud.vehicle.api.service.ProfitRatioConfigService;
+import com.chelvc.cloud.vehicle.client.ProfitRatioConfigClient;
+import com.chelvc.cloud.vehicle.client.dto.ProfitRatioConfigDTO;
+import com.chelvc.cloud.vehicle.client.param.AddProfitRatioConfigParams;
+import com.chelvc.cloud.vehicle.client.param.EditProfitRatioConfigParams;
+import com.chelvc.cloud.vehicle.client.param.QueryProfitRatioConfigParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.base.context.SessionContextHolder;
 import com.chelvc.framework.common.model.Pagination;
-import com.chelvc.framework.common.model.Paging;
-import org.apache.dubbo.config.annotation.DubboReference;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -28,10 +28,9 @@ import org.springframework.web.bind.annotation.RestController;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class ProfitRatioConfigController {
-
-    @DubboReference
-    private ProfitRatioConfigService profitRatioConfigService;
+    private final ProfitRatioConfigClient profitRatioConfigClient;
 
     /**
      * 新增
@@ -41,7 +40,7 @@ public class ProfitRatioConfigController {
     @PostMapping("/profit-ratio/add")
     public void add(@RequestBody @Valid AddProfitRatioConfigParams param) {
         param.setUserId(SessionContextHolder.getId());
-        this.profitRatioConfigService.add(param);
+        this.profitRatioConfigClient.add(param);
     }
 
     /**
@@ -52,7 +51,7 @@ public class ProfitRatioConfigController {
     @PutMapping("/profit-ratio/edit")
     public void edit(@RequestBody @Valid EditProfitRatioConfigParams param) {
         param.setUserId(SessionContextHolder.getId());
-        this.profitRatioConfigService.edit(param);
+        this.profitRatioConfigClient.edit(param);
     }
 
     /**
@@ -62,7 +61,7 @@ public class ProfitRatioConfigController {
      */
     @DeleteMapping("/profit-ratio/del/{id}")
     public void delete(@NotNull(message = "主键不能为空") @PathVariable Long id) {
-        this.profitRatioConfigService.delete(id, SessionContextHolder.getId());
+        this.profitRatioConfigClient.delete(id, SessionContextHolder.getId());
     }
 
     /**
@@ -74,6 +73,6 @@ public class ProfitRatioConfigController {
      */
     @GetMapping("/profit-ratio/list")
     public Pagination<ProfitRatioConfigDTO> list(QueryProfitRatioConfigParam param) {
-        return this.profitRatioConfigService.queryPageList(param);
+        return this.profitRatioConfigClient.queryPageList(param);
     }
 }

+ 12 - 11
src/main/java/com/chelvc/cloud/admin/controller/ProfitRatioController.java

@@ -1,14 +1,14 @@
 package com.chelvc.cloud.admin.controller;
 
-import com.chelvc.cloud.vehicle.api.dto.PlatformProfitRatioDTO;
-import com.chelvc.cloud.vehicle.api.param.EditPlatformProfitRatioParam;
-import com.chelvc.cloud.vehicle.api.param.QueryPlatformProfitRatioParam;
-import com.chelvc.cloud.vehicle.api.service.PlatformProfitRatioService;
+import com.chelvc.cloud.vehicle.client.PlatformProfitRatioClient;
+import com.chelvc.cloud.vehicle.client.dto.PlatformProfitRatioDTO;
+import com.chelvc.cloud.vehicle.client.param.EditPlatformProfitRatioParam;
+import com.chelvc.cloud.vehicle.client.param.QueryPlatformProfitRatioParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.base.context.SessionContextHolder;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -21,24 +21,25 @@ import org.springframework.web.bind.annotation.RestController;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class ProfitRatioController {
-
-    @DubboReference
-    PlatformProfitRatioService platformProfitRatioService;
+    private final PlatformProfitRatioClient platformProfitRatioClient;
 
     /**
      * 查询列表
+     *
      * @param param 查询参数
      * @author igl
      * @date 2024/2/23 17:25
      */
     @GetMapping("/platform/profit-ratio/page")
     public Pagination<PlatformProfitRatioDTO> list(@Validated QueryPlatformProfitRatioParam param) {
-        return this.platformProfitRatioService.queryPageList(param);
+        return this.platformProfitRatioClient.queryPageList(param);
     }
 
     /**
      * 修改分佣比例
+     *
      * @param param
      * @author igl
      * @date 2024/2/23 17:25
@@ -46,6 +47,6 @@ public class ProfitRatioController {
     @PostMapping("/platform/profit-ratio/edit")
     public void edit(@Validated @RequestBody EditPlatformProfitRatioParam param) {
         param.setOperateUserId(SessionContextHolder.getId());
-        this.platformProfitRatioService.edit(param);
+        this.platformProfitRatioClient.edit(param);
     }
 }

+ 13 - 15
src/main/java/com/chelvc/cloud/admin/controller/RankAwardConfigController.java

@@ -3,17 +3,16 @@ package com.chelvc.cloud.admin.controller;
 import javax.validation.Valid;
 import javax.validation.constraints.NotNull;
 
-import com.chelvc.cloud.vehicle.api.dto.RankAwardConfigDTO;
-import com.chelvc.cloud.vehicle.api.param.AddRankAwardConfigParams;
-import com.chelvc.cloud.vehicle.api.param.EditRankAwardConfigParams;
-import com.chelvc.cloud.vehicle.api.param.QueryRankAwardConfigParam;
-import com.chelvc.cloud.vehicle.api.service.RankAwardConfigService;
+import com.chelvc.cloud.vehicle.client.RankAwardConfigClient;
+import com.chelvc.cloud.vehicle.client.dto.RankAwardConfigDTO;
+import com.chelvc.cloud.vehicle.client.param.AddRankAwardConfigParams;
+import com.chelvc.cloud.vehicle.client.param.EditRankAwardConfigParams;
+import com.chelvc.cloud.vehicle.client.param.QueryRankAwardConfigParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.base.context.SessionContextHolder;
 import com.chelvc.framework.common.model.Pagination;
-import com.chelvc.framework.common.model.Paging;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -30,10 +29,9 @@ import org.springframework.web.bind.annotation.RestController;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class RankAwardConfigController {
-
-    @DubboReference
-    private RankAwardConfigService rankAwardConfigService;
+    private final RankAwardConfigClient rankAwardConfigClient;
 
     /**
      * 新增
@@ -43,7 +41,7 @@ public class RankAwardConfigController {
     @PostMapping("/rank-award/add")
     public void add(@RequestBody @Valid AddRankAwardConfigParams param) {
         param.setUserId(SessionContextHolder.getId());
-        this.rankAwardConfigService.add(param);
+        this.rankAwardConfigClient.add(param);
     }
 
     /**
@@ -54,7 +52,7 @@ public class RankAwardConfigController {
     @PutMapping("/rank-award/edit")
     public void edit(@RequestBody @Valid EditRankAwardConfigParams param) {
         param.setUserId(SessionContextHolder.getId());
-        this.rankAwardConfigService.edit(param);
+        this.rankAwardConfigClient.edit(param);
     }
 
     /**
@@ -64,7 +62,7 @@ public class RankAwardConfigController {
      */
     @DeleteMapping("/rank-award/del/{id}")
     public void delete(@NotNull(message = "主键不能为空") @PathVariable Long id) {
-        this.rankAwardConfigService.delete(id, SessionContextHolder.getId());
+        this.rankAwardConfigClient.delete(id, SessionContextHolder.getId());
     }
 
     /**
@@ -76,6 +74,6 @@ public class RankAwardConfigController {
      */
     @GetMapping("/rank-award/list")
     public Pagination<RankAwardConfigDTO> list(QueryRankAwardConfigParam param) {
-        return this.rankAwardConfigService.queryPageList(param);
+        return this.rankAwardConfigClient.queryPageList(param);
     }
 }

+ 10 - 12
src/main/java/com/chelvc/cloud/admin/controller/RankAwardRecordController.java

@@ -2,15 +2,14 @@ package com.chelvc.cloud.admin.controller;
 
 import javax.validation.Valid;
 
-import com.chelvc.cloud.vehicle.api.dto.RankAwardRecordDTO;
-import com.chelvc.cloud.vehicle.api.param.HandRankAwardParam;
-import com.chelvc.cloud.vehicle.api.param.QueryRankAwardRecordParam;
-import com.chelvc.cloud.vehicle.api.service.RankAwardRecordService;
+import com.chelvc.cloud.vehicle.client.RankAwardRecordClient;
+import com.chelvc.cloud.vehicle.client.dto.RankAwardRecordDTO;
+import com.chelvc.cloud.vehicle.client.param.HandRankAwardParam;
+import com.chelvc.cloud.vehicle.client.param.QueryRankAwardRecordParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import com.chelvc.framework.common.model.Paging;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -23,10 +22,9 @@ import org.springframework.web.bind.annotation.RestController;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class RankAwardRecordController {
-
-    @DubboReference
-    RankAwardRecordService rankAwardRecordService;
+    private final RankAwardRecordClient rankAwardRecordClient;
 
     /**
      * 查询列表
@@ -37,7 +35,7 @@ public class RankAwardRecordController {
      */
     @GetMapping("/rank-award-record/list")
     public Pagination<RankAwardRecordDTO> list(QueryRankAwardRecordParam param) {
-        return this.rankAwardRecordService.queryPageList(param);
+        return this.rankAwardRecordClient.queryPageList(param);
     }
 
     /**
@@ -49,6 +47,6 @@ public class RankAwardRecordController {
      */
     @PostMapping("/hand-out/prizes")
     public void handOutPrize(@RequestBody @Valid HandRankAwardParam param) {
-        this.rankAwardRecordService.handOutPrize(param);
+        this.rankAwardRecordClient.handOutPrize(param);
     }
 }

+ 19 - 15
src/main/java/com/chelvc/cloud/admin/controller/ReservationController.java

@@ -1,21 +1,22 @@
 package com.chelvc.cloud.admin.controller;
 
-import com.chelvc.cloud.vehicle.api.constant.ReserveStatus;
-import com.chelvc.cloud.vehicle.api.dto.ReservationDTO;
-import com.chelvc.cloud.vehicle.api.param.ReservationPagingParam;
-import com.chelvc.cloud.vehicle.api.service.ReservationService;
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+
+import com.chelvc.cloud.vehicle.client.ReservationClient;
+import com.chelvc.cloud.vehicle.client.constant.ReserveStatus;
+import com.chelvc.cloud.vehicle.client.dto.ReservationDTO;
+import com.chelvc.cloud.vehicle.client.param.ReservationPagingParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
-import javax.validation.constraints.Min;
-
 /**
  * 预约管理接口
  *
@@ -25,9 +26,9 @@ import javax.validation.constraints.Min;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class ReservationController {
-    @DubboReference
-    private ReservationService reservationService;
+    private final ReservationClient reservationClient;
 
     /**
      * 查询预约管理分页
@@ -37,26 +38,29 @@ public class ReservationController {
      */
     @GetMapping("/reservation/paging")
     public Pagination<ReservationDTO> getReservationPaging(@Valid ReservationPagingParam param) {
-        return this.reservationService.getReservationPaging(param);
+        return this.reservationClient.getReservationPaging(param);
     }
 
     /**
      * 更新预约单的状态
-     * @param id 预约单ID
+     *
+     * @param id     预约单ID
      * @param status 预约单的状态
      */
     @PutMapping("/updateReservationsStatus/{id}")
-    public void updateReservationsStatus(@PathVariable("id") @Min(value = 1, message = "主键不能小于1") Long id, @Valid ReserveStatus status) {
-        this.reservationService.updateReservationsStatus(id, status);
+    public void updateReservationsStatus(@PathVariable("id") @Min(value = 1, message = "主键不能小于1") Long id,
+                                         @Valid ReserveStatus status) {
+        this.reservationClient.updateReservationsStatus(id, status);
     }
 
     /**
      * 获取预约详情
+     *
      * @param id 预约单ID
      */
     @GetMapping("/reservation/{id}")
     public ReservationDTO getDetail(@PathVariable("id") @Min(value = 1, message = "主键不能小于1") Long id) {
-        return this.reservationService.getDetail(id);
+        return this.reservationClient.getDetail(id);
     }
 
 }

+ 16 - 16
src/main/java/com/chelvc/cloud/admin/controller/RoleController.java

@@ -4,16 +4,16 @@ import java.util.List;
 import javax.validation.Valid;
 import javax.validation.constraints.Min;
 
-import com.chelvc.cloud.uc.api.dto.RoleDTO;
-import com.chelvc.cloud.uc.api.dto.RoleDetailDTO;
-import com.chelvc.cloud.uc.api.param.RoleModifyParam;
-import com.chelvc.cloud.uc.api.param.RolePagingParam;
-import com.chelvc.cloud.uc.api.service.RoleService;
-import com.chelvc.cloud.vehicle.api.param.MenuModifyParam;
+import com.chelvc.cloud.user.client.RoleClient;
+import com.chelvc.cloud.user.client.dto.RoleDTO;
+import com.chelvc.cloud.user.client.dto.RoleDetailDTO;
+import com.chelvc.cloud.user.client.param.RoleModifyParam;
+import com.chelvc.cloud.user.client.param.RolePagingParam;
+import com.chelvc.cloud.vehicle.client.param.MenuModifyParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -31,9 +31,9 @@ import org.springframework.web.bind.annotation.RestController;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class RoleController {
-    @DubboReference
-    private RoleService roleService;
+    private final RoleClient roleClient;
 
     /**
      * 新增角色
@@ -43,7 +43,7 @@ public class RoleController {
      */
     @PostMapping("/role")
     public Long addRole(@RequestBody @Valid RoleModifyParam param) {
-        return this.roleService.addRole(param);
+        return this.roleClient.addRole(param);
     }
 
     /**
@@ -55,7 +55,7 @@ public class RoleController {
     @PutMapping("/role/{id}")
     public void updateRole(@PathVariable("id") @Min(value = 1, message = "角色主键不能小于1") Long id,
                            @RequestBody @Valid RoleModifyParam param) {
-        this.roleService.updateRole(id, param);
+        this.roleClient.updateRole(id, param);
     }
 
     /**
@@ -66,7 +66,7 @@ public class RoleController {
      */
     @GetMapping("/role/{id}/detail")
     public RoleDetailDTO getRoleDetail(@PathVariable("id") @Min(value = 1, message = "角色主键不能小于1") Long id) {
-        return this.roleService.getRoleDetail(id);
+        return this.roleClient.getRoleDetail(id);
     }
 
     /**
@@ -76,7 +76,7 @@ public class RoleController {
      */
     @GetMapping("/role/enables")
     public List<RoleDTO> listEnableRoles() {
-        return this.roleService.listEnableRoles();
+        return this.roleClient.listEnableRoles();
     }
 
     /**
@@ -87,7 +87,7 @@ public class RoleController {
      */
     @GetMapping("/role/paging")
     public Pagination<RoleDTO> getRolePaging(@Valid RolePagingParam param) {
-        return this.roleService.getRolePaging(param);
+        return this.roleClient.getRolePaging(param);
     }
 
     /**
@@ -99,6 +99,6 @@ public class RoleController {
     @PostMapping("/role/menus/{id}")
     public void updateRoleMenus(@PathVariable("id") @Min(value = 1, message = "角色主键不能小于1") Long id,
                                 @RequestBody @Valid MenuModifyParam param) {
-        this.roleService.updateRoleMenu(id, param.getMenuIds());
+        this.roleClient.updateRoleMenu(id, param.getMenuIds());
     }
 }

+ 26 - 32
src/main/java/com/chelvc/cloud/admin/controller/UserController.java

@@ -1,25 +1,27 @@
 package com.chelvc.cloud.admin.controller;
 
+import java.util.HashMap;
+import java.util.Map;
+import javax.validation.Valid;
+
 import com.chelvc.cloud.admin.copier.UserCopier;
 import com.chelvc.cloud.admin.vo.PersonalVO;
-import com.chelvc.cloud.uc.api.dto.UserDTO;
-import com.chelvc.cloud.uc.api.param.UserPagingParam;
-import com.chelvc.cloud.uc.api.service.UserService;
-import com.chelvc.cloud.vehicle.api.param.ReportModifyParam;
-import com.chelvc.cloud.vehicle.api.service.MerchantService;
+import com.chelvc.cloud.user.client.UserClient;
+import com.chelvc.cloud.user.client.dto.UserDTO;
+import com.chelvc.cloud.user.client.param.UserPagingParam;
+import com.chelvc.cloud.vehicle.client.MerchantClient;
+import com.chelvc.cloud.vehicle.client.param.ReportModifyParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.common.model.Pagination;
-import org.apache.dubbo.config.annotation.DubboReference;
+import com.chelvc.framework.common.util.ObjectUtils;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * 用户接口
  *
@@ -29,12 +31,10 @@ import java.util.Map;
 @Validated
 @RestController
 @ResponseWrapping
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class UserController {
-    @DubboReference
-    private UserService userService;
-
-    @DubboReference
-    private MerchantService merchantService;
+    private final UserClient userClient;
+    private final MerchantClient merchantClient;
 
     /**
      * 获取个人信息
@@ -43,11 +43,9 @@ public class UserController {
      */
     @GetMapping("/user/mine")
     public PersonalVO getPersonal() {
-        return UserCopier.INSTANCE.copying(this.userService.getPersonal());
+        return UserCopier.INSTANCE.copying(this.userClient.getPersonal());
     }
 
-
-
     /**
      * 查询用户分页
      *
@@ -56,42 +54,38 @@ public class UserController {
      */
     @GetMapping("/user/paging")
     public Pagination<UserDTO> getUserPaging(@Valid UserPagingParam param) {
-        return this.userService.getUserPaging(param);
+        return this.userClient.getUserPaging(param);
     }
 
-
     /**
      * 查询用户注册统计
      *
      * @return 用户统计
      */
     @PostMapping("/user/getRegisterReport")
-    public Map<String,Object> getUserRegisterReport(@RequestBody @Valid ReportModifyParam param) {
+    public Map<String, Object> getUserRegisterReport(@RequestBody @Valid ReportModifyParam param) {
         Map<String, Object> map = new HashMap<>();
-        map.put("user",this.userService.getUserRegisterReport(param.getYear(),param.getMonth(),param.getType()));
-        map.put("merchant",this.merchantService.getMerchantReport(param));
+        map.put("user", this.userClient.getUserRegisterReport(param.getYear(), param.getMonth(), param.getType()));
+        map.put("merchant", this.merchantClient.getMerchantReport(param));
         return map;
     }
 
 
-
-
     /**
      * 查询用户注册统计
      *
      * @return 用户统计
      */
     @PostMapping("/user/getRegisterCount")
-    public Map<String,Object> getRegisterCount(@RequestBody @Valid ReportModifyParam param) {
+    public Map<String, Object> getRegisterCount(@RequestBody @Valid ReportModifyParam param) {
         Map<String, Object> map = new HashMap<>();
-        Map<String, Object> userRegisterCount = this.userService.getUserRegisterReport(param.getYear(),param.getMonth(),param.getType(),param.getDay());
-        map.put("userRegisterCount",userRegisterCount.get("registerCount") == null?0:userRegisterCount.get("registerCount"));
-        map.put("merchant",this.merchantService.getMerchantReportCount(param));
+        Map<String, Object> userRegisterCount = this.userClient.getUserRegisterReportDaily(
+                param.getYear(), param.getMonth(), param.getType(), param.getDay()
+        );
+        map.put("userRegisterCount", ObjectUtils.ifNull(userRegisterCount.get("registerCount"), 0));
+        map.put("merchant", this.merchantClient.getMerchantReportCount(param));
         return map;
     }
 
 
-
-
-
 }

+ 1 - 1
src/main/java/com/chelvc/cloud/admin/copier/EmployeeCopier.java

@@ -1,7 +1,7 @@
 package com.chelvc.cloud.admin.copier;
 
 import com.chelvc.cloud.admin.vo.PersonalVO;
-import com.chelvc.cloud.uc.api.dto.EmployeePersonalDTO;
+import com.chelvc.cloud.user.client.dto.EmployeePersonalDTO;
 import org.mapstruct.Builder;
 import org.mapstruct.Mapper;
 import org.mapstruct.factory.Mappers;

+ 1 - 1
src/main/java/com/chelvc/cloud/admin/copier/UserCopier.java

@@ -1,7 +1,7 @@
 package com.chelvc.cloud.admin.copier;
 
 import com.chelvc.cloud.admin.vo.PersonalVO;
-import com.chelvc.cloud.uc.api.dto.UserPersonalDTO;
+import com.chelvc.cloud.user.client.dto.UserPersonalDTO;
 import org.mapstruct.Builder;
 import org.mapstruct.Mapper;
 import org.mapstruct.Mapping;

+ 6 - 4
src/main/resources/application-dev.yml

@@ -8,10 +8,6 @@ spring:
     port: 7031
     password: Chelvc@2023
 
-dubbo:
-  registry:
-    address: nacos://47.108.128.78:6848
-
 nacos:
   config:
     server-addr: 47.108.128.78:6848
@@ -19,6 +15,12 @@ nacos:
 oauth:
   secret: oauth.token.secret@chelvc!@#2023
 
+upload:
+  clients:
+    - path: /home/chelvc/upload
+      domain: http://file.chelvc.com
+      channel: LOCAL
+
 sms:
   clients:
     - id: LTAI5tAnS3tQqjpHdT1KqeUw

+ 6 - 4
src/main/resources/application-pre.yml

@@ -8,10 +8,6 @@ spring:
     port: 7031
     password: Chelvc@2023
 
-dubbo:
-  registry:
-    address: nacos://127.0.0.1:6848
-
 nacos:
   config:
     server-addr: 127.0.0.1:6848
@@ -19,6 +15,12 @@ nacos:
 oauth:
   secret: oauth.token.secret@chelvc!@#2023
 
+upload:
+  clients:
+    - path: /home/chelvc/upload
+      domain: http://file.chelvc.com
+      channel: LOCAL
+
 sms:
   clients:
     - id: LTAI5tAnS3tQqjpHdT1KqeUw

+ 6 - 4
src/main/resources/application-prod.yml

@@ -8,10 +8,6 @@ spring:
     port: 7031
     password: Chelvc@2023
 
-dubbo:
-  registry:
-    address: nacos://127.0.0.1:6848
-
 nacos:
   config:
     server-addr: 127.0.0.1:6848
@@ -19,6 +15,12 @@ nacos:
 oauth:
   secret: oauth.token.secret@chelvc!@#2023
 
+upload:
+  clients:
+    - path: /home/chelvc/upload
+      domain: http://file.chelvc.com
+      channel: LOCAL
+
 sms:
   clients:
     - id: LTAI5tAnS3tQqjpHdT1KqeUw

+ 6 - 4
src/main/resources/application-test.yml

@@ -8,10 +8,6 @@ spring:
     port: 7031
     password: Chelvc@2023
 
-dubbo:
-  registry:
-    address: nacos://127.0.0.1:6848
-
 nacos:
   config:
     server-addr: 127.0.0.1:6848
@@ -19,6 +15,12 @@ nacos:
 oauth:
   secret: oauth.token.secret@chelvc!@#2023
 
+upload:
+  clients:
+    - path: /home/chelvc/upload
+      domain: http://file.chelvc.com
+      channel: LOCAL
+
 sms:
   clients:
     - id: LTAI5tAnS3tQqjpHdT1KqeUw

+ 1 - 17
src/main/resources/application.yml

@@ -37,20 +37,4 @@ spring:
 
 nacos:
   config:
-    namespace: ${spring.profiles.active}
-
-dubbo:
-  protocol:
-    name: dubbo
-    port: 20100
-  application:
-    name: ${spring.application.name}
-    register-mode: instance
-  provider:
-    group: ${spring.profiles.active}
-    filter: -exception,customException
-  consumer:
-    group: ${spring.profiles.active}
-    check: false
-    timeout: 10000
-    retries: 0
+    namespace: ${spring.profiles.active}

+ 0 - 0
src/main/resources/config.properties


+ 4 - 5
src/main/resources/logback-spring.xml

@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
-	<contextName>admin</contextName>
-
-	<springProperty name="LOG_PATH" source="logging.path" defaultValue="./"/>
+	<property name="app" value="admin"/>
+	<springProperty name="path" source="logging.path" defaultValue="./"/>
 
 	<turboFilter class="com.chelvc.framework.base.interceptor.DynamicLoggingInterceptor"/>
 
@@ -14,13 +13,13 @@
 	</appender>
 
 	<appender name="FILE_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
-		<file>${LOG_PATH}/admin.log</file>
+		<file>${path}/${app}.log</file>
 		<encoder>
 			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger: %msg%n</pattern>
 			<charset>UTF-8</charset>
 		</encoder>
 		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-			<fileNamePattern>${LOG_PATH}/admin-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+			<fileNamePattern>${path}/${app}-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
 			<maxFileSize>10MB</maxFileSize>
 			<maxHistory>7</maxHistory>
 		</rollingPolicy>