支付参数
This commit is contained in:
@@ -3,7 +3,6 @@ package com.czg.service.order.service.impl;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.czg.account.service.ShopInfoService;
|
import com.czg.account.service.ShopInfoService;
|
||||||
import com.czg.constant.PayChannelCst;
|
|
||||||
import com.czg.constants.SystemConstants;
|
import com.czg.constants.SystemConstants;
|
||||||
import com.czg.order.dto.ShopMerchantDTO;
|
import com.czg.order.dto.ShopMerchantDTO;
|
||||||
import com.czg.order.entity.ShopDirectMerchant;
|
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.mapper.ShopMerchantMapper;
|
||||||
import com.czg.service.order.service.ShopDirectMerchantService;
|
import com.czg.service.order.service.ShopDirectMerchantService;
|
||||||
import com.czg.utils.AssertUtil;
|
import com.czg.utils.AssertUtil;
|
||||||
|
import com.czg.utils.CzgStrUtils;
|
||||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
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()));
|
ShopMerchant shopMerchant = getOne(query().eq(ShopMerchant::getShopId, shopMerchantParam.getShopId()));
|
||||||
if (shopMerchant == null) {
|
if (shopMerchant == null) {
|
||||||
shopMerchant = new ShopMerchant();
|
shopMerchant = new ShopMerchant();
|
||||||
shopMerchant.setShopId(shopMerchantParam.getShopId());
|
|
||||||
shopMerchant.setChannel(shopMerchantParam.getChannel());
|
|
||||||
shopMerchant.setRelatedLicenceNo(shopMerchantParam.getRelatedLicenceNo());
|
|
||||||
shopMerchant.setAlipayAppId(SystemConstants.PayType.ALIPAY_APP_ID);
|
shopMerchant.setAlipayAppId(SystemConstants.PayType.ALIPAY_APP_ID);
|
||||||
shopMerchant.setWechatAppId(SystemConstants.PayType.WECHAT_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()));
|
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) {
|
if (shopMerchantParam.getPolyMerchantDTO() != null) {
|
||||||
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) {
|
|
||||||
shopMerchant.setPolyPayJson(JSONObject.toJSONString(shopMerchantParam.getPolyMerchantDTO()));
|
shopMerchant.setPolyPayJson(JSONObject.toJSONString(shopMerchantParam.getPolyMerchantDTO()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user