/// <summary> /// 获取列表数据 /// </summary> /// <param name="model"></param> /// <returns></returns> public async Task <ApiResultList <PbCodeMaterialDO> > GetAllSync(PbCodeMaterialDTO model) { var expression = model.GetExpression(); var orders = model.GetOrder(); var entities = await _pbCodeMaterialRepository.GetAllAsync(expression, isMaster : false, orderByFields : orders); return(ApiResultUtil.IsSuccess <PbCodeMaterialDO>(entities?.ToList())); }
/// <summary> /// 获取列表数据 /// </summary> /// <param name="model"></param> /// <returns></returns> public Task <ApiResultList <PbCodeMaterialDO> > GetAllSync(PbCodeMaterialDTO model) { if (this.State.Balance.Any(mbox => model.Ids.Contains(mbox.PCM_ID))) { return(Task.FromResult(ApiResultUtil.IsSuccess <PbCodeMaterialDO>(this.State.Balance.Where(mbox => model.Ids.Contains(mbox.PCM_ID))?.ToList()))); } return(Task.FromResult(ApiResultUtil.IsFailedList <PbCodeMaterialDO>("无数据!"))); }