Commit ccdbdccc by ping.wu

Merge branch 'feature/20220727_非码付接口迁移准备_wuping' of…

Merge branch 'feature/20220727_非码付接口迁移准备_wuping' of https://gitlab.freemud.com/order-group-application/order-group into qa
parents 58c2ab3e 8c2e2376
...@@ -3422,7 +3422,7 @@ public class OrderAdapter { ...@@ -3422,7 +3422,7 @@ public class OrderAdapter {
, OrderBeanV1 orderBean , OrderBeanV1 orderBean
, PaymentRequest paymentRequest , PaymentRequest paymentRequest
, String partnerPayOvertime , String partnerPayOvertime
, String orderClient , String clientCode
, String channel , String channel
, Integer totalAmount) { , Integer totalAmount) {
CombPayRequest orderPayDto = new CombPayRequest(); CombPayRequest orderPayDto = new CombPayRequest();
...@@ -3466,7 +3466,7 @@ public class OrderAdapter { ...@@ -3466,7 +3466,7 @@ public class OrderAdapter {
String ebcode = PayChannelType.getByIndex(Byte.parseByte(channel)).getEbcode(); String ebcode = PayChannelType.getByIndex(Byte.parseByte(channel)).getEbcode();
payPlatformVO = new PayPlatformVO(); payPlatformVO = new PayPlatformVO();
payPlatformVO.setAmount(0L); payPlatformVO.setAmount(0L);
payPlatformVO.setClientCode(orderClient); payPlatformVO.setClientCode(clientCode);
payPlatformVO.setEbcode(ebcode); payPlatformVO.setEbcode(ebcode);
platforms.add(payPlatformVO); platforms.add(payPlatformVO);
...@@ -4062,7 +4062,7 @@ public class OrderAdapter { ...@@ -4062,7 +4062,7 @@ public class OrderAdapter {
, OrderBeanV1 orderBean , OrderBeanV1 orderBean
, PaymentRequest paymentRequest , PaymentRequest paymentRequest
, String partnerPayOvertime , String partnerPayOvertime
, String orderClient , String clientCode
, String channel , String channel
, Integer totalAmount) { , Integer totalAmount) {
MultiPayRequest orderPayDto = new MultiPayRequest(); MultiPayRequest orderPayDto = new MultiPayRequest();
...@@ -4106,7 +4106,7 @@ public class OrderAdapter { ...@@ -4106,7 +4106,7 @@ public class OrderAdapter {
String ebcode = PayChannelType.getByIndex(Byte.parseByte(channel)).getEbcode(); String ebcode = PayChannelType.getByIndex(Byte.parseByte(channel)).getEbcode();
payPlatformVO = new PayPlatformVO(); payPlatformVO = new PayPlatformVO();
payPlatformVO.setAmount(0L); payPlatformVO.setAmount(0L);
payPlatformVO.setClientCode(orderClient); payPlatformVO.setClientCode(clientCode);
payPlatformVO.setEbcode(ebcode); payPlatformVO.setEbcode(ebcode);
platforms.add(payPlatformVO); platforms.add(payPlatformVO);
......
...@@ -15,6 +15,7 @@ import com.freemud.api.assortment.datamanager.entity.db.AssortmentOpenPlatformIa ...@@ -15,6 +15,7 @@ import com.freemud.api.assortment.datamanager.entity.db.AssortmentOpenPlatformIa
import com.freemud.application.sdk.api.ordercenter.adapter.OrderCenterSdkAdapter; import com.freemud.application.sdk.api.ordercenter.adapter.OrderCenterSdkAdapter;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
/** /**
* @author Clover.z * @author Clover.z
...@@ -68,7 +69,7 @@ public class ExposureOrderService { ...@@ -68,7 +69,7 @@ public class ExposureOrderService {
if (wxAppStore == null) { if (wxAppStore == null) {
wxAppStore = new AssortmentOpenPlatformIappWxappStore(); wxAppStore = new AssortmentOpenPlatformIappWxappStore();
} }
vo.setPayCode(wxAppStore.getClientCode()); vo.setPayCode(StringUtils.isEmpty(wxAppStore.getClientCode()) ? "9" : wxAppStore.getClientCode());
vo.setStoreId(wxAppStore.getStoreId()); vo.setStoreId(wxAppStore.getStoreId());
return vo; return vo;
} }
......
...@@ -688,15 +688,15 @@ public class PayServiceImpl { ...@@ -688,15 +688,15 @@ public class PayServiceImpl {
, String channel , String channel
, String storeId) { , String storeId) {
String ebCode = this.getPayCodeByChanel(paymentRequest.getWxAppId(), channel, storeId); String clientCode = this.getPayCodeByChanel(paymentRequest.getWxAppId(), channel, storeId);
OrderPayResponse orderPayResponse = new OrderPayResponse(); OrderPayResponse orderPayResponse = new OrderPayResponse();
if (StringUtils.isBlank(ebCode)) { if (StringUtils.isBlank(clientCode)) {
orderPayResponse.setMsg("请先联系相关人员配置商户对应的支付渠道"); orderPayResponse.setMsg("请先联系相关人员配置商户对应的支付渠道");
return orderPayResponse; return orderPayResponse;
} }
CombPayRequest combPayRequest = orderAdapter.convent2CombPayOrderRequest(cardNo, orderBean, paymentRequest, partnerPayOvertime, ebCode, channel, totalAmount); CombPayRequest combPayRequest = orderAdapter.convent2CombPayOrderRequest(cardNo, orderBean, paymentRequest, partnerPayOvertime, clientCode, channel, totalAmount);
CombPayResponse combPayResponse = comPayClient.combPay(combPayRequest, combPayRequest.getPartner_id()); CombPayResponse combPayResponse = comPayClient.combPay(combPayRequest, combPayRequest.getPartner_id());
if (combPayResponse == null || !ResponseCodeConstant.PAYMENT_RESPONSE_SUCCESS.equals(combPayResponse.getCode())) { if (combPayResponse == null || !ResponseCodeConstant.PAYMENT_RESPONSE_SUCCESS.equals(combPayResponse.getCode())) {
orderPayResponse.setMsg(combPayResponse != null ? "支付:" + combPayResponse.getMsg() : "混合支付忙不过来啦,请稍后再试"); orderPayResponse.setMsg(combPayResponse != null ? "支付:" + combPayResponse.getMsg() : "混合支付忙不过来啦,请稍后再试");
...@@ -1143,7 +1143,7 @@ public class PayServiceImpl { ...@@ -1143,7 +1143,7 @@ public class PayServiceImpl {
if (wxAppStore != null && StringUtils.isNotBlank(wxAppStore.getClientCode())) { if (wxAppStore != null && StringUtils.isNotBlank(wxAppStore.getClientCode())) {
return wxAppStore.getClientCode(); return wxAppStore.getClientCode();
} }
return ""; return "9";
} }
/** /**
...@@ -1157,7 +1157,8 @@ public class PayServiceImpl { ...@@ -1157,7 +1157,8 @@ public class PayServiceImpl {
if (wxAppStore != null && StringUtils.isNotBlank(wxAppStore.getClientCode())) { if (wxAppStore != null && StringUtils.isNotBlank(wxAppStore.getClientCode())) {
return wxAppStore.getClientCode(); return wxAppStore.getClientCode();
} }
return ""; //配合预支付接口迁移非码付,查不到配置返回 9
return "9";
} }
public String getPayCodeByCondition(String wxAppid, String storeId, String channel) { public String getPayCodeByCondition(String wxAppid, String storeId, String channel) {
...@@ -1564,15 +1565,15 @@ public class PayServiceImpl { ...@@ -1564,15 +1565,15 @@ public class PayServiceImpl {
// 统一走多卡支付Ka2.0.76-0427-0504 // 统一走多卡支付Ka2.0.76-0427-0504
String partnerPayOvertime = this.getPartnerPayOvertime(orderBean.getCompanyId()); String partnerPayOvertime = this.getPartnerPayOvertime(orderBean.getCompanyId());
String storeId = orderBean.getShopId(); String storeId = orderBean.getShopId();
String ebCode = this.getPayCodeByChanel(paymentRequest.getWxAppId(), channel, storeId); String clientCode = this.getPayCodeByChanel(paymentRequest.getWxAppId(), channel, storeId);
OrderPayResponse orderPayResponse = new OrderPayResponse(); OrderPayResponse orderPayResponse = new OrderPayResponse();
if (StringUtils.isBlank(ebCode)) { if (StringUtils.isBlank(clientCode)) {
orderPayResponse.setMsg("请先联系相关人员配置商户对应的支付渠道"); orderPayResponse.setMsg("请先联系相关人员配置商户对应的支付渠道");
return orderPayResponse; return orderPayResponse;
} }
MultiPayRequest combPayRequest = orderAdapter.convent2MultiPayOrderRequest(cardNos, orderBean, paymentRequest, partnerPayOvertime, ebCode, channel, totalAmount); MultiPayRequest combPayRequest = orderAdapter.convent2MultiPayOrderRequest(cardNos, orderBean, paymentRequest, partnerPayOvertime, clientCode, channel, totalAmount);
MultiPayResponse multiPayResponse = comPayClient.multiPay(combPayRequest, combPayRequest.getPartner_id()); MultiPayResponse multiPayResponse = comPayClient.multiPay(combPayRequest, combPayRequest.getPartner_id());
if (multiPayResponse == null || !ResponseCodeConstant.PAYMENT_RESPONSE_SUCCESS.equals(multiPayResponse.getCode())) { if (multiPayResponse == null || !ResponseCodeConstant.PAYMENT_RESPONSE_SUCCESS.equals(multiPayResponse.getCode())) {
orderPayResponse.setMsg(multiPayResponse != null ? "支付:" + multiPayResponse.getMsg() : "混合支付忙不过来啦,请稍后再试"); orderPayResponse.setMsg(multiPayResponse != null ? "支付:" + multiPayResponse.getMsg() : "混合支付忙不过来啦,请稍后再试");
......
...@@ -195,7 +195,7 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService { ...@@ -195,7 +195,7 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
//线上现金支付,创建预支付订单,唤起支付 //线上现金支付,创建预支付订单,唤起支付
com.freemud.application.sdk.api.base.BaseResponse<UnifiedPayResponseDto> response = null; com.freemud.application.sdk.api.base.BaseResponse<UnifiedPayResponseDto> response = null;
if (!Objects.equals(ExchangeTypeEnum.TYPE_1.getCode(), exchangeType) && cashPrice != null && cashPrice > 0) { if (!Objects.equals(ExchangeTypeEnum.TYPE_1.getCode(), exchangeType) && cashPrice != null && cashPrice > 0) {
Long payClientCode = Long.parseLong(wxAppStore.getClientCode()); Long payClientCode = StringUtils.isEmpty(wxAppStore.getClientCode())? 9L : Long.parseLong(wxAppStore.getClientCode());
UnifiedOrderRequestDto requestDto = pointsMallOrderAdapter.convert2UnifiedOrderRequestDto(result, openId, cashPrice, UnifiedOrderRequestDto requestDto = pointsMallOrderAdapter.convert2UnifiedOrderRequestDto(result, openId, cashPrice,
payClientCode, reverseNotifyiDcUrl, getPartnerPayOvertime(partnerId)); payClientCode, reverseNotifyiDcUrl, getPartnerPayOvertime(partnerId));
response = payService.unifiedOrder(requestDto); response = payService.unifiedOrder(requestDto);
......
...@@ -209,7 +209,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService { ...@@ -209,7 +209,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
String skuId = createOrderVo.getProducts().get(0).getSkuId(); String skuId = createOrderVo.getProducts().get(0).getSkuId();
//10-抖音卖券门店 //10-抖音卖券门店
AssortmentOpenPlatformIappWxappStore wxAppStore = payService.getIappWxappStoreInfo(wxAppId,AggregationTypeEnum.TYPE_10.getCode()); AssortmentOpenPlatformIappWxappStore wxAppStore = payService.getIappWxappStoreInfo(wxAppId,AggregationTypeEnum.TYPE_10.getCode());
if ((wxAppStore == null || wxAppStore.getClientCode() == null)) { if ((wxAppStore == null)) {
return ResponseUtil.error(ResponseCodeConstant.RESPONSE_ERROR_STR, "支付门店未配置"); return ResponseUtil.error(ResponseCodeConstant.RESPONSE_ERROR_STR, "支付门店未配置");
} }
String storeId = wxAppStore.getStoreId(); String storeId = wxAppStore.getStoreId();
...@@ -498,7 +498,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService { ...@@ -498,7 +498,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
}else if(wxAppStore == null){ }else if(wxAppStore == null){
wxAppStore = assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(userLoginInfoDto.getWxAppId(),storeId); wxAppStore = assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(userLoginInfoDto.getWxAppId(),storeId);
} }
if ((wxAppStore == null || wxAppStore.getClientCode() == null)) { if ((wxAppStore == null)) {
return ResponseUtil.error(ResponseCodeConstant.RESPONSE_ERROR_STR, "支付门店未配置"); return ResponseUtil.error(ResponseCodeConstant.RESPONSE_ERROR_STR, "支付门店未配置");
} }
createOrderRequest.setStoreId(storeId); createOrderRequest.setStoreId(storeId);
...@@ -509,7 +509,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService { ...@@ -509,7 +509,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
createOrderResponseVo.setOid(orderCode); createOrderResponseVo.setOid(orderCode);
//线上现金支付,创建预支付订单,唤起支付 //线上现金支付,创建预支付订单,唤起支付
com.freemud.application.sdk.api.base.BaseResponse<UnifiedPayResponseDto> response = null; com.freemud.application.sdk.api.base.BaseResponse<UnifiedPayResponseDto> response = null;
Long payClientCode = Long.parseLong(wxAppStore.getClientCode()); Long payClientCode = StringUtils.isEmpty(wxAppStore.getClientCode())? 9L : Long.parseLong(wxAppStore.getClientCode());
//实际支付金额 //实际支付金额
Long cashPrice = createOrderRequest.getSettlementAmount(); Long cashPrice = createOrderRequest.getSettlementAmount();
UnifiedOrderRequestDto requestDto = checkOrder.convert2UnifiedOrderRequestDto(result, openId, cashPrice, payClientCode, reverseNotifyiDcUrl, getPartnerPayOvertime(partnerId)); UnifiedOrderRequestDto requestDto = checkOrder.convert2UnifiedOrderRequestDto(result, openId, cashPrice, payClientCode, reverseNotifyiDcUrl, getPartnerPayOvertime(partnerId));
......
...@@ -996,19 +996,19 @@ public abstract class UniversalOrderService { ...@@ -996,19 +996,19 @@ public abstract class UniversalOrderService {
* @param storeId * @param storeId
* @return * @return
*/ */
private String getPayCodeByChanel(String wxAppid, String channel, String storeId) { // private String getPayCodeByChanel(String wxAppid, String channel, String storeId) {
if (StringUtils.isBlank(channel)) return ""; // if (StringUtils.isBlank(channel)) return "";
//
PayChannelType byIndex = PayChannelType.getByIndex(Byte.parseByte(channel)); // PayChannelType byIndex = PayChannelType.getByIndex(Byte.parseByte(channel));
if (byIndex.getEbcode() == null) return ""; // if (byIndex.getEbcode() == null) return "";
AssortmentOpenPlatformIappWxappStore wxAppStore = assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(wxAppid // AssortmentOpenPlatformIappWxappStore wxAppStore = assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(wxAppid
, storeId // , storeId
, byIndex.getEbcode()); // , byIndex.getEbcode());
if (wxAppStore != null && StringUtils.isNotBlank(wxAppStore.getClientCode())) { // if (wxAppStore != null && StringUtils.isNotBlank(wxAppStore.getClientCode())) {
return wxAppStore.getClientCode(); // return wxAppStore.getClientCode();
} // }
return ""; // return "9";
} // }
/** /**
* 获取混合支付是否开启 * 获取混合支付是否开启
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment