‘linchangsheng’ 4 months ago
parent
commit
cb806a4262

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

@@ -467,6 +467,10 @@ public class UserLogic {
                 throw new RemoteServiceException("不同师傅不能导入重复师傅编号,请检查"+userWait.getMobile()+"!");
 
 
+            if (userWaits.stream().filter(item -> item.getWorkerNumber().equals(userWait.getWorkerNumber())).count() > 0) {
+                throw new RemoteServiceException("不同师傅不能导入重复师傅编号,请检查"+userWait.getMobile()+"!");
+            }
+
             userWaits.add(userWait);
         }
         userWaitService.saveBatch(userWaits);