Sfoglia il codice sorgente

管理端限制转单

夏文涛 1 anno fa
parent
commit
d5223a3b73

+ 4 - 0
src/main/java/com/sqx/modules/errand/controller/TbIndentController.java

@@ -1,5 +1,6 @@
 package com.sqx.modules.errand.controller;
 
+import com.sqx.common.exception.SqxException;
 import com.sqx.common.utils.DateUtils;
 import com.sqx.common.utils.Result;
 import com.sqx.modules.app.entity.UserEntity;
@@ -136,6 +137,9 @@ public class TbIndentController {
                 return Result.error("商家配送不允许转单!");
             }
         }
+        if (!"3".equals(indent.getIndentState()) && !"4".equals(indent.getIndentState())) {
+            throw new SqxException("订单状态发生变更,请刷新后重试!");
+        }
 
         UserEntity userEntity = userService.selectUserById(riderUserId);
         CommonInfo one1 = commonInfoService.findOne(273);