diff --git a/EOM.TSHotelManagement.Service/SystemManagement/Administrator/AdminService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Administrator/AdminService.cs index 43e323706a6b8edb2a683448e52cdb30dfd479bb..3388b627cd7d0ecf33a85bbf20cb6f8c62c63cb3 100644 --- a/EOM.TSHotelManagement.Service/SystemManagement/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Administrator/AdminService.cs @@ -228,11 +228,15 @@ namespace EOM.TSHotelManagement.Service { try { - var haveSuperAdmin = adminRepository.IsAny(a => a.IsSuperAdmin == 1 && a.IsDelete != 1); - if (haveSuperAdmin) + if (createAdministratorInputDto.IsSuperAdmin == 1) { - return new BaseResponse { Message = LocalizationHelper.GetLocalizedString("Super Administrator already exists", "超级管理员已存在"), Code = BusinessStatusCode.InternalServerError }; + var haveSuperAdmin = adminRepository.IsAny(a => a.IsSuperAdmin == 1 && a.IsDelete != 1); + if (haveSuperAdmin) + { + return new BaseResponse { Message = LocalizationHelper.GetLocalizedString("Super Administrator already exists", "超级管理员已存在"), Code = BusinessStatusCode.InternalServerError }; + } } + var haveAdmin = adminRepository.IsAny(a => a.Account == createAdministratorInputDto.Account); if (haveAdmin) { diff --git a/version.txt b/version.txt index e7b2a522c42f4bb70e24cf02502fc0945fc592cd..5dd7646c1621f86363ec6a00d00c5d3965f488fd 100644 Binary files a/version.txt and b/version.txt differ