|
@@ -1,4 +1,4 @@
|
|
|
-package com.zhongshu.payment.server.core.service.pay.impl.unionFrictionlessPay;
|
|
|
|
|
|
|
+package com.zhongshu.payment.server.core.pay.impl.unionFrictionlessPay;
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
import cn.hutool.json.JSONObject;
|
|
@@ -13,6 +13,8 @@ import com.github.microservice.stream.model.OrderStateModel;
|
|
|
import com.github.microservice.stream.model.SignModel;
|
|
import com.github.microservice.stream.model.SignModel;
|
|
|
import com.github.microservice.types.OrderState;
|
|
import com.github.microservice.types.OrderState;
|
|
|
import com.github.microservice.types.RefundStatus;
|
|
import com.github.microservice.types.RefundStatus;
|
|
|
|
|
+import com.github.microservice.types.unionFrictionlessPayType.ContractState;
|
|
|
|
|
+import com.github.microservice.types.unionFrictionlessPayType.UnionUserOpenType;
|
|
|
import com.github.microservice.types.unionFrictionlessPayType.WithDrawOpenState;
|
|
import com.github.microservice.types.unionFrictionlessPayType.WithDrawOpenState;
|
|
|
import com.github.microservice.types.unionFrictionlessPayType.WithDrawState;
|
|
import com.github.microservice.types.unionFrictionlessPayType.WithDrawState;
|
|
|
import com.zhongshu.card.client.model.org.OrgUserDetailParam;
|
|
import com.zhongshu.card.client.model.org.OrgUserDetailParam;
|
|
@@ -26,17 +28,20 @@ import com.zhongshu.payment.client.annotation.PayAnnotationService;
|
|
|
import com.zhongshu.payment.client.model.WalletModel;
|
|
import com.zhongshu.payment.client.model.WalletModel;
|
|
|
import com.zhongshu.payment.client.model.param.OrderParam;
|
|
import com.zhongshu.payment.client.model.param.OrderParam;
|
|
|
import com.zhongshu.payment.client.model.param.WalletQueryParam;
|
|
import com.zhongshu.payment.client.model.param.WalletQueryParam;
|
|
|
|
|
+import com.zhongshu.payment.client.pay.service.impl.impl.UnionFrictionlessPayService;
|
|
|
|
|
+import com.zhongshu.payment.client.payModel.balance.BalanceModel;
|
|
|
|
|
+import com.zhongshu.payment.client.payModel.balance.BalanceQueryParam;
|
|
|
import com.zhongshu.payment.client.payModel.commn.ClosePayOrderParam;
|
|
import com.zhongshu.payment.client.payModel.commn.ClosePayOrderParam;
|
|
|
import com.zhongshu.payment.client.payModel.commn.CreateOrderParam;
|
|
import com.zhongshu.payment.client.payModel.commn.CreateOrderParam;
|
|
|
import com.zhongshu.payment.client.payModel.commn.PayNotifyParam;
|
|
import com.zhongshu.payment.client.payModel.commn.PayNotifyParam;
|
|
|
import com.zhongshu.payment.client.payModel.commn.PayOrderParam;
|
|
import com.zhongshu.payment.client.payModel.commn.PayOrderParam;
|
|
|
-import com.zhongshu.payment.client.payModel.cooperator.*;
|
|
|
|
|
|
|
+import com.zhongshu.payment.client.payModel.cooperator.ShopIdParam;
|
|
|
|
|
+import com.zhongshu.payment.client.payModel.cooperator.ShopProcessWithdrawParam;
|
|
|
|
|
+import com.zhongshu.payment.client.payModel.cooperator.WithDrawOpenParam;
|
|
|
import com.zhongshu.payment.client.payModel.cooperator.model.*;
|
|
import com.zhongshu.payment.client.payModel.cooperator.model.*;
|
|
|
import com.zhongshu.payment.client.payModel.cooperator.platmatModel.ShopBalanceModel;
|
|
import com.zhongshu.payment.client.payModel.cooperator.platmatModel.ShopBalanceModel;
|
|
|
import com.zhongshu.payment.client.payModel.cooperator.platmatModel.ShopOpenWithDrawModel;
|
|
import com.zhongshu.payment.client.payModel.cooperator.platmatModel.ShopOpenWithDrawModel;
|
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.model.*;
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.model.*;
|
|
|
-import com.github.microservice.types.unionFrictionlessPayType.ContractState;
|
|
|
|
|
-import com.github.microservice.types.unionFrictionlessPayType.UnionUserOpenType;
|
|
|
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.paymentModel.SignInParam;
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.paymentModel.SignInParam;
|
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.paymentModel.UserRescissionParam;
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.paymentModel.UserRescissionParam;
|
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.paymentModel.UserSignQueryParam;
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.paymentModel.UserSignQueryParam;
|
|
@@ -46,16 +51,16 @@ import com.zhongshu.payment.server.core.dao.unionFrictionlessPay.ShopOpenWithDra
|
|
|
import com.zhongshu.payment.server.core.dao.unionFrictionlessPay.ShopWithDrawRecordDao;
|
|
import com.zhongshu.payment.server.core.dao.unionFrictionlessPay.ShopWithDrawRecordDao;
|
|
|
import com.zhongshu.payment.server.core.dao.unionFrictionlessPay.UnionUserOpenInfoDao;
|
|
import com.zhongshu.payment.server.core.dao.unionFrictionlessPay.UnionUserOpenInfoDao;
|
|
|
import com.zhongshu.payment.server.core.dataConfig.TimeConfig;
|
|
import com.zhongshu.payment.server.core.dataConfig.TimeConfig;
|
|
|
-import com.zhongshu.payment.server.core.domain.unionFrictionlessPay.ShopOpenWithDraw;
|
|
|
|
|
-import com.zhongshu.payment.server.core.domain.unionFrictionlessPay.ShopWithDrawRecord;
|
|
|
|
|
-import com.zhongshu.payment.server.core.domain.unionFrictionlessPay.UnionUserOpenInfo;
|
|
|
|
|
-import com.zhongshu.payment.server.core.domain.wallet.RechargeRecord;
|
|
|
|
|
|
|
+import com.zhongshu.payment.server.core.domain.pay.unionFrictionlessPay.ShopOpenWithDraw;
|
|
|
|
|
+import com.zhongshu.payment.server.core.domain.pay.unionFrictionlessPay.ShopWithDrawRecord;
|
|
|
|
|
+import com.zhongshu.payment.server.core.domain.pay.unionFrictionlessPay.UnionUserOpenInfo;
|
|
|
|
|
+import com.zhongshu.payment.server.core.domain.pay.RechargeRecord;
|
|
|
import com.zhongshu.payment.server.core.service.org.CollectionIdService;
|
|
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.service.pay.impl.unionFrictionlessPay.config.WithdrawConfig;
|
|
|
|
|
|
|
+import com.zhongshu.payment.server.core.pay.impl.CommonPayService;
|
|
|
|
|
+import com.zhongshu.payment.server.core.pay.impl.unionFrictionlessPay.config.UnionFrictionlessPayApiConfig;
|
|
|
|
|
+import com.zhongshu.payment.server.core.pay.impl.unionFrictionlessPay.config.UnionFrictionlessPayConfig;
|
|
|
|
|
+import com.zhongshu.payment.server.core.pay.impl.unionFrictionlessPay.config.UnionPaymentConfig;
|
|
|
|
|
+import com.zhongshu.payment.server.core.pay.impl.unionFrictionlessPay.config.WithdrawConfig;
|
|
|
import com.zhongshu.payment.server.core.utils.AesUtils;
|
|
import com.zhongshu.payment.server.core.utils.AesUtils;
|
|
|
import com.zhongshu.payment.server.core.utils.CommonUtil;
|
|
import com.zhongshu.payment.server.core.utils.CommonUtil;
|
|
|
import jakarta.servlet.ServletInputStream;
|
|
import jakarta.servlet.ServletInputStream;
|
|
@@ -69,7 +74,6 @@ import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
|
|
import org.bouncycastle.jce.spec.ECNamedCurveParameterSpec;
|
|
import org.bouncycastle.jce.spec.ECNamedCurveParameterSpec;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.StopWatch;
|
|
import org.springframework.util.StopWatch;
|
|
|
|
|
|
|
@@ -89,7 +93,7 @@ import java.util.stream.Collectors;
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
@Service
|
|
@Service
|
|
|
@PayAnnotationService(paymentType = PaymentType.UnionFrictionlessPay, remark = "银联无感支付")
|
|
@PayAnnotationService(paymentType = PaymentType.UnionFrictionlessPay, remark = "银联无感支付")
|
|
|
-public class UnionFrictionlessPayMainService extends SuperPayService {
|
|
|
|
|
|
|
+public class UnionFrictionlessPayMainService implements UnionFrictionlessPayService {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
UnionRequestService unionRequestService;
|
|
UnionRequestService unionRequestService;
|
|
@@ -130,6 +134,9 @@ public class UnionFrictionlessPayMainService extends SuperPayService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
CooperatorService cooperatorService;
|
|
CooperatorService cooperatorService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ CommonPayService commonPayService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 发起签约
|
|
* 发起签约
|
|
|
*
|
|
*
|
|
@@ -139,7 +146,7 @@ public class UnionFrictionlessPayMainService extends SuperPayService {
|
|
|
public ResultContent sign(SignInParam param) {
|
|
public ResultContent sign(SignInParam param) {
|
|
|
String userId = param.getUserId();
|
|
String userId = param.getUserId();
|
|
|
if (StringUtils.isEmpty(userId)) {
|
|
if (StringUtils.isEmpty(userId)) {
|
|
|
- userId = getCurrentUserId();
|
|
|
|
|
|
|
+ userId = commonPayService.getCurrentUserId();
|
|
|
}
|
|
}
|
|
|
String shopOid = param.getShopOid();
|
|
String shopOid = param.getShopOid();
|
|
|
ResultContent<UserCountModel> resultContent = userFeignService.getUserDetailByUserId(userId);
|
|
ResultContent<UserCountModel> resultContent = userFeignService.getUserDetailByUserId(userId);
|
|
@@ -724,6 +731,11 @@ public class UnionFrictionlessPayMainService extends SuperPayService {
|
|
|
return ResultContent.buildFail("无感支付不支持查询账户信息");
|
|
return ResultContent.buildFail("无感支付不支持查询账户信息");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public ResultContent<BalanceModel> queryBalance(BalanceQueryParam param) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public ResultContent closePayOrder(ClosePayOrderParam param) {
|
|
public ResultContent closePayOrder(ClosePayOrderParam param) {
|
|
|
return ResultContent.buildFail("暂未实现");
|
|
return ResultContent.buildFail("暂未实现");
|
|
@@ -795,7 +807,7 @@ public class UnionFrictionlessPayMainService extends SuperPayService {
|
|
|
drawRecord.setShopId(shopId);
|
|
drawRecord.setShopId(shopId);
|
|
|
drawRecord.setShopName(shopInfo.getName());
|
|
drawRecord.setShopName(shopInfo.getName());
|
|
|
drawRecord.setMchntNo(getMchntNo(shopId));
|
|
drawRecord.setMchntNo(getMchntNo(shopId));
|
|
|
- drawRecord.setUserId(getCurrentUserId());
|
|
|
|
|
|
|
+ drawRecord.setUserId(commonPayService.getCurrentUserId());
|
|
|
drawRecord.setWithDrawState(WithDrawState.WithDrawing);
|
|
drawRecord.setWithDrawState(WithDrawState.WithDrawing);
|
|
|
drawRecord.setSysOrderId(sysOrderId);
|
|
drawRecord.setSysOrderId(sysOrderId);
|
|
|
drawRecord.setWithdrawAmt(withdrawAmt);
|
|
drawRecord.setWithdrawAmt(withdrawAmt);
|