diff --git a/mhd-user-center/src/main/java/com/mhd/user/application/service/UserDriverEnterpriseApplicationService.java b/mhd-user-center/src/main/java/com/mhd/user/application/service/UserDriverEnterpriseApplicationService.java index 98b1cd0fa..471218ff2 100644 --- a/mhd-user-center/src/main/java/com/mhd/user/application/service/UserDriverEnterpriseApplicationService.java +++ b/mhd-user-center/src/main/java/com/mhd/user/application/service/UserDriverEnterpriseApplicationService.java @@ -568,6 +568,15 @@ public class UserDriverEnterpriseApplicationService { public Map captainAuth(UserDriverEnterpriseDo userDriverEnterpriseDo) { LoginUser loginUser = SecurityUtils.getLoginUser(); Map result = new HashMap<>(); + if (org.apache.commons.lang3.StringUtils.isBlank(userDriverEnterpriseDo.getUserAccount())) { + throw new ServiceException("用户账号不能为空"); + } + if (org.apache.commons.lang3.StringUtils.isBlank(userDriverEnterpriseDo.getUserName())) { + throw new ServiceException("用户姓名不能为空"); + } + if (org.apache.commons.lang3.StringUtils.isBlank(userDriverEnterpriseDo.getUserPhone())) { + throw new ServiceException("用户电话不能为空"); + } // 1. 前置检查:如果用户已存在,检查是否已加入其他车队 performPreChecks(userDriverEnterpriseDo);