|
|
@@ -37,7 +37,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.System
|
|
37
|
37
|
[HttpPost("saverolefunction")]
|
|
38
|
38
|
public async Task<IActionResult> SaveRoleFunctionAsync(string[] ids, int role_id)
|
|
39
|
39
|
{
|
|
40
|
|
- if (ids == null)
|
|
|
40
|
+ if (ids.Length <= 0 || ids == null)
|
|
41
|
41
|
return Error("参数错误");
|
|
42
|
42
|
var list_model = new List<T_Sys_RoleFunction>();
|
|
43
|
43
|
|
|
|
@@ -54,8 +54,8 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.System
|
|
54
|
54
|
list_model.Add(model);
|
|
55
|
55
|
|
|
56
|
56
|
}
|
|
57
|
|
-
|
|
58
|
|
- if (await _sys_role_functionRepository.AddMany(list_model))
|
|
|
57
|
+ var res = await _sys_role_functionRepository.AddMany(list_model);
|
|
|
58
|
+ if (res)
|
|
59
|
59
|
{
|
|
60
|
60
|
return Success("权限设置成功!");
|
|
61
|
61
|
}
|