zoujiajian пре 1 година
родитељ
комит
179f1667ec

+ 12 - 2
netflix-web/src/main/java/com/cyksj/web/controller/manage/group/CmsGroupRelationController.java

@@ -192,10 +192,20 @@ public class CmsGroupRelationController {
             orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
                     .eq(OrderDon::getUserId, relation.getUserId())
                     .eq(OrderDon::getRelationId, relationId)
-                    .notIn(OrderDon::getStatus, Constant.noOrderStatus)
+                    .notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
                     .orderByDesc(OrderDon::getId)
                     .last("limit 1"));
-            if (orderDon == null) throw BusinessRuntimeException.getInstance("该代充订单不存在");
+            if (orderDon == null){
+                orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
+                        .eq(OrderDon::getUserId, relation.getUserId())
+                        .eq(OrderDon::getRelationId, relationId)
+                        .notIn(OrderDon::getStatus, Constant.noOrderStatus)
+                        .orderByDesc(OrderDon::getId)
+                        .last("limit 1"));
+                if (orderDon == null) {
+                    throw BusinessRuntimeException.getInstance("该代充订单不存在");
+                }
+            }
             if (orderDon.getStatus() == OrderDon.Status.refund) {
                 throw BusinessRuntimeException.getInstance("该代充订单已退款");
             }