add 后管新增退款保险金额按钮

This commit is contained in:
Lemon
2025-10-11 16:07:37 +08:00
parent f59201129f
commit ca83cffffa
4 changed files with 27 additions and 3 deletions

View File

@@ -438,6 +438,8 @@ public class OrderService {
order.setDiscountAmount(String.valueOf(orderBasicInfo.getDiscountAmount()));
order.setSettleAmount(String.valueOf(orderBasicInfo.getSettleAmount()));
order.setSettlementTime(DateUtils.formatDateTime(orderBasicInfo.getSettlementTime()));
order.setMerchantId(orderBasicInfo.getMerchantId());
order.setInsuranceAmount(String.valueOf(orderBasicInfo.getInsuranceAmount()));
vo.setOrderInfo(order);
// 设备信息

View File

@@ -344,4 +344,24 @@ public class OrderBasicInfoController extends BaseController {
return response;
}
/**
* 订单保险金额退款
* @return
*/
@PostMapping("/refundInsuranceAmount")
public RestApiResponse<?> refundInsuranceAmount(@RequestBody OrderBasicInfo orderBasicInfo) {
RestApiResponse<?> response = null;
try {
orderBasicInfoService.refundInsurance(orderBasicInfo);
response = new RestApiResponse<>();
} catch (BusinessException e) {
logger.error("订单保险金额退款 error,", e);
response = new RestApiResponse<>(e.getCode(), e.getMessage());
} catch (Exception e) {
logger.error("订单保险金额退款 error,", e);
response = new RestApiResponse<>(e);
}
logger.info("订单保险金额退款 params:{}, result:{}", JSON.toJSONString(orderBasicInfo), response);
return response;
}
}

View File

@@ -484,10 +484,10 @@ public class PaymentTestController {
*/
@Test
public void createPaymentReverseRequestTest() {
String paymentId = "002212025092509265410817097978174926848";
String paymentId = "002212025100513581210820790129447211008";
BigDecimal refundAmount = new BigDecimal("0.5");
String memberId = "65622699";
String orderCode = "C23464104497";
String memberId = "84488845";
String orderCode = "C82180436213";
// 延迟分账未确认调撤销调撤销接口退款
PaymentReverseOperation operation = new PaymentReverseOperation();