feat:【PAY 支付】微信支付的转账,接入新的 API(需要继续测试,= = 真麻烦)
feat:【PAY 支付】钱包支持转账功能
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
### 请求 /pay/pay/demo-order 接口 => 成功
|
||||
### 请求 /pay/pay/demo-order 接口(支付宝) => 成功
|
||||
POST {{baseUrl}}/pay/demo-withdraw/create
|
||||
Authorization: Bearer {{token}}
|
||||
Content-Type: application/json
|
||||
@@ -10,4 +10,31 @@ tenant-id: {{adminTenantId}}
|
||||
"price": 10,
|
||||
"userAccount": "oespxk7368@sandbox.com",
|
||||
"userName": "oespxk7368"
|
||||
}
|
||||
|
||||
### 请求 /pay/pay/demo-order 接口(微信余额) => 成功
|
||||
POST {{baseUrl}}/pay/demo-withdraw/create
|
||||
Authorization: Bearer {{token}}
|
||||
Content-Type: application/json
|
||||
tenant-id: {{adminTenantId}}
|
||||
|
||||
{
|
||||
"type": 2,
|
||||
"subject": "测试转账",
|
||||
"price": 1,
|
||||
"userAccount": "oiSC85elO_OZogXODC5RoGyXamK4",
|
||||
"userName": "芋艿"
|
||||
}
|
||||
|
||||
### 请求 /pay/pay/demo-order 接口(钱包余额) => 成功
|
||||
POST {{baseUrl}}/pay/demo-withdraw/create
|
||||
Authorization: Bearer {{token}}
|
||||
Content-Type: application/json
|
||||
tenant-id: {{adminTenantId}}
|
||||
|
||||
{
|
||||
"type": 3,
|
||||
"subject": "测试转账",
|
||||
"price": 1,
|
||||
"userAccount": "1"
|
||||
}
|
||||
@@ -27,7 +27,6 @@ public class PayDemoWithdrawCreateReqVO {
|
||||
private String userAccount;
|
||||
|
||||
@Schema(description = "收款人姓名", example = "test1")
|
||||
@NotBlank(message = "收款人姓名不能为空")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "提现方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
|
||||
@@ -12,10 +12,12 @@ import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletDO;
|
||||
import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
|
||||
import cn.iocoder.yudao.module.pay.framework.pay.core.WalletPayClient;
|
||||
import cn.iocoder.yudao.module.pay.service.app.PayAppService;
|
||||
import cn.iocoder.yudao.module.pay.service.order.PayOrderService;
|
||||
import cn.iocoder.yudao.module.pay.service.wallet.PayWalletService;
|
||||
import com.google.common.collect.Maps;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@@ -51,6 +53,8 @@ public class PayOrderController {
|
||||
private PayOrderService orderService;
|
||||
@Resource
|
||||
private PayAppService appService;
|
||||
@Resource
|
||||
private PayWalletService payWalletService;
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得支付订单")
|
||||
@@ -92,11 +96,11 @@ public class PayOrderController {
|
||||
public CommonResult<PayOrderSubmitRespVO> submitPayOrder(@RequestBody PayOrderSubmitReqVO reqVO) {
|
||||
// 1. 钱包支付事,需要额外传 user_id 和 user_type
|
||||
if (Objects.equals(reqVO.getChannelCode(), PayChannelEnum.WALLET.getCode())) {
|
||||
Map<String, String> channelExtras = reqVO.getChannelExtras() == null ?
|
||||
Maps.newHashMapWithExpectedSize(2) : reqVO.getChannelExtras();
|
||||
channelExtras.put(WalletPayClient.USER_ID_KEY, String.valueOf(getLoginUserId()));
|
||||
channelExtras.put(WalletPayClient.USER_TYPE_KEY, String.valueOf(getLoginUserType()));
|
||||
reqVO.setChannelExtras(channelExtras);
|
||||
if (reqVO.getChannelExtras() == null) {
|
||||
reqVO.setChannelExtras(Maps.newHashMapWithExpectedSize(1));
|
||||
}
|
||||
PayWalletDO wallet = payWalletService.getOrCreateWallet(getLoginUserId(), getLoginUserType());
|
||||
reqVO.getChannelExtras().put(WalletPayClient.WALLET_ID_KEY, String.valueOf(wallet.getId()));
|
||||
}
|
||||
|
||||
// 2. 提交支付
|
||||
|
||||
@@ -9,9 +9,11 @@ import cn.iocoder.yudao.module.pay.controller.app.order.vo.AppPayOrderSubmitReqV
|
||||
import cn.iocoder.yudao.module.pay.controller.app.order.vo.AppPayOrderSubmitRespVO;
|
||||
import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletDO;
|
||||
import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
|
||||
import cn.iocoder.yudao.module.pay.framework.pay.core.WalletPayClient;
|
||||
import cn.iocoder.yudao.module.pay.service.order.PayOrderService;
|
||||
import cn.iocoder.yudao.module.pay.service.wallet.PayWalletService;
|
||||
import com.google.common.collect.Maps;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@@ -22,7 +24,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
@@ -39,6 +40,8 @@ public class AppPayOrderController {
|
||||
|
||||
@Resource
|
||||
private PayOrderService payOrderService;
|
||||
@Resource
|
||||
private PayWalletService payWalletService;
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得支付订单")
|
||||
@@ -63,11 +66,11 @@ public class AppPayOrderController {
|
||||
public CommonResult<AppPayOrderSubmitRespVO> submitPayOrder(@RequestBody AppPayOrderSubmitReqVO reqVO) {
|
||||
// 1. 钱包支付事,需要额外传 user_id 和 user_type
|
||||
if (Objects.equals(reqVO.getChannelCode(), PayChannelEnum.WALLET.getCode())) {
|
||||
Map<String, String> channelExtras = reqVO.getChannelExtras() == null ?
|
||||
Maps.newHashMapWithExpectedSize(2) : reqVO.getChannelExtras();
|
||||
channelExtras.put(WalletPayClient.USER_ID_KEY, String.valueOf(getLoginUserId()));
|
||||
channelExtras.put(WalletPayClient.USER_TYPE_KEY, String.valueOf(getLoginUserType()));
|
||||
reqVO.setChannelExtras(channelExtras);
|
||||
if (reqVO.getChannelExtras() == null) {
|
||||
reqVO.setChannelExtras(Maps.newHashMapWithExpectedSize(1));
|
||||
}
|
||||
PayWalletDO wallet = payWalletService.getOrCreateWallet(getLoginUserId(), getLoginUserType());
|
||||
reqVO.getChannelExtras().put(WalletPayClient.WALLET_ID_KEY, String.valueOf(wallet.getId()));
|
||||
}
|
||||
|
||||
// 2. 提交支付
|
||||
|
||||
@@ -53,6 +53,10 @@ public interface PayTransferMapper extends BaseMapperX<PayTransferDO> {
|
||||
PayTransferDO::getNo, no);
|
||||
}
|
||||
|
||||
default PayTransferDO selectByNo(String no) {
|
||||
return selectOne(PayTransferDO::getNo, no);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,13 +14,16 @@ import cn.iocoder.yudao.framework.pay.core.client.impl.AbstractPayClient;
|
||||
import cn.iocoder.yudao.framework.pay.core.client.impl.NonePayClientConfig;
|
||||
import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum;
|
||||
import cn.iocoder.yudao.framework.pay.core.enums.refund.PayRefundStatusRespEnum;
|
||||
import cn.iocoder.yudao.framework.pay.core.enums.transfer.PayTransferStatusRespEnum;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.transfer.PayTransferDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletTransactionDO;
|
||||
import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
|
||||
import cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum;
|
||||
import cn.iocoder.yudao.module.pay.service.order.PayOrderService;
|
||||
import cn.iocoder.yudao.module.pay.service.refund.PayRefundService;
|
||||
import cn.iocoder.yudao.module.pay.service.transfer.PayTransferService;
|
||||
import cn.iocoder.yudao.module.pay.service.wallet.PayWalletService;
|
||||
import cn.iocoder.yudao.module.pay.service.wallet.PayWalletTransactionService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -39,13 +42,14 @@ import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.REFUND_NOT_FO
|
||||
@Slf4j
|
||||
public class WalletPayClient extends AbstractPayClient<NonePayClientConfig> {
|
||||
|
||||
public static final String USER_ID_KEY = "user_id";
|
||||
public static final String USER_TYPE_KEY = "user_type";
|
||||
public static final String WALLET_ID_KEY = "walletId";
|
||||
|
||||
private PayWalletService wallService;
|
||||
private PayWalletTransactionService walletTransactionService;
|
||||
|
||||
private PayOrderService orderService;
|
||||
private PayRefundService refundService;
|
||||
private PayTransferService transferService;
|
||||
|
||||
public WalletPayClient(Long channelId, NonePayClientConfig config) {
|
||||
super(channelId, PayChannelEnum.WALLET.getCode(), config);
|
||||
@@ -62,19 +66,18 @@ public class WalletPayClient extends AbstractPayClient<NonePayClientConfig> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("PatternVariableCanBeUsed")
|
||||
protected PayOrderRespDTO doUnifiedOrder(PayOrderUnifiedReqDTO reqDTO) {
|
||||
try {
|
||||
Long userId = MapUtil.getLong(reqDTO.getChannelExtras(), USER_ID_KEY);
|
||||
Integer userType = MapUtil.getInt(reqDTO.getChannelExtras(), USER_TYPE_KEY);
|
||||
Assert.notNull(userId, "用户 id 不能为空");
|
||||
Assert.notNull(userType, "用户类型不能为空");
|
||||
PayWalletTransactionDO transaction = wallService.orderPay(userId, userType, reqDTO.getOutTradeNo(),
|
||||
reqDTO.getPrice());
|
||||
Long walletId = MapUtil.getLong(reqDTO.getChannelExtras(), WALLET_ID_KEY);
|
||||
Assert.notNull(walletId, "钱包编号");
|
||||
PayWalletTransactionDO transaction = wallService.orderPay(walletId,
|
||||
reqDTO.getOutTradeNo(), reqDTO.getPrice());
|
||||
return PayOrderRespDTO.successOf(transaction.getNo(), transaction.getCreator(),
|
||||
transaction.getCreateTime(),
|
||||
reqDTO.getOutTradeNo(), transaction);
|
||||
} catch (Throwable ex) {
|
||||
log.error("[doUnifiedOrder] 失败", ex);
|
||||
log.error("[doUnifiedOrder][reqDTO({}) 异常]", reqDTO, ex);
|
||||
Integer errorCode = INTERNAL_SERVER_ERROR.getCode();
|
||||
String errorMsg = INTERNAL_SERVER_ERROR.getMsg();
|
||||
if (ex instanceof ServiceException) {
|
||||
@@ -122,6 +125,7 @@ public class WalletPayClient extends AbstractPayClient<NonePayClientConfig> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("PatternVariableCanBeUsed")
|
||||
protected PayRefundRespDTO doUnifiedRefund(PayRefundUnifiedReqDTO reqDTO) {
|
||||
try {
|
||||
PayWalletTransactionDO payWalletTransaction = wallService.orderRefund(reqDTO.getOutRefundNo(),
|
||||
@@ -129,7 +133,7 @@ public class WalletPayClient extends AbstractPayClient<NonePayClientConfig> {
|
||||
return PayRefundRespDTO.successOf(payWalletTransaction.getNo(), payWalletTransaction.getCreateTime(),
|
||||
reqDTO.getOutRefundNo(), payWalletTransaction);
|
||||
} catch (Throwable ex) {
|
||||
log.error("[doUnifiedRefund] 失败", ex);
|
||||
log.error("[doUnifiedRefund][reqDOT({}) 异常]", reqDTO, ex);
|
||||
Integer errorCode = INTERNAL_SERVER_ERROR.getCode();
|
||||
String errorMsg = INTERNAL_SERVER_ERROR.getMsg();
|
||||
if (ex instanceof ServiceException) {
|
||||
@@ -177,18 +181,71 @@ public class WalletPayClient extends AbstractPayClient<NonePayClientConfig> {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PayTransferRespDTO doParseTransferNotify(Map<String, String> params, String body, Map<String, String> headers) {
|
||||
throw new UnsupportedOperationException("未实现");
|
||||
@SuppressWarnings("PatternVariableCanBeUsed")
|
||||
public PayTransferRespDTO doUnifiedTransfer(PayTransferUnifiedReqDTO reqDTO) {
|
||||
try {
|
||||
Long walletId = Long.parseLong(reqDTO.getUserAccount());
|
||||
PayWalletTransactionDO transaction = wallService.addWalletBalance(walletId, String.valueOf(reqDTO.getOutTransferNo()),
|
||||
PayWalletBizTypeEnum.TRANSFER, reqDTO.getPrice());
|
||||
return PayTransferRespDTO.successOf(transaction.getNo(), transaction.getCreateTime(),
|
||||
reqDTO.getOutTransferNo(), transaction);
|
||||
} catch (Throwable ex) {
|
||||
log.error("[doUnifiedTransfer][reqDTO({}) 异常]", reqDTO, ex);
|
||||
Integer errorCode = INTERNAL_SERVER_ERROR.getCode();
|
||||
String errorMsg = INTERNAL_SERVER_ERROR.getMsg();
|
||||
if (ex instanceof ServiceException) {
|
||||
ServiceException serviceException = (ServiceException) ex;
|
||||
errorCode = serviceException.getCode();
|
||||
errorMsg = serviceException.getMessage();
|
||||
}
|
||||
return PayTransferRespDTO.closedOf(String.valueOf(errorCode), errorMsg,
|
||||
reqDTO.getOutTransferNo(), "");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PayTransferRespDTO doUnifiedTransfer(PayTransferUnifiedReqDTO reqDTO) {
|
||||
throw new UnsupportedOperationException("待实现");
|
||||
protected PayTransferRespDTO doParseTransferNotify(Map<String, String> params, String body, Map<String, String> headers) {
|
||||
throw new UnsupportedOperationException("钱包支付无转账回调");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PayTransferRespDTO doGetTransfer(String outTradeNo) {
|
||||
throw new UnsupportedOperationException("待实现");
|
||||
if (transferService == null) {
|
||||
transferService = SpringUtil.getBean(PayTransferService.class);
|
||||
}
|
||||
// 获取转账单
|
||||
PayTransferDO transfer = transferService.getTransferByNo(outTradeNo);
|
||||
// 转账单不存在,返回关闭状态
|
||||
if (transfer == null) {
|
||||
return PayTransferRespDTO.closedOf(String.valueOf(PAY_ORDER_EXTENSION_NOT_FOUND.getCode()),
|
||||
PAY_ORDER_EXTENSION_NOT_FOUND.getMsg(), outTradeNo, "");
|
||||
}
|
||||
// 关闭状态
|
||||
if (PayTransferStatusRespEnum.isClosed(transfer.getStatus())) {
|
||||
return PayTransferRespDTO.closedOf(transfer.getChannelErrorCode(),
|
||||
transfer.getChannelErrorMsg(), outTradeNo, "");
|
||||
}
|
||||
// 成功状态
|
||||
if (PayTransferStatusRespEnum.isSuccess(transfer.getStatus())) {
|
||||
PayWalletTransactionDO walletTransaction = walletTransactionService.getWalletTransaction(
|
||||
String.valueOf(transfer.getId()), PayWalletBizTypeEnum.TRANSFER);
|
||||
Assert.notNull(walletTransaction, "转账单 {} 钱包流水不能为空", outTradeNo);
|
||||
return PayTransferRespDTO.successOf(walletTransaction.getNo(), walletTransaction.getCreateTime(),
|
||||
outTradeNo, walletTransaction);
|
||||
}
|
||||
// 处理中状态
|
||||
if (PayTransferStatusRespEnum.isProcessing(transfer.getStatus())) {
|
||||
return PayTransferRespDTO.processingOf(transfer.getChannelTransferNo(),
|
||||
outTradeNo, transfer);
|
||||
}
|
||||
// 等待状态
|
||||
if (transfer.getStatus().equals(PayTransferStatusRespEnum.WAITING.getStatus())) {
|
||||
return PayTransferRespDTO.waitingOf(transfer.getChannelTransferNo(),
|
||||
outTradeNo, transfer);
|
||||
}
|
||||
// 其它状态为无效状态
|
||||
log.error("[doGetTransfer] 转账单 {} 的状态不正确", outTradeNo);
|
||||
throw new IllegalStateException(String.format("转账单[%s] 状态不正确", outTradeNo));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -57,11 +57,16 @@ public class PayDemoTransferServiceImpl implements PayDemoWithdrawService {
|
||||
demoTransferMapper.insert(withdraw);
|
||||
|
||||
// 2.1 创建支付单
|
||||
Long payTransferId = payTransferApi.createTransfer(new PayTransferCreateReqDTO()
|
||||
PayTransferCreateReqDTO transferReqDTO = new PayTransferCreateReqDTO()
|
||||
.setAppKey(PAY_APP_KEY).setChannelCode(withdraw.getTransferChannelCode()).setUserIp(getClientIP()) // 支付应用
|
||||
.setMerchantOrderId(String.valueOf(withdraw.getId())) // 业务的订单编号
|
||||
.setSubject(reqVO.getSubject()).setPrice(withdraw.getPrice()) // 价格信息
|
||||
.setUserAccount(reqVO.getUserAccount()).setUserName(reqVO.getUserName())); // 收款信息
|
||||
.setUserAccount(reqVO.getUserAccount()).setUserName(reqVO.getUserName()); // 收款信息
|
||||
if (ObjectUtil.equal(reqVO.getType(), PayDemoWithdrawTypeEnum.WECHAT.getType())) {
|
||||
transferReqDTO.setChannelExtras(PayTransferCreateReqDTO.buildWeiXinChannelExtra1000(
|
||||
"测试活动", "测试奖励"));
|
||||
}
|
||||
Long payTransferId = payTransferApi.createTransfer(transferReqDTO);
|
||||
// 2.2 更新转账单到 demo 示例提现单
|
||||
demoTransferMapper.updateById(new PayDemoWithdrawDO().setId(withdraw.getId())
|
||||
.setPayTransferId(payTransferId));
|
||||
|
||||
@@ -28,6 +28,14 @@ public interface PayTransferService {
|
||||
*/
|
||||
PayTransferDO getTransfer(Long id);
|
||||
|
||||
/**
|
||||
* 根据转账单号获取转账单
|
||||
*
|
||||
* @param no 转账单号
|
||||
* @return 转账单
|
||||
*/
|
||||
PayTransferDO getTransferByNo(String no);
|
||||
|
||||
/**
|
||||
* 获得转账单分页
|
||||
*
|
||||
|
||||
@@ -238,6 +238,11 @@ public class PayTransferServiceImpl implements PayTransferService {
|
||||
return transferMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PayTransferDO getTransferByNo(String no) {
|
||||
return transferMapper.selectByNo(no);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<PayTransferDO> getTransferPage(PayTransferPageReqVO pageReqVO) {
|
||||
return transferMapper.selectPage(pageReqVO);
|
||||
|
||||
@@ -41,12 +41,11 @@ public interface PayWalletService {
|
||||
/**
|
||||
* 钱包订单支付
|
||||
*
|
||||
* @param userId 用户 id
|
||||
* @param userType 用户类型
|
||||
* @param walletId 钱包编号
|
||||
* @param outTradeNo 外部订单号
|
||||
* @param price 金额
|
||||
*/
|
||||
PayWalletTransactionDO orderPay(Long userId, Integer userType, String outTradeNo, Integer price);
|
||||
PayWalletTransactionDO orderPay(Long walletId, String outTradeNo, Integer price);
|
||||
|
||||
/**
|
||||
* 钱包订单支付退款
|
||||
@@ -60,8 +59,8 @@ public interface PayWalletService {
|
||||
/**
|
||||
* 扣减钱包余额
|
||||
*
|
||||
* @param walletId 钱包 id
|
||||
* @param bizId 业务关联 id
|
||||
* @param walletId 钱包编号
|
||||
* @param bizId 业务关联编号
|
||||
* @param bizType 业务关联分类
|
||||
* @param price 扣减金额
|
||||
* @return 钱包流水
|
||||
@@ -72,8 +71,8 @@ public interface PayWalletService {
|
||||
/**
|
||||
* 增加钱包余额
|
||||
*
|
||||
* @param walletId 钱包 id
|
||||
* @param bizId 业务关联 id
|
||||
* @param walletId 钱包编号
|
||||
* @param bizId 业务关联编号
|
||||
* @param bizType 业务关联分类
|
||||
* @param price 增加金额
|
||||
* @return 钱包流水
|
||||
|
||||
@@ -81,13 +81,13 @@ public class PayWalletServiceImpl implements PayWalletService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public PayWalletTransactionDO orderPay(Long userId, Integer userType, String outTradeNo, Integer price) {
|
||||
public PayWalletTransactionDO orderPay(Long walletId, String outTradeNo, Integer price) {
|
||||
// 1. 判断支付交易拓展单是否存
|
||||
PayOrderExtensionDO orderExtension = orderService.getOrderExtensionByNo(outTradeNo);
|
||||
if (orderExtension == null) {
|
||||
throw exception(PAY_ORDER_EXTENSION_NOT_FOUND);
|
||||
}
|
||||
PayWalletDO wallet = getOrCreateWallet(userId, userType);
|
||||
PayWalletDO wallet = walletMapper.selectById(walletId);
|
||||
// 2. 扣减余额
|
||||
return reduceWalletBalance(wallet.getId(), orderExtension.getOrderId(), PAYMENT, price);
|
||||
}
|
||||
@@ -198,7 +198,7 @@ public class PayWalletServiceImpl implements PayWalletService {
|
||||
break;
|
||||
}
|
||||
case UPDATE_BALANCE: // 更新余额
|
||||
case BROKERAGE_WITHDRAW: // 分佣提现
|
||||
case TRANSFER: // 分佣提现
|
||||
walletMapper.updateWhenAdd(payWallet.getId(), price);
|
||||
break;
|
||||
default: {
|
||||
|
||||
Reference in New Issue
Block a user