mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-24 16:05:08 +08:00
trade:完成支付成功后的回调,更新订单为已支付
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
package cn.iocoder.yudao.module.pay.api.order;
|
||||
|
||||
import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO;
|
||||
import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderRespDTO;
|
||||
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.service.order.PayOrderService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -18,8 +21,14 @@ public class PayOrderApiImpl implements PayOrderApi {
|
||||
private PayOrderService payOrderService;
|
||||
|
||||
@Override
|
||||
public Long createPayOrder(PayOrderCreateReqDTO reqDTO) {
|
||||
public Long createOrder(PayOrderCreateReqDTO reqDTO) {
|
||||
return payOrderService.createPayOrder(reqDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PayOrderRespDTO getOrder(Long id) {
|
||||
PayOrderDO order = payOrderService.getOrder(id);
|
||||
return PayOrderConvert.INSTANCE.convert2(order);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.pay.convert.order;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderUnifiedReqDTO;
|
||||
import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO;
|
||||
import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderRespDTO;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderDetailsRespVO;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderExcelVO;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageItemRespVO;
|
||||
@ -41,13 +42,14 @@ public interface PayOrderConvert {
|
||||
List<PayOrderExcelVO> convertList02(List<PayOrderDO> list);
|
||||
|
||||
/**
|
||||
* 订单DO转自定义分页对象
|
||||
* 订单 DO 转自定义分页对象
|
||||
*
|
||||
* @param bean 订单DO
|
||||
* @return 分页对象
|
||||
*/
|
||||
PayOrderPageItemRespVO pageConvertItemPage(PayOrderDO bean);
|
||||
|
||||
// TODO 芋艿:优化下 convert 逻辑
|
||||
default PayOrderExcelVO excelConvert(PayOrderDO bean) {
|
||||
if (bean == null) {
|
||||
return null;
|
||||
@ -94,4 +96,6 @@ public interface PayOrderConvert {
|
||||
|
||||
PayOrderUnifiedReqDTO convert2(PayOrderSubmitReqDTO bean);
|
||||
|
||||
PayOrderRespDTO convert2(PayOrderDO bean);
|
||||
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ public class PayOrderDO extends BaseDO {
|
||||
/**
|
||||
* 支付金额,单位:分
|
||||
*/
|
||||
private Long amount;
|
||||
private Integer amount;
|
||||
/**
|
||||
* 渠道手续费,单位:百分比
|
||||
*
|
||||
|
Reference in New Issue
Block a user