Browse Source

平台查询

gongfuzhu 1 year ago
parent
commit
a34756991c

+ 2 - 2
SpringBatchServiceClient/src/main/java/com/zswl/cloud/springBatch/client/model/dfy/Ticket/request/ScenicListRequest.java

@@ -12,8 +12,8 @@ public class ScenicListRequest extends DfyBaseData {
 
 
         private String key;
-        private String page;
-        private String pageSize;
+        private Integer page;
+        private Integer pageSize;
 
 
 }

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

@@ -1,15 +1,13 @@
 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;
 import com.github.microservice.auth.security.type.AuthType;
 import com.zhongshu.payment.client.model.order.AdminSeachOrderModel;
 import com.zhongshu.payment.client.model.order.ApplicantRefundParamModel;
-import com.zhongshu.payment.client.model.order.v2.ApplicantRefundParam2Model;
-import com.zhongshu.payment.client.model.order.v2.RefundParam2Model;
-import com.zhongshu.payment.client.model.order.v2.TransferModel;
-import com.zhongshu.payment.client.model.order.v2.WithdrawRequestModel;
+import com.zhongshu.payment.client.model.order.v2.*;
 import com.zhongshu.payment.client.model.payment.CloseResponsetModel;
 import com.zhongshu.payment.client.model.payment.CreateResponseModel;
 import com.zhongshu.payment.client.model.payment.QueryRequestModel;
@@ -120,9 +118,9 @@ public class PaymentController {
 
     @ApiOperation("平台查询 额度信息")
     @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform)
-    @RequestMapping(value = "account/platformDetail", method = RequestMethod.GET)
-    public ResultContent platformDetail() {
-        return paymentServer.platformDetail();
+    @PostMapping(value = "account/platformDetail")
+    public ResultContent platformDetail(@RequestBody ChannelModel channel) {
+        return paymentServer.platformDetail(channel.getChannel());
     }
 
 
@@ -136,9 +134,9 @@ public class PaymentController {
 
     @ApiOperation("平台_提现按钮")
     @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform)
-    @RequestMapping(value = "account/withdrawalsPlatform", method = RequestMethod.GET)
-    public ResultContent withdrawalsPlatform() {
-        return paymentServer.withdrawalsPlatform();
+    @RequestMapping(value = "account/withdrawalsPlatform", method = RequestMethod.POST)
+    public ResultContent withdrawalsPlatform(@RequestBody ChannelModel channel) {
+        return paymentServer.withdrawalsPlatform(channel.getChannel());
     }
 
     @ApiOperation("店铺_提现订单列表")
@@ -149,6 +147,7 @@ public class PaymentController {
     public ResultContent withdrawalsList(@RequestBody WithdrawRequestModel withdrawRequestModel) {
         return paymentServer.withdrawalsList(withdrawRequestModel);
     }
+
     @ApiOperation("店铺_提现订单列表")
     @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform)
     @RequestMapping(value = "account/withdrawals/platform/list", method = RequestMethod.POST)
@@ -171,6 +170,7 @@ public class PaymentController {
     public ResultContent subOrdersConfirm(@RequestBody SubOrderModel subOrderModel) {
         return paymentServer.subOrdersConfirm(subOrderModel.getGoodId(), subOrderModel.getUseShop());
     }
+
     @ApiOperation("异步通知")
     @PostMapping(value = "sync")
     public String sync(@RequestBody SyncInformModel syncInformModel) {

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

@@ -12,6 +12,7 @@ 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.service.v2.PaymentService2;
+import com.zhongshu.payment.client.type.Channel;
 import com.zswl.cloud.shop.client.service.GoodsService;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -35,7 +36,6 @@ public class PaymentService {
         CreatePayment2Model createPayment2Model = new CreatePayment2Model();
         BeanUtils.copyProperties(createPaymentModel, createPayment2Model);
         createPayment2Model.setAuthUserId(authHelper.getCurrentUser().getUserId());
-
         return paymentService2.creatPayOrder(createPayment2Model);
     }
 
@@ -83,16 +83,16 @@ public class PaymentService {
         return paymentService2.getDetail(authHelper.getEnterPriseId());
     }
 
-    public ResultContent platformDetail() {
-        return paymentService2.getDetail("PLATFORM");
+    public ResultContent platformDetail(Channel channel) {
+        return paymentService2.getDetail(channel.name());
     }
 
     public ResultContent withdrawals() {
         return paymentService2.applicationWithdrawals(authHelper.getEnterPriseId());
     }
 
-    public ResultContent withdrawalsPlatform() {
-        return paymentService2.applicationWithdrawals("PLATFORM");
+    public ResultContent withdrawalsPlatform(Channel channel) {
+        return paymentService2.applicationWithdrawals(channel.name());
     }
 
     public ResultContent withdrawalsList(WithdrawRequestModel withdrawRequestModel) {
@@ -102,7 +102,7 @@ public class PaymentService {
     }
 
     public ResultContent withdrawalsPlatformList(WithdrawRequestModel withdrawRequestModel) {
-        withdrawRequestModel.setShopId("PLATFORM");
+        withdrawRequestModel.setShopId(withdrawRequestModel.getChannel().name());
 
         return paymentService2.withdrawalsList(withdrawRequestModel);
     }

+ 29 - 0
SpringBatchServiceServer/src/main/java/com/zswl/cloud/springBtach/server/core/service/impl/DfyTicketServiceImpl.java

@@ -75,4 +75,33 @@ public class DfyTicketServiceImpl implements DfyTicketService {
         return ResultContent.buildContent(ticketApi.tuiPiao(tuiPiaoRequest));
 
     }
+
+
+    public void sync() {
+
+
+        int pageNo = 1;
+        int pageSize = 10;
+        ScenicListRequest scenicListRequest = new ScenicListRequest();
+        scenicListRequest.setPage(pageNo);
+        scenicListRequest.setPageSize(pageSize);
+
+        ScenicListResponse scenicListResponse = ticketApi.scenicList(scenicListRequest);
+        Integer totalCount = scenicListResponse.getData().getTotalCount();
+
+        while (true){
+
+            for (ScenicListResponse.rows row : scenicListResponse.getData().getRows()) {
+
+                String scenicId = row.getScenicId();
+                String scenicName = row.getScenicName();
+                String newPicUrl = row.getNewPicUrl();
+                String address = row.getAddress();
+
+
+            }
+
+
+        }
+    }
 }

+ 29 - 0
SpringBatchServiceServer/src/main/java/com/zswl/cloud/springBtach/server/core/timer/DfyTimer.java

@@ -0,0 +1,29 @@
+package com.zswl.cloud.springBtach.server.core.timer;
+
+import com.github.microservice.auth.client.content.ResultContent;
+import com.zhongshu.payment.client.model.order.v2.GoodsResultModel;
+import com.zhongshu.payment.client.service.v2.OrderService2;
+import com.zhongshu.payment.client.service.v2.PaymentService2;
+import com.zhongshu.payment.client.type.RedisEventType;
+import com.zswl.cloud.springBatch.client.model.dfy.Ticket.request.ScenicListRequest;
+import com.zswl.cloud.springBatch.client.model.dfy.Ticket.response.ScenicListResponse;
+import com.zswl.cloud.springBtach.server.core.api.dfy.TicketApi;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.util.Set;
+
+@Component
+public class DfyTimer {
+
+    @Autowired
+    TicketApi ticketApi;
+
+    @Scheduled(cron = "0 0 2 * * ?")
+    public void processDelayedQueue() {
+
+
+    }
+}