...
|
...
|
@@ -2,6 +2,7 @@ package com.yohoufo.order.controller; |
|
|
|
|
|
import com.yoho.error.ServiceError;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yohobuy.ufo.model.order.bo.MerchantOrderAttachInfo;
|
|
|
import com.yohobuy.ufo.model.order.bo.OrderInfo;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderCodeType;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderStatus;
|
...
|
...
|
@@ -137,9 +138,13 @@ public class OrderHelpController { |
|
|
public ApiResponse refund(@RequestParam(name = "orderCode") long orderCode,
|
|
|
@RequestParam(name = "paidOrderCode", required = false) Long paidOrderCode,
|
|
|
@RequestParam(name = "payLevel", defaultValue = "0") int payLevel,
|
|
|
@RequestParam(name = "refundType", required = false) int refundType,
|
|
|
@RequestParam(name = "refundAmount") double refundAmount) {
|
|
|
|
|
|
PaymentRequest request = PaymentRequest.builder().orderCode(orderCode).paidOrderCode(paidOrderCode).payLevel(payLevel).refundAmount(refundAmount).build();
|
|
|
PaymentRequest request = PaymentRequest.builder().orderCode(orderCode).paidOrderCode(paidOrderCode).payLevel(payLevel)
|
|
|
.refundAmount(refundAmount)
|
|
|
.refundattch(MerchantOrderAttachInfo.builder().type(refundType).build())
|
|
|
.build();
|
|
|
PayRefundBo payRefundBo = paymentService.refund(request);
|
|
|
|
|
|
if (payRefundBo.getRefundStatus() == RefundContant.PAYMENT_REFUND_RESULTCODE_SUCCESS) {
|
...
|
...
|
|