|
|
@@ -31,6 +31,7 @@ import com.nb.im.service.LocalImRoomService;
|
|
|
import com.nb.im.utils.ImUtils;
|
|
|
import com.nb.im.ws.PubMsgInfo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.hibernate.validator.constraints.Length;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.context.event.EventListener;
|
|
|
@@ -150,6 +151,11 @@ public class LocalAppDoctorUserService extends BaseService<AppDoctorUserMapper,
|
|
|
if(sources.size()>100){
|
|
|
throw new CustomException("单次新增用户数量不可超过100个");
|
|
|
}
|
|
|
+ for (AppDoctorUserEntity source : sources) {
|
|
|
+ if(StrUtil.isEmpty(source.getRealName())){
|
|
|
+ throw new CustomException(String.format("用户名:{%s},姓名不能为空",source.getUsername()));
|
|
|
+ }
|
|
|
+ }
|
|
|
List<String> userNames = sources.stream()
|
|
|
.peek(source->{
|
|
|
if(StrUtil.isEmpty(source.getPassword())){
|