ソースを参照

订单退款逻辑优化

yangbo 3 年 前
コミット
a3fe9485f7

+ 10 - 1
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -2729,7 +2729,16 @@ public class OrderServiceImpl implements OrderService {
             return R.error("订单已退款");
         }
 
-        if (orderInfo.getOrderStatus() != Integer.parseInt(Dict.orderStatus.item_201.getItem())) {
+        if (orderInfo.getOrderStatus() == Integer.parseInt(Dict.orderStatus.item_0.getItem())) {
+            return R.error("订单正在准备,请稍等!");
+        }
+        if (orderInfo.getOrderStatus() == Integer.parseInt(Dict.orderStatus.item_100.getItem())) {
+            return R.error("订单尚未支付完成,无法进行退款!");
+        }
+        if (orderInfo.getOrderStatus() == Integer.parseInt(Dict.orderStatus.item_101.getItem())) {
+            return R.error("订单尚未支付完成,无法进行退款!");
+        }
+        if (orderInfo.getOrderStatus() == Integer.parseInt(Dict.orderStatus.item_102.getItem())) {
             return R.error("订单尚未支付完成,无法进行退款!");
         }