‘linchangsheng’ 1 vecka sedan
förälder
incheckning
627895048d

+ 4 - 0
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderBaseEsLogic.java

@@ -15,6 +15,7 @@ import com.gree.mall.manager.enums.MaterialExamineStatusEnum;
 import com.gree.mall.manager.es.OrderBaseEsRepository;
 import com.gree.mall.manager.es.OrderWorkerEsRepository;
 import com.gree.mall.manager.es.SettlementOrderEsRepository;
+import com.gree.mall.manager.exception.RemoteServiceException;
 import com.gree.mall.manager.logic.common.CommonLogic;
 import com.gree.mall.manager.plus.entity.*;
 import com.gree.mall.manager.plus.service.PgOrderBaseService;
@@ -704,6 +705,9 @@ public class OrderBaseEsLogic {
         String scrollId = scrollHits.getScrollId();
         int batch = 0;
 
+        if (scrollHits.getTotalHits() > 60000)
+            throw  new RemoteServiceException("数据超过六万上限,请分批导出");
+
         List<OrderBaseEs> orderBaseVOS = new ArrayList<>();
 
         try {