TRX vor 1 Jahr
Ursprung
Commit
b6a8fecc53

+ 1 - 1
PaymentClient/src/main/java/com/zhongshu/payment/client/payModel/unionFrictionlessPay/model/UnionUserOpenInfoModel.java

@@ -1,7 +1,7 @@
 package com.zhongshu.payment.client.payModel.unionFrictionlessPay.model;
 
 import com.zhongshu.card.client.model.base.SuperModel;
-import com.zhongshu.payment.client.types.unionFrictionlessPayType.UnionUserOpenType;
+import com.github.microservice.types.unionFrictionlessPayType.UnionUserOpenType;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 

+ 1 - 1
PaymentClient/src/main/java/com/zhongshu/payment/client/payModel/unionFrictionlessPay/model/UnionUserOpenInfoSearch.java

@@ -1,7 +1,7 @@
 package com.zhongshu.payment.client.payModel.unionFrictionlessPay.model;
 
 import com.zhongshu.card.client.model.base.SuperSearch;
-import com.zhongshu.payment.client.types.unionFrictionlessPayType.UnionUserOpenType;
+import com.github.microservice.types.unionFrictionlessPayType.UnionUserOpenType;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 

+ 0 - 21
PaymentClient/src/main/java/com/zhongshu/payment/client/types/unionFrictionlessPayType/ContractState.java

@@ -1,21 +0,0 @@
-package com.zhongshu.payment.client.types.unionFrictionlessPayType;
-
-/**
- * 无感支付签约状态
- */
-public enum ContractState {
-
-    UNSIGNED("未签约"),
-    SIGNED("已签约"),
-    RESCISSION("已解约"),
-    DELETING_CONTRACT("解约中"),
-    UNKNOWN("未知"),
-    ;
-
-    // 名称
-    private String name;
-
-    ContractState(String name) {
-        this.name = name;
-    }
-}

+ 0 - 18
PaymentClient/src/main/java/com/zhongshu/payment/client/types/unionFrictionlessPayType/UnionUserOpenType.java

@@ -1,18 +0,0 @@
-package com.zhongshu.payment.client.types.unionFrictionlessPayType;
-
-/**
- * 签约类型
- */
-public enum UnionUserOpenType {
-
-    Shop("商户"),//
-    User("用户"),//
-    ;
-
-    // 名称
-    private String name;
-
-    UnionUserOpenType(String name) {
-        this.name = name;
-    }
-}

+ 2 - 2
PaymentServer/src/main/java/com/zhongshu/payment/server/core/domain/unionFrictionlessPay/UnionUserOpenInfo.java

@@ -1,7 +1,7 @@
 package com.zhongshu.payment.server.core.domain.unionFrictionlessPay;
 
-import com.zhongshu.payment.client.types.unionFrictionlessPayType.ContractState;
-import com.zhongshu.payment.client.types.unionFrictionlessPayType.UnionUserOpenType;
+import com.github.microservice.types.unionFrictionlessPayType.ContractState;
+import com.github.microservice.types.unionFrictionlessPayType.UnionUserOpenType;
 import com.zhongshu.payment.server.core.domain.base.SuperMain;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;

+ 10 - 5
PaymentServer/src/main/java/com/zhongshu/payment/server/core/service/pay/impl/unionFrictionlessPay/UnionFrictionlessPayMainService.java

@@ -1,12 +1,13 @@
 package com.zhongshu.payment.server.core.service.pay.impl.unionFrictionlessPay;
 
-import cn.hutool.json.JSONArray;
 import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
+import com.github.microservice.app.stream.StreamHelper;
 import com.github.microservice.models.requestModel.SuperResponseModel;
 import com.github.microservice.models.type.PaymentType;
 import com.github.microservice.net.ResultContent;
 import com.zhongshu.card.client.service.feign.OrganizationFeignService;
+import com.zhongshu.card.client.service.feign.UserFeignService;
 import com.zhongshu.card.client.utils.DateUtils;
 import com.zhongshu.payment.client.annotation.PayAnnotationService;
 import com.zhongshu.payment.client.model.WalletModel;
@@ -17,20 +18,18 @@ import com.zhongshu.payment.client.payModel.commn.CreateOrderParam;
 import com.zhongshu.payment.client.payModel.commn.PayNotifyParam;
 import com.zhongshu.payment.client.payModel.commn.PayOrderParam;
 import com.zhongshu.payment.client.payModel.unionFrictionlessPay.model.*;
-import com.zhongshu.payment.client.types.unionFrictionlessPayType.ContractState;
-import com.zhongshu.payment.client.types.unionFrictionlessPayType.UnionUserOpenType;
+import com.github.microservice.types.unionFrictionlessPayType.ContractState;
+import com.github.microservice.types.unionFrictionlessPayType.UnionUserOpenType;
 import com.zhongshu.payment.server.core.dao.unionFrictionlessPay.UnionUserOpenInfoDao;
 import com.zhongshu.payment.server.core.domain.unionFrictionlessPay.UnionUserOpenInfo;
 import com.zhongshu.payment.server.core.service.org.CollectionIdService;
 import com.zhongshu.payment.server.core.service.pay.SuperPayService;
 import com.zhongshu.payment.server.core.service.pay.impl.unionFrictionlessPay.config.UnionFrictionlessPayApiConfig;
-import com.zhongshu.payment.server.core.service.pay.impl.unionFrictionlessPay.config.UnionFrictionlessPayConfig;
 import com.zhongshu.payment.server.core.service.pay.impl.unionFrictionlessPay.config.UnionPaymentConfig;
 import com.zhongshu.payment.server.core.utils.AesUtils;
 import jakarta.servlet.http.HttpServletRequest;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
-import org.checkerframework.checker.units.qual.A;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -62,6 +61,12 @@ public class UnionFrictionlessPayMainService extends SuperPayService {
     @Autowired
     CollectionIdService collectionIdService;
 
+    @Autowired
+    UserFeignService userFeignService;
+
+    @Autowired
+    StreamHelper streamHelper;
+
     /**
      * 发起签约
      *

+ 9 - 0
PaymentServer/src/main/java/com/zhongshu/payment/server/core/service/pay/impl/unionFrictionlessPay/UnionNotifyService.java

@@ -1,7 +1,10 @@
 package com.zhongshu.payment.server.core.service.pay.impl.unionFrictionlessPay;
 
+import com.github.microservice.app.stream.StreamHelper;
 import com.github.microservice.core.helper.JsonHelper;
 import com.github.microservice.net.ResultContent;
+import com.github.microservice.stream.PaymentStreamType;
+import com.github.microservice.stream.model.SignModel;
 import com.zhongshu.payment.client.payModel.unionFrictionlessPay.model.PayNotifyResponse;
 import com.zhongshu.payment.client.payModel.unionFrictionlessPay.model.SignNotifyParam;
 import jakarta.servlet.ServletInputStream;
@@ -25,6 +28,9 @@ public class UnionNotifyService {
     @Autowired
     JsonHelper jsonHelper;
 
+    @Autowired
+    StreamHelper streamHelper;
+
     /**
      * 无感支付签约回调 (解约也调用该接口)
      *
@@ -45,6 +51,9 @@ public class UnionNotifyService {
         log.info("签约通知字符串: {}", body);
         SignNotifyParam signNotifyParam = jsonHelper.toObject(body, SignNotifyParam.class);
 
+        SignModel signModel = new SignModel();
+        streamHelper.send(PaymentStreamType.UnionFrictionStateStream.name(), signModel);
+
         return ResultContent.buildSuccess();
     }