Exemple #1
0
        public async Task <IActionResult> PageLogData(LogParameters parameters)
        {
            var data = await _sysLogService.GetAllLogsAsync(parameters);

            var res = _mapper.Map <IEnumerable <SysLogViewModel> >(data);
            var shapedLogResources = res.ToDynamicIEnumerable(parameters.Fields);

            var jsonRes = new
            {
                code    = 0,
                message = "",
                count   = data.TotalItemsCount,
                data    = shapedLogResources
            };

            LogInformation("查询日志信息列表");
            return(Json(jsonRes));
        }