From 536d80718ec7e394a2ace992f5e01ba771f8a433 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Wed, 25 May 2022 18:17:33 +0800
Subject: [PATCH] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E6=9C=8D=E5=8A=A1=E6=B3=A8?=
=?UTF-8?q?=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Application/Service/Common/MailService.cs | 3 +++
IRaCIS.Core.Application/Service/Management/UserService.cs | 1 +
2 files changed, 4 insertions(+)
diff --git a/IRaCIS.Core.Application/Service/Common/MailService.cs b/IRaCIS.Core.Application/Service/Common/MailService.cs
index 47fabd557..d8f6f406f 100644
--- a/IRaCIS.Core.Application/Service/Common/MailService.cs
+++ b/IRaCIS.Core.Application/Service/Common/MailService.cs
@@ -47,6 +47,9 @@ namespace IRaCIS.Application.Services
_hostEnvironment = hostEnvironment;
+ _mapper = mapper;
+
+ _tokenService = tokenService;
_userRepository = userRepository;
}
diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs
index c12c4209b..e5330d0f0 100644
--- a/IRaCIS.Core.Application/Service/Management/UserService.cs
+++ b/IRaCIS.Core.Application/Service/Management/UserService.cs
@@ -454,6 +454,7 @@ namespace IRaCIS.Application.Services
///
///
///
+ [UnitOfWork]
public async Task> AddUser(UserCommand userAddModel)
{
if (await _userRepository.AnyAsync(t => t.UserName == userAddModel.UserName || (t.EMail == userAddModel.EMail && t.UserTypeId == userAddModel.UserTypeId)))