From 2e83933c023eddebfdb7d4ed33cda681173f6f13 Mon Sep 17 00:00:00 2001
From: chenjiahe <763432473@qq.com>
Date: 星期一, 03 四月 2023 14:55:23 +0800
Subject: [PATCH] 全额退款优化

---
 phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java b/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java
index 7df943d..ae6a8a7 100644
--- a/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java
+++ b/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java
@@ -1853,6 +1853,7 @@
 
         //鑾峰彇璇ョ瑪璁㈠崟鐨勯」鐩鎯�
         List<Map<String, Object>> refundDetails=refundDetails(ordersTotal);
+
         // 閫�娆句俊鎭泦鍚�
         List<OrderItemRefundDto> refundList=new ArrayList<>();
         //閫�娆句簩绾у瓙璁㈠崟淇℃伅闆嗗悎
@@ -1862,7 +1863,7 @@
         OrderItemRefundDto orderItemRefundDto;
         OrderItemSourceRefundDto orderItemSourceRefundDto;
         for (Map<String, Object> refundDetail : refundDetails) {
-            orderItemRefundDto=new OrderItemRefundDto();
+            orderItemRefundDto = new OrderItemRefundDto();
             orderItemRefundDto.setOrderItemId(String.valueOf(refundDetail.get("id")));
             orderItemRefundDto.setType(String.valueOf(refundDetail.get("type")));
 
@@ -1870,7 +1871,8 @@
             orderItemRefundDto.setRemarks(orderRefundDto.getRemarks());
             orderItemRefundDto.setRefundReason(orderRefundDto.getRefundReason());
 
-            if(OrderItemConstants.TYPE_PROMOTION.equals(orderItemRefundDto.getType()) || OrderItemConstants.CARD_BAG.equals(orderItemRefundDto.getType())){
+            if(OrderItemConstants.TYPE_PROMOTION.equals(orderItemRefundDto.getType())
+                    || OrderItemConstants.CARD_BAG.equals(orderItemRefundDto.getType())){
                 orderItemRefundDto.setRefundNum(0);
                 refundSonDetails= (List<Map<String, Object>>) refundDetail.get("list");
                 orderItemSourceRefundDtos=new ArrayList<>();
@@ -1905,6 +1907,15 @@
         parameter.setRefundOperationType(BaseEntity.NO);
         parameter.setRemarks(orderRefundDto.getRemarks());
         parameter.setRefundReason(orderRefundDto.getRefundReason());
+
+        //閫�娆鹃噾棰�
+        List<OrderPayMethodDto> refundPayMethodList = parameter.getPayMethodList();
+        for(OrderPayMethodDto orderPayMethodDto:refundPayMethodList){
+            orderPayMethodDto.setRefundNumberNo(orderPayMethodDto.getPayMethodNo());
+            orderPayMethodDto.setRefundNumberName(orderPayMethodDto.getPayMethodName());
+            orderPayMethodDto.setMoney(orderPayMethodDto.getPayTotal());
+        }
+
         //璋冪敤閫�娆惧鐞嗛��娆鹃�昏緫
         return partRefund(ordersTotal,parameter,thirtApplication);
     }

--
Gitblit v1.8.0