Browse Source

Merge branch 'master' into kitchenmanage

tmp
zhaoy 7 months ago
parent
commit
93de85a900
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      BPA.SAAS.Manage.Application/Org/Services/RoleService.cs

+ 8
- 8
BPA.SAAS.Manage.Application/Org/Services/RoleService.cs View File

@@ -56,14 +56,14 @@ namespace BPA.SAAS.Manage.Application.Org.Services
public async Task<bool> Add(RoleDtoInput input) public async Task<bool> Add(RoleDtoInput input)
{ {


if (input.Code != "sys_manager_role")
{
var resEntitites = _db.Queryable<BPA_Roles>().Where(a => a.Code == input.Code).ToList();
if (resEntitites.Count() > 0)
{
throw Oops.Oh("已存在相同编码的角色");
}
}
//if (input.Code != "sys_manager_role")
//{
// var resEntitites = _db.Queryable<BPA_Roles>().Where(a => a.Code == input.Code).ToList();
// if (resEntitites.Count() > 0)
// {
// throw Oops.Oh("已存在相同编码的角色");
// }
//}
var role = input.Adapt<BPA_Roles>(); var role = input.Adapt<BPA_Roles>();
input.Code = GetNumber2(); input.Code = GetNumber2();


Loading…
Cancel
Save