| | |
| | | { |
| | | _userManager = userManager; |
| | | } |
| | | public List<OperationDto> GetLogOperationCrList(string menuName, string type, string msg, string startTime, string endTime, int page, int limit, out int count) |
| | | public async Task<List<OperationDto>> GetLogOperationCrList(string menuName, string type, string msg, string startTime, string endTime, int page, int limit, RefAsync<int> count) |
| | | { |
| | | try |
| | | { |
| | |
| | | .AndIF(!string.IsNullOrWhiteSpace(startTime), it => it.CreateTime >= Convert.ToDateTime(startTime)) |
| | | .AndIF(!string.IsNullOrWhiteSpace(endTime), it => it.CreateTime <= Convert.ToDateTime(endTime).AddDays(1)) |
| | | .ToExpression();//注意 这一句 不能少 |
| | | var total = 0; |
| | | var list = GetAllWhereAsync(item) |
| | | var list = await GetAllWhereAsync(item) |
| | | .LeftJoin<SysDictionary>((it, dic) => it.Type == dic.Id.ToString()) |
| | | .LeftJoin<SysUserInfor>((it, dic, users) => it.CreateUser == users.Id) |
| | | .Select((it, dic, users) => new OperationDto() |
| | |
| | | CreateUserName = users.RealName, |
| | | }) |
| | | .OrderByDescending(it => it.CreateTime) |
| | | .ToOffsetPage(page, limit, ref total); |
| | | |
| | | count = total; |
| | | return list.OrderByDescending(m => m.CreateTime).ToList(); |
| | | .ToPageListAsync(page, limit, count); |
| | | return list; |
| | | } |
| | | catch (Exception e) |
| | | { |