333
This commit is contained in:
parent
60f0e2e1eb
commit
eed11e9e64
|
|
@ -238,7 +238,7 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
public IActionResult GetRegion([FromQuery] int deptId)
|
||||
{
|
||||
var list = sysDeptService.AsQueryable().Where(it => it.ParentId == deptId).Select(it => new { it.DeptId, it.DeptName }).ToList();
|
||||
if (list == null)
|
||||
if (list == null || list.Count == 0)
|
||||
{
|
||||
list = sysDeptService.AsQueryable().Where(it => it.DeptId == deptId).Select(it => new { it.DeptId, it.DeptName }).ToList();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user