update订单逻辑改造工厂模式

This commit is contained in:
2023-09-01 13:30:59 +08:00
parent 545badd38b
commit b26074a075
2 changed files with 49 additions and 20 deletions

View File

@@ -22,6 +22,7 @@ import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.redis.RedisCache;
import com.jsowell.common.enums.DelFlagEnum;
import com.jsowell.common.enums.adapay.AdapayStatusEnum;
import com.jsowell.common.enums.adapay.MerchantDelayModeEnum;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.AdapayUtil;
@@ -105,7 +106,8 @@ public class AdapayService {
// 封装对象
String amount = AdapayUtil.formatAmount(dto.getPayAmount()); // 用户支付金额
// String payMode = Constants.ADAPAY_PAY_MODE_DELAY; // 汇付延时分账
// String payMode = pileMerchantInfoService.getDelayModeByWechatAppId(dto.getWechatAppId());
String delayMode = pileMerchantInfoService.getDelayModeByWechatAppId(dto.getWechatAppId());
String payMode = MerchantDelayModeEnum.getAdapayPayMode(delayMode);
CreateAdaPaymentParam createAdaPaymentParam = new CreateAdaPaymentParam();
createAdaPaymentParam.setOrder_no(dto.getOrderCode());
createAdaPaymentParam.setPay_amt(amount);