SYS PARAM 常量
This commit is contained in:
@@ -10,6 +10,7 @@ import com.czg.account.dto.PrintOrderDetailDTO;
|
||||
import com.czg.account.entity.*;
|
||||
import com.czg.account.service.*;
|
||||
import com.czg.config.RedisCst;
|
||||
import com.czg.constants.ParamCodeCst;
|
||||
import com.czg.market.service.OrderInfoService;
|
||||
import com.czg.order.entity.OrderDetail;
|
||||
import com.czg.order.entity.OrderInfo;
|
||||
@@ -546,7 +547,7 @@ public abstract class PrinterHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
CzgResult<SysParamsDTO> paramsByCode = sysParamsService.getParamsByCode("call_page_url");
|
||||
CzgResult<SysParamsDTO> paramsByCode = sysParamsService.getParamsByCode(ParamCodeCst.System.CALL_PAGE_URL);
|
||||
SysParamsDTO params = paramsByCode.getData();
|
||||
String callUrl = null;
|
||||
if (params != null && StrUtil.isNotBlank(params.getParamValue())) {
|
||||
|
||||
@@ -13,7 +13,8 @@ import com.czg.account.entity.*;
|
||||
import com.czg.account.service.*;
|
||||
import com.czg.config.RabbitPublisher;
|
||||
import com.czg.config.RedisCst;
|
||||
import com.czg.constant.TableValueConstant;
|
||||
import com.czg.constants.ParamCodeCst;
|
||||
import com.czg.constants.PayTypeConstants;
|
||||
import com.czg.entity.req.*;
|
||||
import com.czg.entity.resp.*;
|
||||
import com.czg.enums.ShopUserFlowBizEnum;
|
||||
@@ -32,7 +33,6 @@ import com.czg.order.entity.OrderDetail;
|
||||
import com.czg.order.entity.OrderInfo;
|
||||
import com.czg.order.entity.OrderPayment;
|
||||
import com.czg.order.enums.PayEnums;
|
||||
import com.czg.constants.PayTypeConstants;
|
||||
import com.czg.order.service.CreditBuyerOrderService;
|
||||
import com.czg.order.service.OrderDetailService;
|
||||
import com.czg.order.service.OrderInfoCustomService;
|
||||
@@ -48,7 +48,6 @@ import com.czg.service.order.dto.VipRefundDTO;
|
||||
import com.czg.service.order.enums.OrderStatusEnums;
|
||||
import com.czg.service.order.mapper.OrderPaymentMapper;
|
||||
import com.czg.service.order.service.PayService;
|
||||
import com.czg.system.enums.SysParamCodeEnum;
|
||||
import com.czg.system.service.SysParamsService;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import com.czg.utils.CzgRandomUtils;
|
||||
@@ -60,8 +59,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.support.TransactionSynchronization;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
@@ -924,7 +921,7 @@ public class PayServiceImpl implements PayService {
|
||||
private CzgResult<Map<String, Object>> h5Pay(@NonNull Long shopId, CzgH5PayReq bizData) {
|
||||
ShopMerchant shopMerchant = getMerchant(shopId);
|
||||
bizData.assignMerchant(shopMerchant.getStoreId(), shopMerchant.getMerchantName(),
|
||||
sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_NOTIFY_URL.getCode()));
|
||||
sysParamsService.getSysParamValue(ParamCodeCst.System.PAY_CZG_NOTIFY_URL));
|
||||
CzgResult<CzgH5PayResp> h5PayRespCzgResult = czgPayService.h5Pay(shopMerchant.getAppId(), shopMerchant.getAppSecret(), bizData);
|
||||
return execPayResult(h5PayRespCzgResult);
|
||||
}
|
||||
@@ -934,7 +931,7 @@ public class PayServiceImpl implements PayService {
|
||||
bizData.setSubAppid("aliPay".equals(payType) ? shopMerchant.getAlipaySmallAppid() : shopMerchant.getWechatSmallAppid());
|
||||
AssertUtil.isBlank(bizData.getSubAppid(), "暂不可用,请联系商家配置" + ("aliPay".equals(payType) ? "支付宝" : "微信") + "小程序");
|
||||
bizData.assignMerchant(shopMerchant.getStoreId(), shopMerchant.getMerchantName(),
|
||||
sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_NOTIFY_URL.getCode()));
|
||||
sysParamsService.getSysParamValue(ParamCodeCst.System.PAY_CZG_NOTIFY_URL));
|
||||
bizData.setPayType("aliPay".equals(payType) ? "ALIPAY" : "WECHAT");
|
||||
CzgResult<CzgJsPayResp> jsPayRespCzgResult = czgPayService.jsPay(shopMerchant.getAppId(), shopMerchant.getAppSecret(), bizData);
|
||||
return execPayResult(jsPayRespCzgResult);
|
||||
@@ -945,7 +942,7 @@ public class PayServiceImpl implements PayService {
|
||||
bizData.setSubAppid("aliPay".equals(payType) ? shopMerchant.getAlipaySmallAppid() : shopMerchant.getWechatSmallAppid());
|
||||
AssertUtil.isBlank(bizData.getSubAppid(), "暂不可用,请联系商家配置" + ("aliPay".equals(payType) ? "支付宝" : "微信") + "小程序");
|
||||
bizData.assignMerchant(shopMerchant.getStoreId(), shopMerchant.getMerchantName(),
|
||||
sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_NOTIFY_URL.getCode()));
|
||||
sysParamsService.getSysParamValue(ParamCodeCst.System.PAY_CZG_NOTIFY_URL));
|
||||
CzgResult<CzgLtPayResp> ltPayRespCzgResult = czgPayService.ltPay(shopMerchant.getAppId(), shopMerchant.getAppSecret(), bizData);
|
||||
return execPayResult(ltPayRespCzgResult);
|
||||
}
|
||||
@@ -953,7 +950,7 @@ public class PayServiceImpl implements PayService {
|
||||
private CzgResult<Map<String, Object>> scanPay(@NonNull Long shopId, CzgScanPayReq bizData) {
|
||||
ShopMerchant shopMerchant = getMerchant(shopId);
|
||||
bizData.assignMerchant(shopMerchant.getStoreId(), shopMerchant.getMerchantName(),
|
||||
sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_NOTIFY_URL.getCode()));
|
||||
sysParamsService.getSysParamValue(ParamCodeCst.System.PAY_CZG_NOTIFY_URL));
|
||||
CzgResult<CzgScanPayResp> scanPayRespCzgResult = czgPayService.scanPay(shopMerchant.getAppId(), shopMerchant.getAppSecret(), bizData);
|
||||
return execPayResult(scanPayRespCzgResult);
|
||||
}
|
||||
@@ -965,7 +962,7 @@ public class PayServiceImpl implements PayService {
|
||||
}
|
||||
ShopMerchant shopMerchant = getMerchant(shopId);
|
||||
bizData.assignMerchant(shopMerchant.getStoreId(), shopMerchant.getMerchantName(),
|
||||
sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_NOTIFY_URL.getCode()));
|
||||
sysParamsService.getSysParamValue(ParamCodeCst.System.PAY_CZG_NOTIFY_URL));
|
||||
String firstTwoDigitsStr = bizData.getAuthCode().substring(0, 2);
|
||||
// 将截取的字符串转换为整数
|
||||
int firstTwoDigits = Integer.parseInt(firstTwoDigitsStr);
|
||||
@@ -986,7 +983,7 @@ public class PayServiceImpl implements PayService {
|
||||
|
||||
private CzgResult<CzgRefundResp> refund(@NonNull Long shopId, CzgRefundReq bizData) {
|
||||
ShopMerchant shopMerchant = getMerchant(shopId);
|
||||
bizData.setNotifyUrl(sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_REFUND_NOTIFY_URL.getCode()));
|
||||
bizData.setNotifyUrl(sysParamsService.getSysParamValue(ParamCodeCst.System.PAY_CZG_REFUND_NOTIFY_URL));
|
||||
return czgPayService.refundOrder(shopMerchant.getAppId(), shopMerchant.getAppSecret(), bizData);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user