gongfuzhu 1 年之前
父節點
當前提交
a510eb9565

+ 18 - 4
SpringBatchServiceServer/src/main/java/com/zswl/cloud/springBtach/server/core/controller/PaymentController.java

@@ -1,6 +1,5 @@
 package com.zswl.cloud.springBtach.server.core.controller;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import com.github.microservice.auth.client.constant.AuthConstant;
 import com.github.microservice.auth.client.content.ResultContent;
 import com.github.microservice.auth.security.annotations.ResourceAuth;
@@ -12,6 +11,7 @@ import com.zhongshu.payment.client.model.payment.CloseResponsetModel;
 import com.zhongshu.payment.client.model.payment.CreateResponseModel;
 import com.zhongshu.payment.client.model.payment.QueryRequestModel;
 import com.zhongshu.payment.client.model.payment.zswl.ApplyWithdrawalsModel;
+import com.zhongshu.payment.client.model.payment.zswl.AuditWithdrawalsModel;
 import com.zhongshu.payment.client.model.payment.zswl.CreatePaymentModel;
 import com.zhongshu.payment.client.model.payment.zswl.SyncInformModel;
 import com.zswl.cloud.springBtach.server.core.model.SubOrderModel;
@@ -130,14 +130,14 @@ public class PaymentController {
     @ResourceAuth(value = "admin", type = AuthType.Project)
     @RequestMapping(value = "account/withdrawals", method = RequestMethod.POST)
     public ResultContent withdrawals(@RequestBody ApplyWithdrawalsModel applyWithdrawalsModel) {
-        return paymentServer.withdrawals(applyWithdrawalsModel);
+        return paymentServer.applicationWithdrawals(applyWithdrawalsModel);
     }
 
     @ApiOperation("平台_提现按钮")
     @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform)
     @RequestMapping(value = "account/withdrawalsPlatform", method = RequestMethod.POST)
-    public ResultContent withdrawalsPlatform(@RequestBody ChannelModel channel) {
-        return paymentServer.withdrawalsPlatform(channel.getChannel());
+    public ResultContent withdrawalsPlatformApplication(@RequestBody ChannelModel channel) {
+        return paymentServer.withdrawalsPlatformApplication(channel.getChannel());
     }
 
     @ApiOperation("店铺_提现订单列表")
@@ -156,6 +156,20 @@ public class PaymentController {
         return paymentServer.withdrawalsPlatformList(withdrawRequestModel);
     }
 
+    @ApiOperation("审核提现")
+    @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform)
+    @RequestMapping(value = "account/withdrawals/apply", method = RequestMethod.POST)
+    public ResultContent applyWithdrawals(@RequestBody @Valid AuditWithdrawalsModel auditWithdrawalsModel) {
+        return paymentServer.applyWithdrawals(auditWithdrawalsModel);
+    }
+    @ApiOperation("提现查询")
+    @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform)
+    @RequestMapping(value = "account/withdrawals/query/{batchNo}", method = RequestMethod.POST)
+    public ResultContent queryWithdrawals(@PathVariable("batchNo") String batchNo) {
+        return paymentServer.queryWithdrawals(batchNo);
+    }
+
+
     @ApiOperation("店铺_分账明细列表")
     @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform)
     @ResourceAuth(value = "admin", type = AuthType.Enterprise)

+ 18 - 6
SpringBatchServiceServer/src/main/java/com/zswl/cloud/springBtach/server/core/service/PaymentService.java

@@ -2,16 +2,14 @@ package com.zswl.cloud.springBtach.server.core.service;
 
 import com.github.microservice.auth.client.content.ResultContent;
 import com.github.microservice.auth.security.helper.AuthHelper;
+import com.github.microservice.auth.security.model.AuthDetails;
 import com.zhongshu.payment.client.model.order.AdminSeachOrderModel;
 import com.zhongshu.payment.client.model.order.v2.ApplicantRefundParam2Model;
 import com.zhongshu.payment.client.model.order.v2.GoodsResultModel;
 import com.zhongshu.payment.client.model.order.v2.RefundParam2Model;
 import com.zhongshu.payment.client.model.order.v2.WithdrawRequestModel;
 import com.zhongshu.payment.client.model.payment.QueryResponseModel;
-import com.zhongshu.payment.client.model.payment.zswl.ApplyWithdrawalsModel;
-import com.zhongshu.payment.client.model.payment.zswl.CreatePayment2Model;
-import com.zhongshu.payment.client.model.payment.zswl.CreatePaymentModel;
-import com.zhongshu.payment.client.model.payment.zswl.SyncInformModel;
+import com.zhongshu.payment.client.model.payment.zswl.*;
 import com.zhongshu.payment.client.service.v2.OrderService2;
 import com.zhongshu.payment.client.service.v2.PaymentService2;
 import com.zhongshu.payment.client.type.Channel;
@@ -125,13 +123,13 @@ public class PaymentService {
         return paymentService2.getDetail(channel.name());
     }
 
-    public ResultContent withdrawals(ApplyWithdrawalsModel applyWithdrawalsModel) {
+    public ResultContent applicationWithdrawals(ApplyWithdrawalsModel applyWithdrawalsModel) {
         applyWithdrawalsModel.setShopId(authHelper.getEnterPriseId());
         applyWithdrawalsModel.setPlatform(false);
         return paymentService2.applicationWithdrawals(applyWithdrawalsModel);
     }
 
-    public ResultContent withdrawalsPlatform(Channel channel) {
+    public ResultContent withdrawalsPlatformApplication(Channel channel) {
         ApplyWithdrawalsModel applyWithdrawalsModel = new ApplyWithdrawalsModel();
         applyWithdrawalsModel.setShopId(channel.name());
         applyWithdrawalsModel.setChannel(channel);
@@ -157,6 +155,20 @@ public class PaymentService {
         return paymentService2.shopTransferDetail(withdrawRequestModel);
     }
 
+    public ResultContent applyWithdrawals(AuditWithdrawalsModel auditWithdrawalsModel) {
+        AuthDetails currentUser = authHelper.getCurrentUser();
+        auditWithdrawalsModel.setAuditName(currentUser.getPhone());
+        auditWithdrawalsModel.setUserId(currentUser.getUserId());
+        return paymentService2.applyWithdrawals(auditWithdrawalsModel);
+    }
+
+    public ResultContent queryWithdrawals(String batchNo) {
+        return paymentService2.queryWithdrawals(batchNo);
+    }
+
+
+
+
     public ResultContent subOrdersConfirm(String goodsId, String useShopId) {
         return paymentService2.subOrdersConfirm(goodsId, useShopId);
     }