修改提示语言
This commit is contained in:
@@ -26,7 +26,7 @@ namespace IRaCIS.Application.Services
|
||||
var exp = new EntityVerifyExp<Menu>()
|
||||
{
|
||||
VerifyExp = u => u.ParentId == menuAddOrUpdateModel.ParentId && u.MenuName == menuAddOrUpdateModel.MenuName,
|
||||
VerifyMsg = "A son node with the same name already existed under this parent node."
|
||||
VerifyMsg = "该父节点下已经存在同名的子节点。"
|
||||
};
|
||||
|
||||
var menu = await _repository.InsertOrUpdateAsync<Menu, MenuCommand>(menuAddOrUpdateModel, true, exp);
|
||||
@@ -90,7 +90,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await menuRepository.AnyAsync(t => t.ParentId == menuId))
|
||||
{
|
||||
return ResponseOutput.NotOk("不允许直接删除父节点");
|
||||
return ResponseOutput.NotOk("该节点存在子节点,请在删除子节点后,再删除该节点。");
|
||||
}
|
||||
|
||||
var success =await menuRepository.BatchDeleteNoTrackingAsync(u => u.Id == menuId);
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _userRepository.AnyAsync(t => t.UserName == userName && t.Id != userId))
|
||||
{
|
||||
throw new BusinessValidationFailedException("UserId already exists");
|
||||
throw new BusinessValidationFailedException("用户名已经存在。");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _userRepository.AnyAsync(t => (t.Phone == phone && t.UserTypeId == userTypeId && t.Id != userId)))
|
||||
{
|
||||
throw new BusinessValidationFailedException("The phone for this user type already exists");
|
||||
throw new BusinessValidationFailedException("该用户类型中已存在具有相同的电话的用户。");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _userRepository.AnyAsync(t => (t.EMail == email && t.UserTypeId == userTypeId && t.Id != userId)))
|
||||
{
|
||||
throw new BusinessValidationFailedException("The mailbox for this user type already exists");
|
||||
throw new BusinessValidationFailedException("该用户类型中已存在具有相同邮箱的用户。");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (oldPwd != null && oldPwd == newPwd)
|
||||
{
|
||||
throw new BusinessValidationFailedException("password not change");
|
||||
throw new BusinessValidationFailedException("新密码与旧密码相同。");
|
||||
}
|
||||
|
||||
var dbUser = (await _userRepository.FirstOrDefaultAsync(t => t.Id == userId)).IfNullThrowException();
|
||||
@@ -83,13 +83,13 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (dbUser.Password == newPwd)
|
||||
{
|
||||
throw new BusinessValidationFailedException("password not change");
|
||||
throw new BusinessValidationFailedException("新密码与旧密码相同。");
|
||||
}
|
||||
|
||||
|
||||
if (dbUser.Password == oldPwd)
|
||||
{
|
||||
throw new BusinessValidationFailedException("old password error");
|
||||
throw new BusinessValidationFailedException("旧密码验证失败。");
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace IRaCIS.Application.Services
|
||||
if (!Regex.IsMatch(newPwd, @"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[_.@])[A-Za-z0-9_.@$!%*?&]{10,}"))
|
||||
{
|
||||
|
||||
throw new BusinessValidationFailedException("至少10个字符,其中至少1个大写字母,1个小写字母,1个数字和1个特殊字符");
|
||||
throw new BusinessValidationFailedException("密码至少10个字符,且包括至少1个大写字母,1个小写字母,1个数字和1个特殊字符");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@ namespace IRaCIS.Application.Services
|
||||
if (verificationRecord == null)
|
||||
{
|
||||
|
||||
return ResponseOutput.NotOk("Verification code error");
|
||||
return ResponseOutput.NotOk("验证码错误。");
|
||||
|
||||
}
|
||||
else
|
||||
@@ -153,7 +153,7 @@ namespace IRaCIS.Application.Services
|
||||
//检查验证码是否失效
|
||||
if (verificationRecord.ExpirationTime < DateTime.Now)
|
||||
{
|
||||
return ResponseOutput.NotOk("The verification code has expired");
|
||||
return ResponseOutput.NotOk("验证码已经过期。");
|
||||
|
||||
}
|
||||
else //验证码正确 并且 没有超时
|
||||
@@ -270,7 +270,7 @@ namespace IRaCIS.Application.Services
|
||||
if (!Regex.IsMatch(email, @"^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$"))
|
||||
{
|
||||
|
||||
return ResponseOutput.NotOk("Please input a legal email");
|
||||
return ResponseOutput.NotOk("请输入一个正确的邮箱。");
|
||||
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (!exist)
|
||||
{
|
||||
return ResponseOutput.NotOk("Email not correct");
|
||||
return ResponseOutput.NotOk("邮箱错误。");
|
||||
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ namespace IRaCIS.Application.Services
|
||||
if (verificationRecord == null)
|
||||
{
|
||||
|
||||
throw new BusinessValidationFailedException("Verification code error");
|
||||
throw new BusinessValidationFailedException("验证码错误。");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -319,7 +319,7 @@ namespace IRaCIS.Application.Services
|
||||
if (verificationRecord.ExpirationTime < DateTime.Now)
|
||||
{
|
||||
|
||||
throw new BusinessValidationFailedException("The verification code has expired");
|
||||
throw new BusinessValidationFailedException("验证码已经过期。");
|
||||
}
|
||||
else //验证码正确 并且 没有超时
|
||||
{
|
||||
@@ -455,7 +455,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _userRepository.AnyAsync(t => t.UserName == userAddModel.UserName || (t.EMail == userAddModel.EMail && t.UserTypeId == userAddModel.UserTypeId)))
|
||||
{
|
||||
return ResponseOutput.NotOk(" UserId or The mailbox for this user type already exists", new UserAddedReturnDTO());
|
||||
return ResponseOutput.NotOk(" 该用户类型中已存在具有相同用户名或者邮箱的用户。", new UserAddedReturnDTO());
|
||||
}
|
||||
|
||||
|
||||
@@ -523,7 +523,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _userTrialRepository.AnyAsync(t => t.Id == userId))
|
||||
{
|
||||
return ResponseOutput.NotOk("This user has participated in the trial and couldn't be deleted");
|
||||
return ResponseOutput.NotOk("该用户已经参加项目,不能够删除。");
|
||||
}
|
||||
|
||||
var success = await _userRepository.BatchDeleteNoTrackingAsync(t => t.Id == userId);
|
||||
@@ -573,7 +573,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (loginDoctor == null)
|
||||
{
|
||||
return ResponseOutput.NotOk("Please check the user name or password.", new LoginReturnDTO());
|
||||
return ResponseOutput.NotOk("请检查用户名或者密码。", new LoginReturnDTO());
|
||||
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (loginUser.Status == 0)
|
||||
{
|
||||
return ResponseOutput.NotOk("The user has been disabled!", new LoginReturnDTO());
|
||||
return ResponseOutput.NotOk("该用户已经被禁用。", new LoginReturnDTO());
|
||||
}
|
||||
|
||||
userLoginReturnModel.BasicInfo = loginUser;
|
||||
|
||||
Reference in New Issue
Block a user