|
|
@@ -56,14 +56,14 @@ namespace BPA.SAAS.Manage.Application.Org.Services |
|
|
|
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>(); |
|
|
|
input.Code = GetNumber2(); |
|
|
|