营销活动+订单:完善大部分 TODO 提到的问题

This commit is contained in:
puhui999
2023-09-08 00:35:54 +08:00
parent 2591ab5d36
commit 0e8755972c
19 changed files with 381 additions and 45 deletions

View File

@ -31,4 +31,10 @@ public class PayOrderApiImpl implements PayOrderApi {
return PayOrderConvert.INSTANCE.convert2(order);
}
@Override
public void updatePayOrderPriceById(Long payOrderId, Integer payPrice) {
payOrderService.updatePayOrderPriceById(payOrderId, payPrice);
}
}

View File

@ -33,7 +33,7 @@ public interface PayOrderService {
/**
* 获得支付订单
*
* @param appId 应用编号
* @param appId 应用编号
* @param merchantOrderId 商户订单编号
* @return 支付订单
*/
@ -75,7 +75,7 @@ public interface PayOrderService {
* 提交支付
* 此时,会发起支付渠道的调用
*
* @param reqVO 提交请求
* @param reqVO 提交请求
* @param userIp 提交 IP
* @return 提交结果
*/
@ -93,11 +93,19 @@ public interface PayOrderService {
/**
* 更新支付订单的退款金额
*
* @param id 编号
* @param id 编号
* @param incrRefundPrice 增加的退款金额
*/
void updateOrderRefundPrice(Long id, Integer incrRefundPrice);
/**
* 更新支付订单价格
*
* @param payOrderId 支付单编号
* @param payPrice 支付单价格
*/
void updatePayOrderPriceById(Long payOrderId, Integer payPrice);
/**
* 获得支付订单
*

View File

@ -410,6 +410,17 @@ public class PayOrderServiceImpl implements PayOrderService {
}
}
@Override
public void updatePayOrderPriceById(Long payOrderId, Integer payPrice) {
PayOrderDO order = orderMapper.selectById(payOrderId);
if (order == null) {
throw exception(ORDER_NOT_FOUND);
}
order.setPrice(payPrice);
orderMapper.updateById(order);
}
@Override
public PayOrderExtensionDO getOrderExtension(Long id) {
return orderExtensionMapper.selectById(id);