Qchen 2 ماه پیش
والد
کامیت
7968b2eef1

+ 32 - 2
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/client/LocalLivingClient.java

@@ -1,6 +1,7 @@
 package com.jzg.quotation.summary.client;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.jzg.commons.core.page.HttpResult;
 import com.jzg.commons.entity.dto.GenerateQrcodeParam;
@@ -10,6 +11,8 @@ import com.jzg.commons.entity.vo.LotteryCountVO;
 import com.jzg.commons.entity.vo.UnifiedUserClientVO;
 import com.jzg.quotation.summary.entity.Result;
 import com.jzg.quotation.summary.entity.dto.*;
+import com.jzg.quotation.summary.entity.vo.ChannelCategoryVo;
+import com.jzg.quotation.summary.entity.vo.ChannelProductInfoVo;
 import com.jzg.quotation.summary.entity.vo.ChannelRightsPackageVO;
 import com.jzg.quotation.summary.entity.vo.ChannelRightsVO;
 import com.jzg.quotation.summary.utils.FeignConfig;
@@ -52,7 +55,7 @@ public interface LocalLivingClient {
      * @return 分页结果
      */
     @PostMapping(value = "/channel/api/rightsGrant/package/list")
-    Result<IPage<ChannelRightsPackageVO>> queryRightsPackagePage(@RequestBody ChannelRightsPackageQueryDTO queryDTO);
+    Result<Page<ChannelRightsPackageVO>> queryRightsPackagePage(@RequestBody ChannelRightsPackageQueryDTO queryDTO);
 
     /**
      * 查询权益套餐明细
@@ -68,7 +71,34 @@ public interface LocalLivingClient {
      * @return 分页结果
      */
     @PostMapping(value = "/channel/api/rightsGrant/rights/list")
-    Result<IPage<ChannelRightsVO>> queryRightsPage(@RequestBody ChannelRightsQueryDTO queryDTO);
+    Result<Page<ChannelRightsVO>> queryRightsPage(@RequestBody ChannelRightsQueryDTO queryDTO);
+
+    /**
+     * 查询权益分类
+     *
+     * @param
+     * @return
+     */
+    @PostMapping("/channel/api/rightsGrant/get/category/list")
+    Result<List<ChannelRightsCategoryDto>> queryCategoryList();
+
+    /**
+     * 查询权益分类-二级页面
+     *
+     * @param
+     * @return
+     */
+    @PostMapping("/channel/api/rightsGrant/get/category")
+    Result<List<ChannelCategoryVo>> queryCategory();
+
+    /**
+     * 优惠券商品详情
+     *
+     * @param channelProductInfoQueryDTO
+     * @return
+     */
+    @PostMapping("/channel/api/rightsGrant/get/product")
+    Result<List<ChannelProductInfoVo>> getProduct(@RequestBody ChannelProductInfoQueryDTO channelProductInfoQueryDTO);
 
     /**
      * 查询抽奖活动规则

+ 48 - 6
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/RightsGrantController.java

@@ -1,10 +1,13 @@
 package com.jzg.quotation.summary.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jzg.commons.core.page.HttpResult;
 import com.jzg.quotation.summary.client.LocalLivingClient;
 import com.jzg.quotation.summary.entity.Result;
 import com.jzg.quotation.summary.entity.dto.*;
+import com.jzg.quotation.summary.entity.vo.ChannelCategoryVo;
+import com.jzg.quotation.summary.entity.vo.ChannelProductInfoVo;
 import com.jzg.quotation.summary.entity.vo.ChannelRightsPackageVO;
 import com.jzg.quotation.summary.entity.vo.ChannelRightsVO;
 import io.swagger.v3.oas.annotations.Operation;
@@ -74,11 +77,11 @@ public class RightsGrantController {
 
     @Operation(summary = "权益套餐-分页查询")
     @PostMapping(value = "package/list")
-    public HttpResult<IPage<ChannelRightsPackageVO>> queryRightsPackagePage(@RequestBody ChannelRightsPackageQueryDTO queryDTO) {
+    public HttpResult<Page<ChannelRightsPackageVO>> queryRightsPackagePage(@RequestBody ChannelRightsPackageQueryDTO queryDTO) {
         //调生活服务平台
-        Result<IPage<ChannelRightsPackageVO>> result = localLivingClient.queryRightsPackagePage(queryDTO);
+        Result<Page<ChannelRightsPackageVO>> result = localLivingClient.queryRightsPackagePage(queryDTO);
         //把生活服务平台查询到的数据封装成返回jzg前端HttpResult对象
-        HttpResult<IPage<ChannelRightsPackageVO>> rightsPackageResult = new HttpResult<>();
+        HttpResult<Page<ChannelRightsPackageVO>> rightsPackageResult = new HttpResult<>();
 
         rightsPackageResult.setData(result.getResult());
         rightsPackageResult.setCode(result.getCode());
@@ -107,14 +110,53 @@ public class RightsGrantController {
      */
     @Operation(summary = "权益券-分页查询")
     @PostMapping(value = "/rights/list")
-    public HttpResult<IPage<ChannelRightsVO>> queryRightsPage(@RequestBody ChannelRightsQueryDTO queryDTO) {
+    public HttpResult<Page<ChannelRightsVO>> queryRightsPage(@RequestBody ChannelRightsQueryDTO queryDTO) {
         //调生活服务平台
-        Result<IPage<ChannelRightsVO>> result = localLivingClient.queryRightsPage(queryDTO);
+        Result<Page<ChannelRightsVO>> result = localLivingClient.queryRightsPage(queryDTO);
         //把生活服务平台查询到的数据封装成返回jzg前端HttpResult对象
-        HttpResult<IPage<ChannelRightsVO>> rightsResult = new HttpResult<>();
+        HttpResult<Page<ChannelRightsVO>> rightsResult = new HttpResult<>();
         rightsResult.setData(result.getResult());
         rightsResult.setCode(result.getCode());
         rightsResult.setMsg(result.getMessage());
         return rightsResult;
     }
+
+    @Operation(summary = "权益券-分类查询")
+    @PostMapping(value = "/get/category/list")
+    public HttpResult<List<ChannelRightsCategoryDto>> getCategoryList() {
+        //调生活服务平台
+        Result<List<ChannelRightsCategoryDto>> result = localLivingClient.queryCategoryList();
+        //把生活服务平台查询到的数据封装成返回jzg前端HttpResult对象
+        HttpResult<List<ChannelRightsCategoryDto>> categoryResult = new HttpResult<>();
+        categoryResult.setData(result.getResult());
+        categoryResult.setCode(result.getCode());
+        categoryResult.setMsg(result.getMessage());
+        return categoryResult;
+    }
+
+    @Operation(summary = "权益券-二级分类查询")
+    @PostMapping(value = "/get/category")
+    public HttpResult<List<ChannelCategoryVo>> getCategory() {
+        //调生活服务平台
+        Result<List<ChannelCategoryVo>> result = localLivingClient.queryCategory();
+        //把生活服务平台查询到的数据封装成返回jzg前端HttpResult对象
+        HttpResult<List<ChannelCategoryVo>> categoryResult = new HttpResult<>();
+        categoryResult.setData(result.getResult());
+        categoryResult.setCode(result.getCode());
+        categoryResult.setMsg(result.getMessage());
+        return categoryResult;
+    }
+
+    @Operation(summary = "权益券商品详情")
+    @PostMapping(value = "/get/product")
+    public HttpResult<List<ChannelProductInfoVo>> getProduct(@RequestBody ChannelProductInfoQueryDTO channelProductInfoQueryDTO) {
+        //调生活服务平台
+        Result<List<ChannelProductInfoVo>> channelApplicableStoresVo = localLivingClient.getProduct(channelProductInfoQueryDTO);
+        //把生活服务平台查询到的数据封装成返回jzg前端HttpResult对象
+        HttpResult<List<ChannelProductInfoVo>> productResult = new HttpResult<>();
+        productResult.setData(channelApplicableStoresVo.getResult());
+        productResult.setCode(channelApplicableStoresVo.getCode());
+        productResult.setMsg(channelApplicableStoresVo.getMessage());
+        return productResult;
+    }
 }

+ 4 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/interceptor/LiveServiceTokenInterceptor.java

@@ -29,7 +29,10 @@ public class LiveServiceTokenInterceptor implements RequestInterceptor {
             "/rightsGrant/package/detail",
             "/rightsGrant/rights/list",
             "/rightsGrant/apiGrant",
-            "/rightsGrant/native/distribution"
+            "/rightsGrant/native/distribution",
+            "/rightsGrant/get/category/list",
+            "/rightsGrant/get/category",
+            "/rightsGrant/get/product"
     );
     @Override
     public void apply(RequestTemplate requestTemplate) {