From 19ef35aa3eb4b53ade8c58a4ede531e4cfc86425 Mon Sep 17 00:00:00 2001 From: chear Date: Tue, 5 Jul 2022 03:04:17 +0000 Subject: [PATCH] =?UTF-8?q?update=20backend/Magic.Core/Service/Emp/SysEmpS?= =?UTF-8?q?ervice.cs.=20AddOrUpdate=EF=BC=9A=E9=9C=80=E8=A6=81=E5=85=88?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=94=A8=E6=88=B7=E8=81=8C=E4=BD=8D=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=EF=BC=8C=E7=84=B6=E5=90=8E=E5=88=A0=E9=99=A4=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/Magic.Core/Service/Emp/SysEmpService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/Magic.Core/Service/Emp/SysEmpService.cs b/backend/Magic.Core/Service/Emp/SysEmpService.cs index 373da2c..ca40ef4 100644 --- a/backend/Magic.Core/Service/Emp/SysEmpService.cs +++ b/backend/Magic.Core/Service/Emp/SysEmpService.cs @@ -1,4 +1,4 @@ - + using Furion.DependencyInjection; using Magic.Core.Entity; @@ -79,6 +79,10 @@ public class SysEmpService : ISysEmpService, ITransient try { _sysEmpRep.Ado.BeginTran(); + + // 先删除用户职位 + await _sysEmpPosService.DeleteEmpPosInfoByUserId(long.Parse(sysEmpParam.Id)); + // 先删除员工信息 await _sysEmpRep.DeleteAsync(u => u.Id == long.Parse(sysEmpParam.Id)); -- Gitee