fix 处理描述
This commit is contained in:
@@ -40,13 +40,11 @@ public class CanteenSettingService : ICanteenSettingService
|
|||||||
})
|
})
|
||||||
.ToPageListAsync(request);
|
.ToPageListAsync(request);
|
||||||
|
|
||||||
var userNos = page.Data.Select(x => x.UniqueValue).Distinct().ToList();
|
var userNos = page.Data.Where(x => x.UniqueType == CanteenSettingUnqiueEnumType.Person).Select(x => x.UniqueValue).Distinct().ToList();
|
||||||
|
|
||||||
var gainfos = await _context.Queryable<GainfoEntity>().Where(x => userNos.Contains(x.No)).ToListAsync();
|
var gainfos = await _context.Queryable<GainfoEntity>().Where(x => userNos.Contains(x.No)).ToListAsync();
|
||||||
|
|
||||||
page.Data.ForEach(x =>
|
page.Data.ForEach(x =>
|
||||||
{
|
{
|
||||||
x.UniqueValue = gainfos.FirstOrDefault(item => item.No == x.UniqueValue)?.Name;
|
x.UniqueValueDesc = gainfos.FirstOrDefault(item => item.No == x.UniqueValue)?.Name;
|
||||||
});
|
});
|
||||||
|
|
||||||
return page;
|
return page;
|
||||||
|
|||||||
Reference in New Issue
Block a user