|
@@ -41,7 +41,6 @@ import static com.citu.framework.common.exception.util.ServiceExceptionUtil.exce
|
|
|
import static com.citu.framework.common.util.date.LocalDateTimeUtils.addTime;
|
|
|
import static com.citu.framework.common.util.json.JsonUtils.toJsonString;
|
|
|
import static com.citu.framework.common.util.number.MoneyUtils.fenToYuanStr;
|
|
|
-import static com.citu.framework.web.core.util.WebFrameworkUtils.getLoginUserType;
|
|
|
import static com.citu.module.pay.enums.ErrorCodeConstants.*;
|
|
|
import static com.citu.module.pay.enums.MessageTemplateConstants.WXA_WALLET_RECHARGER_PAID;
|
|
|
import static com.citu.module.pay.enums.refund.PayRefundStatusEnum.*;
|
|
@@ -55,10 +54,7 @@ import static com.citu.module.pay.enums.refund.PayRefundStatusEnum.*;
|
|
|
@Slf4j
|
|
|
public class PayCurrencyRechargeServiceImpl implements PayCurrencyRechargeService {
|
|
|
|
|
|
- /**
|
|
|
- * TODO 芋艿:放到 payconfig
|
|
|
- */
|
|
|
- private static final Long WALLET_PAY_APP_ID = 11L;
|
|
|
+ private static final String PAY_APP_KEY = "currency";
|
|
|
|
|
|
private static final String RECHARGE_ORDER_SUBJECT = "账户充值";
|
|
|
/**
|
|
@@ -120,7 +116,7 @@ public class PayCurrencyRechargeServiceImpl implements PayCurrencyRechargeServic
|
|
|
|
|
|
// 2.1 创建支付单
|
|
|
Long payOrderId = payOrderService.createOrder(new PayOrderCreateReqDTO()
|
|
|
- .setAppId(WALLET_PAY_APP_ID).setUserIp(userIp)
|
|
|
+ .setAppKey(PAY_APP_KEY).setUserIp(userIp)
|
|
|
.setMerchantOrderId(recharge.getId().toString()) // 业务的订单编号
|
|
|
.setSubject(RECHARGE_ORDER_SUBJECT).setBody("")
|
|
|
.setPrice(Math.toIntExact(recharge.getPayPrice()))
|
|
@@ -224,7 +220,7 @@ public class PayCurrencyRechargeServiceImpl implements PayCurrencyRechargeServic
|
|
|
String currencyRechargeId = String.valueOf(id);
|
|
|
String refundId = currencyRechargeId + "-refund";
|
|
|
Long payRefundId = payRefundService.createPayRefund(new PayRefundCreateReqDTO()
|
|
|
- .setAppId(WALLET_PAY_APP_ID).setUserIp(userIp)
|
|
|
+ .setAppKey(PAY_APP_KEY).setUserIp(userIp)
|
|
|
.setMerchantOrderId(currencyRechargeId)
|
|
|
.setMerchantRefundId(refundId)
|
|
|
.setReason("想退钱").setPrice(Math.toIntExact(currencyRecharge.getPayPrice())));
|