From 50d26965d0252965260a299220a5e4ae4996dc69 Mon Sep 17 00:00:00 2001 From: zhaoy <137053305@qq.com> Date: Wed, 31 Jan 2024 10:07:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BPA.SAAS.Manage.Application/Org/Services/RoleService.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/BPA.SAAS.Manage.Application/Org/Services/RoleService.cs b/BPA.SAAS.Manage.Application/Org/Services/RoleService.cs index 6659b73..cd54b3a 100644 --- a/BPA.SAAS.Manage.Application/Org/Services/RoleService.cs +++ b/BPA.SAAS.Manage.Application/Org/Services/RoleService.cs @@ -64,12 +64,10 @@ namespace BPA.SAAS.Manage.Application.Org.Services throw Oops.Oh("已存在相同编码的角色"); } } - else - { - input.Code = GetNumber2(); - } + var role = input.Adapt(); - // role.DataScopeType = DataScopeType.ALL; + input.Code = GetNumber2(); + // role.DataScopeType = DataScopeType.ALL; return await _db.Insertable(role).CallEntityMethod(t => t.Create()).ExecuteCommandAsync() > 0; } ///