ソースを参照

钱包接口增加中台接口,预付和预收统计接口

xucaiqin 2 年 前
コミット
5ff4018d4b

+ 2 - 2
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletController.java

@@ -158,7 +158,7 @@ public class WalletController {
      */
     @GetMapping("prePayCount")
     public HttpResult prePayCount(String entName) {
-        return HttpResult.ok(walletService.walletCount(entName));
+        return HttpResult.ok(walletService.prePayCount(entName));
     }
 
     /**
@@ -179,7 +179,7 @@ public class WalletController {
      */
     @GetMapping("preReceiveCount")
     public HttpResult preReceiveCount(String entName) {
-        return HttpResult.ok(walletService.walletCount(entName));
+        return HttpResult.ok(walletService.preReceiveCount(entName));
     }
 
     /**

+ 2 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/constant/PayCenterEnum.java

@@ -32,7 +32,9 @@ public enum PayCenterEnum {
     ADVANCE_PAY_APPLY("/v1/wallet/advancepay/apply", "发起预付"),
     ADVANCE_PAY_INDEX("/v1/wallet/advancepay/index", "预付订单清单"),
     ADVANCE_PAY_WALLETS("/v2/advancepay/wallets", "钱包预付列表"),
+    ADVANCE_PAY_PAY_CHANNELS("/v2/advancepay/pay/channels", "钱包预付通道统计"),
     ADVANCE_PAY_RECEIVE("/v2/advancepay/receives", "钱包预收列表"),
+    ADVANCE_PAY_RECEIVE_CHANNELS("/v2/advancepay/receive/channels", "钱包预收通道统计"),
     ADVANCE_PAY_STATUS("/v1/wallet/advancepay/statusCategory", "预付订单状态"),
     INDEX("/v1/index/index", "获取通道清单"),
     MEMBER_PAY_INDEX("/v1/member/pay/index", "订单记录"),

+ 23 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/wallet/ChannelStatistics.java

@@ -0,0 +1,23 @@
+package com.sckw.payment.model.dto.wallet;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 渠道统计
+ * @author xucaiqin
+ * @date 2023-09-15 14:26:20
+ */
+@NoArgsConstructor
+@Data
+public class ChannelStatistics {
+    @JSONField(name = "uid")
+    private String uid;
+    @JSONField(name = "channel")
+    private String channel;
+    @JSONField(name = "channel_label")
+    private String channelLabel;
+    @JSONField(name = "count")
+    private Integer count;
+}

+ 31 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/PayCenterService.java

@@ -609,6 +609,21 @@ public class PayCenterService {
         });
     }
 
+    /**
+     * 钱包预付通道统计
+     *
+     * @param uid
+     * @param filter
+     * @return
+     */
+    public R<List<ChannelStatistics>> advancePayWalletChannels(String uid, String filter) {
+        String sync = getHttp(PayCenterEnum.ADVANCE_PAY_PAY_CHANNELS, new HashMap<>() {{
+            put("uid", uid);
+            put("filter", filter);
+        }});
+        return parseArray(sync, ChannelStatistics.class);
+    }
+
     /**
      * 钱包预收列表
      *
@@ -631,6 +646,22 @@ public class PayCenterService {
         });
     }
 
+    /**
+     * 钱包预收通道统计
+     *
+     * @param uid
+     * @param filter
+     * @return
+     */
+    public R<PrePayWalletPage> advancePayReceiveChannels(String uid, String filter) {
+        String sync = getHttp(PayCenterEnum.ADVANCE_PAY_RECEIVE_CHANNELS, new HashMap<>() {{
+            put("uid", uid);
+            put("filter", filter);
+        }});
+        return JSONObject.parseObject(sync, new TypeReference<>() {
+        });
+    }
+
     /**
      * 预付订单状态
      *