فهرست منبع

银联通知接口

gongfuzhu 1 سال پیش
والد
کامیت
91b414b7db

+ 31 - 0
SpringBatchServiceClient/src/main/java/com/zswl/cloud/springBatch/client/model/request/XiaoJuStoreModel.java

@@ -0,0 +1,31 @@
+package com.zswl.cloud.springBatch.client.model.request;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class XiaoJuStoreModel {
+
+    private String storeId;
+    private String storeName;
+    private String address;
+    private Float lat;
+    private Float lon;
+    private String cityName;
+    private String provinceName;
+    private String brandName;
+    private String tel;
+    private String openTimeHourStart;
+    private String openTimeHourEnd;
+    private String logo;
+    private List<String> picList;
+    private List<Object> itemInfoList;
+    private Integer status;
+    private Integer invoiceManner;
+    private List<String> marketTags;
+}

+ 12 - 0
SpringBatchServiceServer/src/main/java/com/zswl/cloud/springBtach/server/core/config/MVCConfig.java

@@ -2,6 +2,8 @@ package com.zswl.cloud.springBtach.server.core.config;
 
 import com.github.microservice.core.mvc.MVCConfiguration;
 import com.github.microservice.core.mvc.MVCResponseConfiguration;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
 
@@ -11,4 +13,14 @@ import org.springframework.context.annotation.Import;
 @Configuration
 @Import({MVCConfiguration.class, MVCResponseConfiguration.class})
 public class MVCConfig {
+
+
+    @Autowired
+    MVCResponseConfiguration mvcResponseConfiguration;
+
+    @Bean
+    public void index(){
+        mvcResponseConfiguration.getIgnoreTransformUrls().add("sync");
+
+    }
 }

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

@@ -14,6 +14,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.CreatePaymentModel;
+import com.zhongshu.payment.client.model.payment.zswl.SyncInformModel;
 import com.zswl.cloud.springBtach.server.core.model.SubOrderModel;
 import com.zswl.cloud.springBtach.server.core.service.PaymentService;
 import io.swagger.annotations.ApiOperation;
@@ -170,6 +171,11 @@ public class PaymentController {
     public ResultContent subOrdersConfirm(@RequestBody SubOrderModel subOrderModel) {
         return paymentServer.subOrdersConfirm(subOrderModel.getGoodId(), subOrderModel.getUseShop());
     }
+    @ApiOperation("异步通知")
+    @RequestMapping(value = "sync", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
+    public String sync(@RequestBody SyncInformModel syncInformModel) {
+        return paymentServer.sync(syncInformModel);
+    }
 
 
 }

+ 3 - 3
SpringBatchServiceServer/src/main/java/com/zswl/cloud/springBtach/server/core/domain/XiaoJuStore.java

@@ -30,9 +30,9 @@ public class XiaoJuStore  extends SuperEntity{
     private String logo;
     private List<String> picList;
     private List<Object> itemInfoList;
-    private String status;
-    private String invoiceManner;
-    private String marketTags;
+    private Integer status;
+    private Integer invoiceManner;
+    private List<String> marketTags;
 
 
 }

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

@@ -10,6 +10,7 @@ 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.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.zswl.cloud.shop.client.service.GoodsService;
 import org.springframework.beans.BeanUtils;
@@ -105,6 +106,7 @@ public class PaymentService {
         withdrawRequestModel.setShopId(enterPriseId);
         return paymentService2.withdrawalsList(withdrawRequestModel);
     }
+
     public ResultContent withdrawalsPlatformList(WithdrawRequestModel withdrawRequestModel) {
         withdrawRequestModel.setShopId("PLATFORM");
 
@@ -121,5 +123,10 @@ public class PaymentService {
         return paymentService2.subOrdersConfirm(goodsId, useShopId);
     }
 
+    public String sync(SyncInformModel syncInformModel) {
+        paymentService2.sync(syncInformModel);
+        return "SUCCESS";
+    }
+
 
 }