支付参数
This commit is contained in:
@@ -3,7 +3,6 @@ package com.czg.service.order.service.impl;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.constant.PayChannelCst;
|
||||
import com.czg.constants.SystemConstants;
|
||||
import com.czg.order.dto.ShopMerchantDTO;
|
||||
import com.czg.order.entity.ShopDirectMerchant;
|
||||
@@ -14,6 +13,7 @@ import com.czg.pay.PolyMerchantDTO;
|
||||
import com.czg.service.order.mapper.ShopMerchantMapper;
|
||||
import com.czg.service.order.service.ShopDirectMerchantService;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import com.czg.utils.CzgStrUtils;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
@@ -76,24 +76,17 @@ public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, Sho
|
||||
ShopMerchant shopMerchant = getOne(query().eq(ShopMerchant::getShopId, shopMerchantParam.getShopId()));
|
||||
if (shopMerchant == null) {
|
||||
shopMerchant = new ShopMerchant();
|
||||
shopMerchant.setShopId(shopMerchantParam.getShopId());
|
||||
shopMerchant.setChannel(shopMerchantParam.getChannel());
|
||||
shopMerchant.setRelatedLicenceNo(shopMerchantParam.getRelatedLicenceNo());
|
||||
shopMerchant.setAlipayAppId(SystemConstants.PayType.ALIPAY_APP_ID);
|
||||
shopMerchant.setWechatAppId(SystemConstants.PayType.WECHAT_APP_ID);
|
||||
if (PayChannelCst.NATIVE.equals(shopMerchantParam.getChannel()) && shopMerchantParam.getNativeMerchantDTO() != null) {
|
||||
}
|
||||
shopMerchant.setShopId(shopMerchantParam.getShopId());
|
||||
if (isUp) {
|
||||
shopMerchant.setChannel(CzgStrUtils.getStrOrNull(shopMerchantParam.getChannel()));
|
||||
shopMerchant.setRelatedLicenceNo(CzgStrUtils.getStrOrNull(shopMerchantParam.getRelatedLicenceNo()));
|
||||
if (shopMerchantParam.getNativeMerchantDTO() != null) {
|
||||
shopMerchant.setNativePayJson(JSONObject.toJSONString(shopMerchantParam.getNativeMerchantDTO()));
|
||||
} else if (PayChannelCst.POLY.equals(shopMerchantParam.getChannel()) && shopMerchantParam.getPolyMerchantDTO() != null) {
|
||||
shopMerchant.setPolyPayJson(JSONObject.toJSONString(shopMerchantParam.getPolyMerchantDTO()));
|
||||
}
|
||||
} else if (isUp) {
|
||||
shopMerchant.setChannel(shopMerchantParam.getChannel());
|
||||
shopMerchant.setShopId(shopMerchantParam.getShopId());
|
||||
shopMerchant.setRelatedLicenceNo(shopMerchantParam.getRelatedLicenceNo());
|
||||
|
||||
if (PayChannelCst.NATIVE.equals(shopMerchantParam.getChannel()) && shopMerchantParam.getNativeMerchantDTO() != null) {
|
||||
shopMerchant.setNativePayJson(JSONObject.toJSONString(shopMerchantParam.getNativeMerchantDTO()));
|
||||
} else if (PayChannelCst.POLY.equals(shopMerchantParam.getChannel()) && shopMerchantParam.getPolyMerchantDTO() != null) {
|
||||
if (shopMerchantParam.getPolyMerchantDTO() != null) {
|
||||
shopMerchant.setPolyPayJson(JSONObject.toJSONString(shopMerchantParam.getPolyMerchantDTO()));
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user