Browse Source

垫款 获取政策返点接口

zhaoxian 2 năm trước cách đây
mục cha
commit
dd91d93298

+ 14 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/finance/payment/controller/FinancePaymentApplicationController.java

@@ -242,4 +242,18 @@ public class FinancePaymentApplicationController {
     }
 
 
+    @GetMapping(value = "/queryCwjsPolicyInfo")
+    public Result<Object> queryCwjsPolicyInfo(String advertiserName, String productName, String type) {
+        try {
+            if (Check.isNull(advertiserName) || Check.isNull(productName) || Check.isNull(type)) {
+                return Result.error("缺少参数");
+            }
+            return financePaymentApplicationService.queryCwjsPolicyInfo(advertiserName, productName, type);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return Result.error("查询异常");
+    }
+
+
 }

+ 2 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/finance/payment/mapper/FinancePaymentApplicationMapper.java

@@ -25,4 +25,6 @@ public interface FinancePaymentApplicationMapper extends BaseMapper<FinancePayme
     List<JSONObject> queryAuditProcess(@Param("id") Long id);
 
     FinancePaymentApplication queryInfo(String advertiserId, String productId, String type);
+
+    JSONObject queryCwjsPolicyInfo(String advertiserName, String productName, String type);
 }

+ 21 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/finance/payment/mapper/xml/FinancePaymentApplicationMapper.xml

@@ -79,6 +79,27 @@
         order by update_time desc Limit 1;
     </select>
 
+    <select id="queryCwjsPolicyInfo" resultType="com.alibaba.fastjson.JSONObject">
+        SELECT
+            t1.id as 'id',
+            t1.advertiser_name as 'advertiserName',
+            t1.media_type as 'mediaType',
+            t2.policy_product_name as 'policyProductName',
+            approved_status as 'approvedStatus',
+            advance_pay as 'advancePay',
+            rebate_type as 'rebateType',
+            rebate_rate as 'rebateRate',
+            policy_start_date as 'policyStartDate',
+            policy_end_date as 'policyEndDate'
+        FROM
+            `ctop_cwjs_policy_info` t1
+                LEFT JOIN ctop_cwjs_policy_product t2 ON t1.id = t2.policy_id
+        WHERE t1.advertiser_name =#{advertiserName}
+          AND t1.media_type =#{type}
+          AND t2.policy_product_name =#{productName}
+        ORDER BY policy_start_date desc,policy_end_date desc
+            LIMIT 1
+    </select>
 
     <select id="queryAuditProcess" resultType="com.alibaba.fastjson.JSONObject">
         SELECT *

+ 2 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/finance/payment/service/IFinancePaymentApplicationService.java

@@ -30,4 +30,6 @@ public interface IFinancePaymentApplicationService extends IService<FinancePayme
     Result<Object> queryAuditProcess(Long id);
 
     Result<Object> queryInfo(String advertiserId, String productId, String type);
+
+    Result<Object> queryCwjsPolicyInfo(String advertiserName, String productName, String type);
 }

+ 5 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/finance/payment/service/impl/FinancePaymentApplicationServiceImpl.java

@@ -216,6 +216,11 @@ public class FinancePaymentApplicationServiceImpl extends ServiceImpl<FinancePay
         return Result.ok(baseMapper.queryInfo(advertiserId, productId, type));
     }
 
+    @Override
+    public Result<Object> queryCwjsPolicyInfo(String advertiserName, String productName, String type) {
+        return Result.ok(baseMapper.queryCwjsPolicyInfo(advertiserName, productName, type));
+    }
+
     /**
      * 获取审核人
      * 1、磁力金牛    垫款        审核人 --吴睿刚(4aba62011120ac565c7f2b9f8f4aa96b)