【优化】获取用户推荐列表中下级用户的二级总数调整为同步获取,防止极个别环境下出现循环内异步响应失效而导致404的问题。

This commit is contained in:
jianweie code
2023-12-29 19:43:11 +08:00
parent f020072bce
commit d722161e65

View File

@@ -2082,13 +2082,13 @@ namespace CoreCms.Net.Web.WebApi.Controllers
var data = await _userServices.QueryPageAsync(where, p => p.createTime, OrderByType.Desc, entity.page, entity.limit);
jm.status = true;
jm.data = data.Select(async p => new
jm.data = data.Select(p => new
{
p.nickName,
p.avatarImage,
mobile = UserHelper.FormatMobile(p.mobile),
p.createTime,
childNum = await _userServices.GetCountAsync(p => p.parentId == p.id)
childNum = _userServices.GetCount(p => p.parentId == p.id)
});
jm.otherData = new
{