|
|
@@ -10,8 +10,8 @@ import com.nb.app.doctor.api.feign.IAppDoctorUserClient;
|
|
|
import com.nb.app.doctor.mapper.AppDoctorUserMapper;
|
|
|
import com.nb.auth.utils.SecurityUtil;
|
|
|
import com.nb.common.crud.BaseService;
|
|
|
+import com.nb.core.enums.StatusEnum;
|
|
|
import com.nb.core.exception.CustomException;
|
|
|
-import org.hibernate.validator.constraints.Length;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
@@ -42,6 +42,9 @@ public class LocalAppDoctorUserService extends BaseService<AppDoctorUserMapper,
|
|
|
AppDoctorUserEntity doctor = this.getOne(new QueryWrapper<AppDoctorUserEntity>()
|
|
|
.lambda().eq(AppDoctorUserEntity::getUsername, username)
|
|
|
.last("limit 1"));
|
|
|
+ if(entity.getStatus()==null){
|
|
|
+ entity.setStatus(StatusEnum.YES);
|
|
|
+ }
|
|
|
if(doctor!=null){
|
|
|
throw new CustomException(String.format("用户名{%s}已存在,不可重复添加",username));
|
|
|
}
|