public ResultPager <VueUserPointTrans> getPointTrans(QUserTrans query) { ResultPager <VueUserPointTrans> result = new ResultPager <VueUserPointTrans>(); try { query.userId = this.getUserId(); result.PageData = _userFinanceServices.getPointTrans(query); } catch (CCException cex) { result.ErrorMsg = cex.Message; } catch (Exception ex) { result.ErrorMsg += "[积分明细查询失败]"; NLogUtil.cc_ErrorTxt("[UserFinanceController]getPointTrans:" + ex.Message); } return(result); }
public async Task <ModelPager <VueUserPointTrans> > getPointTrans(QUserTrans query) { ModelPager <VueUserPointTrans> result = new ModelPager <VueUserPointTrans>(query.pageIndex, query.pageSize); var mainSql = Db.Queryable <EUserPointsTrans>() .Where(a => a.userId == query.userId && a.createdDateTime.Date >= query.startDate.Date && a.createdDateTime.Date <= query.endDate.Date) .OrderBy(a => a.createdDateTime, OrderByType.Desc) .Select(a => new VueUserPointTrans { dbDateTime = a.createdDateTime, changeType = a.changeType, point = a.point }); RefAsync <int> totalNumber = new RefAsync <int>(); result.datas = await mainSql.ToPageListAsync(query.pageIndex, query.pageSize, totalNumber); result.totalCount = totalNumber; return(result); }
public ModelPager<VueUserPointTrans> getPointTrans(QUserTrans query) { if (string.IsNullOrEmpty(query.userId)) throw new CCException("积分明细-非法进入"); return _userFinanceRepository.getPointTrans(query).Result; }