|
@@ -1,6 +1,7 @@
|
|
|
package com.fs.his.service.impl;
|
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
@@ -13,7 +14,9 @@ import com.fs.common.core.domain.AjaxResult;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.exception.CustomException;
|
|
|
import com.fs.common.utils.DateUtils;
|
|
|
+import com.fs.common.utils.ServletUtils;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
|
+import com.fs.common.utils.ip.IpUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.company.mapper.CompanyConfigMapper;
|
|
|
import com.fs.company.param.FsStoreStatisticsParam;
|
|
@@ -30,19 +33,26 @@ import com.fs.erp.dto.ErpRefundUpdateRequest;
|
|
|
import com.fs.his.domain.FsExportTask;
|
|
|
import com.fs.his.domain.FsPayConfig;
|
|
|
import com.fs.his.domain.FsStorePayment;
|
|
|
+import com.fs.his.domain.FsUser;
|
|
|
import com.fs.his.dto.PayConfigDTO;
|
|
|
+import com.fs.his.enums.PaymentMethodEnum;
|
|
|
import com.fs.his.mapper.FsExportTaskMapper;
|
|
|
import com.fs.his.mapper.FsStorePaymentMapper;
|
|
|
+import com.fs.his.mapper.FsUserMapper;
|
|
|
import com.fs.his.param.FsStoreOrderParam;
|
|
|
import com.fs.his.param.FsStorePaymentParam;
|
|
|
+import com.fs.his.param.PayOrderParam;
|
|
|
import com.fs.his.param.WxSendRedPacketParam;
|
|
|
import com.fs.his.service.IFsInquiryOrderService;
|
|
|
import com.fs.his.service.IFsPackageOrderService;
|
|
|
import com.fs.his.service.IFsStoreOrderService;
|
|
|
+import com.fs.his.utils.PhoneUtil;
|
|
|
import com.fs.his.vo.FsStorePaymentExcelVO;
|
|
|
import com.fs.his.vo.FsStorePaymentVO;
|
|
|
+import com.fs.huifuPay.domain.HuiFuCreateOrder;
|
|
|
import com.fs.huifuPay.domain.HuiFuQueryOrderResult;
|
|
|
import com.fs.huifuPay.domain.HuiFuRefundResult;
|
|
|
+import com.fs.huifuPay.domain.HuifuCreateOrderResult;
|
|
|
import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayQueryRequest;
|
|
|
import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayRefundRequest;
|
|
|
import com.fs.huifuPay.service.HuiFuService;
|
|
@@ -51,19 +61,19 @@ import com.fs.system.mapper.SysConfigMapper;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
import com.fs.tzBankPay.TzBankService.TzBankService;
|
|
|
import com.fs.tzBankPay.TzBankService.TzBankServiceImpl.TzBankServiceImpl;
|
|
|
-import com.fs.tzBankPay.doman.QueryOrderResult;
|
|
|
-import com.fs.tzBankPay.doman.RefundParam;
|
|
|
-import com.fs.tzBankPay.doman.TzBankResult;
|
|
|
-import com.fs.tzBankPay.doman.payQueryOrder;
|
|
|
+import com.fs.tzBankPay.doman.*;
|
|
|
+import com.fs.ybPay.domain.CreateWxOrderResult;
|
|
|
import com.fs.ybPay.domain.OrderResult;
|
|
|
import com.fs.ybPay.dto.OrderQueryDTO;
|
|
|
import com.fs.ybPay.dto.RefundDTO;
|
|
|
+import com.fs.ybPay.dto.WxJspayDTO;
|
|
|
import com.fs.ybPay.service.IPayService;
|
|
|
import com.github.binarywang.wxpay.bean.merchanttransfer.TransferCreateRequest;
|
|
|
import com.github.binarywang.wxpay.bean.merchanttransfer.TransferCreateResult;
|
|
|
import com.github.binarywang.wxpay.bean.notify.SignatureHeader;
|
|
|
import com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse;
|
|
|
import com.github.binarywang.wxpay.bean.notify.WxPayTransferBatchesNotifyV3Result;
|
|
|
+import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult;
|
|
|
import com.github.binarywang.wxpay.bean.request.WxPayRefundRequest;
|
|
|
import com.github.binarywang.wxpay.bean.request.WxPaySendRedpackRequest;
|
|
|
import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest;
|
|
@@ -79,6 +89,7 @@ import com.github.binarywang.wxpay.service.WxPayService;
|
|
|
import com.github.binarywang.wxpay.service.impl.RedpackServiceImpl;
|
|
|
import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl;
|
|
|
import com.google.gson.Gson;
|
|
|
+import com.hc.openapi.tool.fastjson.JSON;
|
|
|
import com.wechat.pay.java.service.transferbatch.TransferBatchService;
|
|
|
import com.wechat.pay.java.service.transferbatch.model.InitiateBatchTransferRequest;
|
|
|
import me.chanjar.weixin.common.bean.WxJsapiSignature;
|
|
@@ -136,6 +147,9 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
private IFsCourseRedPacketLogService redPacketLogService;
|
|
|
@Autowired
|
|
|
private CompanyConfigMapper companyConfigMapper;
|
|
|
+ @Autowired
|
|
|
+ private FsUserMapper userMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 查询支付明细
|
|
|
*
|
|
@@ -781,4 +795,329 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
public List<FsStorePaymentVO> selectFsStorePaymentListQueryVO(FsStorePaymentParam fsStorePayment) {
|
|
|
return fsStorePaymentMapper.selectFsStorePaymentListQueryVO(fsStorePayment);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发起支付
|
|
|
+ * @param payOrderParam 入参
|
|
|
+ * @return R
|
|
|
+ */
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ @Override
|
|
|
+ public R processPayment(PayOrderParam payOrderParam) {
|
|
|
+ logger.info("发起支付 payOrderParam: {}", JSON.toJSONString(payOrderParam));
|
|
|
+
|
|
|
+ if (payOrderParam.getAmount().compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
+ throw new CustomException("支付金额不正确");
|
|
|
+ }
|
|
|
+
|
|
|
+ FsUser user = userMapper.selectFsUserById(payOrderParam.getUserId());
|
|
|
+ if (Objects.isNull(user)){
|
|
|
+ throw new CustomException("用户不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isWechatPayment(payOrderParam.getPaymentMethod())) {
|
|
|
+ String openId = getOpenIdForPaymentMethod(user, payOrderParam.getPaymentMethod());
|
|
|
+ if (StringUtils.isBlank(openId)){
|
|
|
+ throw new CustomException("用户OPENID不存在");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ String json = configService.selectConfigByKey("his.pay");
|
|
|
+ logger.debug("支付配置 his.pay: {}", json);
|
|
|
+ FsPayConfig payConfig = JSONUtil.toBean(json, FsPayConfig.class);
|
|
|
+
|
|
|
+ // 创建记录
|
|
|
+ FsStorePayment storePayment = createStorePayment(payConfig, user, payOrderParam);
|
|
|
+
|
|
|
+ // 根据配置类型创建第三方支付订单
|
|
|
+ return createThirdPartyPayment(payConfig, storePayment, user, payOrderParam);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发起预支付
|
|
|
+ */
|
|
|
+ private R createThirdPartyPayment(FsPayConfig payConfig, FsStorePayment storePayment, FsUser user, PayOrderParam payOrderParam) {
|
|
|
+ switch (payConfig.getType()) {
|
|
|
+ case "wx":
|
|
|
+ return createWxPayment(payConfig, storePayment, user, payOrderParam);
|
|
|
+ case "yb":
|
|
|
+ return createYbPayment(storePayment, user, payOrderParam);
|
|
|
+ case "tz":
|
|
|
+ return createTzPayment(storePayment, user, payOrderParam);
|
|
|
+ case "hf":
|
|
|
+ return createHfPayment(storePayment, user, payOrderParam);
|
|
|
+ default:
|
|
|
+ throw new CustomException("不支持的支付方式");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 汇付
|
|
|
+ */
|
|
|
+ private R createHfPayment(FsStorePayment storePayment, FsUser user, PayOrderParam payOrderParam) {
|
|
|
+ logger.debug("创建汇付订单");
|
|
|
+
|
|
|
+ HuiFuCreateOrder order = new HuiFuCreateOrder();
|
|
|
+ order.setTradeType(getHfTradeType(payOrderParam.getPaymentMethod()));
|
|
|
+ order.setReqSeqId(payOrderParam.getBusinessType().getPrefix() + "-" + storePayment.getPayCode());
|
|
|
+ order.setTransAmt(storePayment.getPayMoney().toString());
|
|
|
+ order.setGoodsDesc(payOrderParam.getBusinessType().getDesc());
|
|
|
+
|
|
|
+ // 微信支付需要设置openid
|
|
|
+ if (isWechatPayment(payOrderParam.getPaymentMethod())) {
|
|
|
+ order.setOpenid(getOpenIdForPaymentMethod(user, payOrderParam.getPaymentMethod()));
|
|
|
+ }
|
|
|
+
|
|
|
+ HuifuCreateOrderResult result = huiFuService.createOrder(order);
|
|
|
+ logger.debug("汇付支付创建结果: {}", result);
|
|
|
+
|
|
|
+ updateStorePaymentTradeNo(storePayment.getPaymentId(), result.getHf_seq_id());
|
|
|
+ return R.ok().put("isPay", 0).put("data", result).put("type", "hf");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取汇付交易类型
|
|
|
+ */
|
|
|
+ private String getHfTradeType(PaymentMethodEnum paymentMethod) {
|
|
|
+ switch (paymentMethod) {
|
|
|
+ case MINIAPP_WECHAT:
|
|
|
+ return "T_MINIAPP";
|
|
|
+ case H5_WECHAT:
|
|
|
+ return "T_JSAPI";
|
|
|
+ case ALIPAY:
|
|
|
+ case H5_ALIPAY:
|
|
|
+ return "A_NATIVE";
|
|
|
+ default:
|
|
|
+ throw new CustomException("不支持的支付方式");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 台州银行
|
|
|
+ */
|
|
|
+ private R createTzPayment(FsStorePayment storePayment, FsUser user, PayOrderParam payOrderParam) {
|
|
|
+ PayCreateOrder payOrder = buildTzPayOrder(storePayment, user, payOrderParam);
|
|
|
+ TzBankResult<PayCreateOrderResult> result = tzBankService.createOrder(payOrder);
|
|
|
+
|
|
|
+ updateStorePaymentTradeNo(storePayment.getPaymentId(), result.getBody().getOrderFlowNo());
|
|
|
+ return R.ok().put("isPay", 0).put("data", result).put("type", "tz");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 构建台州银行支付
|
|
|
+ */
|
|
|
+ private PayCreateOrder buildTzPayOrder(FsStorePayment storePayment, FsUser user, PayOrderParam payOrderParam) {
|
|
|
+ PayCreateOrder payOrder = new PayCreateOrder();
|
|
|
+ payOrder.setOrderNo(payOrderParam.getBusinessType().getPrefix() + "-" + storePayment.getPayCode());
|
|
|
+ payOrder.setTrxAmt(storePayment.getPayMoney().doubleValue());
|
|
|
+ payOrder.setBusinessCstNo(payOrderParam.getUserId().toString());
|
|
|
+ payOrder.setGoodsInfo(payOrderParam.getBusinessType().getDesc());
|
|
|
+ payOrder.setOrderType(payOrderParam.getBusinessType().getCode());
|
|
|
+ payOrder.setOrderId(payOrderParam.getOrderId().toString());
|
|
|
+
|
|
|
+ // 设置支付方式
|
|
|
+ setTzPaymentType(payOrder, payOrderParam.getPaymentMethod());
|
|
|
+
|
|
|
+ // 设置用户信息
|
|
|
+ String phone = getPhoneNumber(user);
|
|
|
+ payOrder.setPayerName("微信用户" + phone);
|
|
|
+
|
|
|
+ if (payOrderParam.getPaymentMethod() == PaymentMethodEnum.MINIAPP_WECHAT) {
|
|
|
+ payOrder.setPayerMobileNo(getDecryptedPhone(user));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isWechatPayment(payOrderParam.getPaymentMethod())) {
|
|
|
+ payOrder.setOpenId(getOpenIdForPaymentMethod(user, payOrderParam.getPaymentMethod()));
|
|
|
+ }
|
|
|
+
|
|
|
+ return payOrder;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取解密后的手机号
|
|
|
+ */
|
|
|
+ private String getDecryptedPhone(FsUser user) {
|
|
|
+ if (user.getPhone() != null) {
|
|
|
+ if (user.getPhone().length() > 11) {
|
|
|
+ return PhoneUtil.decryptPhone(user.getPhone());
|
|
|
+ } else {
|
|
|
+ return user.getPhone();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取手机号后4位
|
|
|
+ */
|
|
|
+ private String getPhoneNumber(FsUser user) {
|
|
|
+ if (user.getPhone() != null && user.getPhone().length() > 4) {
|
|
|
+ return user.getPhone().substring(user.getPhone().length() - 4);
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设置支付类型
|
|
|
+ */
|
|
|
+ private void setTzPaymentType(PayCreateOrder payOrder, PaymentMethodEnum paymentMethod) {
|
|
|
+ switch (paymentMethod) {
|
|
|
+ case ALIPAY:
|
|
|
+ case H5_ALIPAY:
|
|
|
+ payOrder.setPayType(Collections.singletonList(PayType.ALIPAY_BARCODE_PAYMENT.getCode()));
|
|
|
+ break;
|
|
|
+ case H5_WECHAT:
|
|
|
+ payOrder.setPayType(Collections.singletonList(PayType.WECHAT_PUBLIC_ACCOUNT.getCode()));
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ // 小程序微信支付不需要设置payType
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 易宝支付
|
|
|
+ */
|
|
|
+ private R createYbPayment(FsStorePayment storePayment, FsUser user, PayOrderParam payOrderParam) {
|
|
|
+ PaymentMethodEnum paymentMethod = payOrderParam.getPaymentMethod();
|
|
|
+ if (paymentMethod == PaymentMethodEnum.ALIPAY || paymentMethod == PaymentMethodEnum.H5_ALIPAY
|
|
|
+ || paymentMethod == PaymentMethodEnum.H5_WECHAT) {
|
|
|
+ throw new CustomException("支付暂不可用!");
|
|
|
+ }
|
|
|
+
|
|
|
+ WxJspayDTO payDto = new WxJspayDTO();
|
|
|
+ payDto.setPayMoney(storePayment.getPayMoney().toString());
|
|
|
+ payDto.setLowOrderId(payOrderParam.getBusinessType().getPrefix() + "-" + storePayment.getPayCode());
|
|
|
+ payDto.setBody(payOrderParam.getBusinessType().getDesc());
|
|
|
+ payDto.setIsMinipg("1");
|
|
|
+ payDto.setOpenId(getOpenIdForPaymentMethod(user, paymentMethod));
|
|
|
+ payDto.setAttach("");
|
|
|
+ payDto.setStoreid("0");
|
|
|
+
|
|
|
+ CreateWxOrderResult wxOrder = payService.createWxOrder(payDto);
|
|
|
+ logger.info("易宝支付返回: {}", wxOrder);
|
|
|
+
|
|
|
+ if ("100".equals(wxOrder.getStatus())) {
|
|
|
+ updateStorePaymentTradeNo(storePayment.getPaymentId(), wxOrder.getUpOrderId());
|
|
|
+ return R.ok().put("isPay", 0).put("data", wxOrder).put("type", "yb");
|
|
|
+ } else {
|
|
|
+ throw new CustomException("支付失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新支付订单交易号
|
|
|
+ */
|
|
|
+ private void updateStorePaymentTradeNo(Long paymentId, String tradeNo) {
|
|
|
+ FsStorePayment updatePayment = new FsStorePayment();
|
|
|
+ updatePayment.setPaymentId(paymentId);
|
|
|
+ updatePayment.setTradeNo(tradeNo);
|
|
|
+ fsStorePaymentMapper.updateFsStorePayment(updatePayment);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 微信支付
|
|
|
+ */
|
|
|
+ private R createWxPayment(FsPayConfig payConfig, FsStorePayment storePayment, FsUser user, PayOrderParam payOrderParam) {
|
|
|
+ PaymentMethodEnum paymentMethod = payOrderParam.getPaymentMethod();
|
|
|
+ if (paymentMethod != PaymentMethodEnum.MINIAPP_WECHAT) {
|
|
|
+ logger.debug("微信支付 PaymentMethod: {}", paymentMethod.name());
|
|
|
+ throw new CustomException("不支持的支付方式");
|
|
|
+ }
|
|
|
+
|
|
|
+ WxPayConfig wxPayConfig = buildWxPayConfig(payConfig);
|
|
|
+ wxPayService.setConfig(wxPayConfig);
|
|
|
+
|
|
|
+ WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest();
|
|
|
+ orderRequest.setOpenid(getOpenIdForPaymentMethod(user, paymentMethod));
|
|
|
+ orderRequest.setBody(payOrderParam.getBusinessType().getDesc());
|
|
|
+ orderRequest.setOutTradeNo(payOrderParam.getBusinessType().getPrefix() + "-" + storePayment.getPayCode());
|
|
|
+ orderRequest.setTotalFee(WxPayUnifiedOrderRequest.yuanToFen(storePayment.getPayMoney().toString()));
|
|
|
+ orderRequest.setTradeType("JSAPI");
|
|
|
+ orderRequest.setSpbillCreateIp(IpUtils.getIpAddr(ServletUtils.getRequest()));
|
|
|
+
|
|
|
+ try {
|
|
|
+ WxPayMpOrderResult orderResult = wxPayService.createOrder(orderRequest);
|
|
|
+ return R.ok().put("data", orderResult).put("type", "wx").put("isPay", 0);
|
|
|
+ } catch (WxPayException e) {
|
|
|
+ logger.error("微信支付发起失败: {}", e.getMessage(), e);
|
|
|
+ throw new CustomException("支付失败: " + e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 构建微信支付配置
|
|
|
+ */
|
|
|
+ private WxPayConfig buildWxPayConfig(FsPayConfig fsPayConfig) {
|
|
|
+ WxPayConfig payConfig = new WxPayConfig();
|
|
|
+ payConfig.setAppId(fsPayConfig.getAppId());
|
|
|
+ payConfig.setMchId(fsPayConfig.getWxMchId());
|
|
|
+ payConfig.setMchKey(fsPayConfig.getWxMchKey());
|
|
|
+ payConfig.setSubAppId(StringUtils.trimToNull(null));
|
|
|
+ payConfig.setSubMchId(StringUtils.trimToNull(null));
|
|
|
+ payConfig.setKeyPath(null);
|
|
|
+ payConfig.setNotifyUrl(wxPayProperties.getNotifyUrl());
|
|
|
+ return payConfig;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 判断是否微信支付
|
|
|
+ * @param method 支付类型
|
|
|
+ * @return boolean
|
|
|
+ */
|
|
|
+ private boolean isWechatPayment(PaymentMethodEnum method) {
|
|
|
+ return method == PaymentMethodEnum.MINIAPP_WECHAT || method == PaymentMethodEnum.H5_WECHAT;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据支付方式获取对应的openId
|
|
|
+ */
|
|
|
+ private String getOpenIdForPaymentMethod(FsUser user, PaymentMethodEnum method) {
|
|
|
+ switch (method) {
|
|
|
+ case MINIAPP_WECHAT:
|
|
|
+ return user.getMaOpenId();
|
|
|
+ case H5_WECHAT:
|
|
|
+ return user.getMpOpenId();
|
|
|
+ default:
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 创建支付订单
|
|
|
+ */
|
|
|
+ private FsStorePayment createStorePayment(FsPayConfig payConfig, FsUser user, PayOrderParam payOrderParam) {
|
|
|
+ String payCode = OrderCodeUtils.getOrderSn();
|
|
|
+ if (StringUtils.isEmpty(payCode)) {
|
|
|
+ throw new CustomException("订单生成失败,请重试");
|
|
|
+ }
|
|
|
+
|
|
|
+ FsStorePayment storePayment = new FsStorePayment();
|
|
|
+ storePayment.setStatus(0);
|
|
|
+ storePayment.setPayMode(payConfig.getType());
|
|
|
+ storePayment.setBusinessCode(payOrderParam.getOrderCode());
|
|
|
+ storePayment.setPayCode(payCode);
|
|
|
+ storePayment.setPayMoney(payOrderParam.getAmount());
|
|
|
+ storePayment.setCreateTime(new Date());
|
|
|
+ storePayment.setPayTypeCode(payOrderParam.getPaymentMethod().getDesc());
|
|
|
+ storePayment.setBusinessType(payOrderParam.getBusinessType().getCode());
|
|
|
+ storePayment.setCompanyId(payOrderParam.getCompanyId());
|
|
|
+ storePayment.setCompanyUserId(payOrderParam.getCompanyUserId());
|
|
|
+ storePayment.setRemark(payOrderParam.getBusinessType().getDesc());
|
|
|
+ storePayment.setStoreId(payOrderParam.getStoreId());
|
|
|
+ storePayment.setUserId(user.getUserId());
|
|
|
+ storePayment.setBusinessId(payOrderParam.getOrderId().toString());
|
|
|
+
|
|
|
+ // 设置openId(如果是微信支付)
|
|
|
+ if (isWechatPayment(payOrderParam.getPaymentMethod())) {
|
|
|
+ storePayment.setOpenId(getOpenIdForPaymentMethod(user, payOrderParam.getPaymentMethod()));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (fsStorePaymentMapper.insertFsStorePayment(storePayment) <= 0) {
|
|
|
+ throw new CustomException("支付订单创建失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ return storePayment;
|
|
|
+ }
|
|
|
+
|
|
|
}
|