Browse Source

垫款功能,添加端口类型逻辑

zhaoxian 2 years ago
parent
commit
e60bbf3308

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

@@ -216,6 +216,16 @@ public class FinancePaymentPoolController {
         return Result.error("查询异常");
     }
 
+    @GetMapping(value = "/queryPaymentPort")
+    public Result<Object> queryPaymentPort(String advertiserId, Long productId, String paymentMedia) {
+        try {
+            return financePaymentPoolService.queryPaymentPort(advertiserId, productId, paymentMedia);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return Result.error("查询异常");
+    }
+
     @Autowired
     private IKuaishouInterfaceService iKuaishouInterfaceService;
     @Autowired

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

@@ -25,4 +25,5 @@ public interface FinancePaymentPoolMapper extends BaseMapper<FinancePaymentPool>
 
     FinancePaymentPool queryFinancePaymentPoolById(@Param("advertiserId") String advertiserId, @Param("productId") Long productId, @Param("paymentMedia") String paymentMedia, @Param("paymentPort") String paymentPort);
 
+    List<JSONObject> queryPaymentPort(String advertiserId, Long productId, String paymentMedia);
 }

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

@@ -84,4 +84,19 @@
         </if>
     </select>
 
+
+    <select id="queryPaymentPort" resultType="com.alibaba.fastjson.JSONObject">
+        SELECT payment_port as 'paymentPort', CASE payment_port
+                                                  WHEN 1 THEN '汇创'
+                                                  WHEN 2 THEN '骄阳'
+                                                  WHEN 3 THEN '江西五七'
+                                                  WHEN 4 THEN '北京五六七'
+            end as 'portName'
+        FROM finance_payment_pool
+        WHERE advertiser_id = #{advertiserId}
+          AND product_id = #{productId}
+          AND payment_media = #{paymentMedia}
+          AND payment_port = #{paymentPort}
+    </select>
+
 </mapper>

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

@@ -27,4 +27,6 @@ public interface IFinancePaymentPoolService extends IService<FinancePaymentPool>
     Result<Object> queryPoolProjectList(String advertiserId, Long productId, String type);
 
     Result<Object> queryPoolAmountById(String advertiserId, Long productId, String type, String paymentPort);
+
+    Result<Object> queryPaymentPort(String advertiserId, Long productId, String paymentMedia);
 }

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

@@ -120,4 +120,9 @@ public class FinancePaymentPoolServiceImpl extends ServiceImpl<FinancePaymentPoo
     public Result<Object> queryPoolAmountById(String advertiserId, Long productId, String type, String paymentPort) {
         return Result.ok(baseMapper.queryFinancePaymentPoolById(advertiserId, productId, type, paymentPort));
     }
+
+    @Override
+    public Result<Object> queryPaymentPort(String advertiserId, Long productId, String paymentMedia) {
+        return Result.ok(baseMapper.queryPaymentPort(advertiserId, productId, paymentMedia));
+    }
 }