| | |
| | | using CoreCms.Net.Configuration; |
| | | using Newtonsoft.Json; |
| | | using CoreCms.Net.DTO; |
| | | using static SKIT.FlurlHttpClient.Wechat.Api.Models.CgibinExpressDeliveryOpenMessageGetDeliveryListResponse.Types; |
| | | |
| | | namespace CoreCms.Net.Services.baifenbingfa |
| | | { |
| | |
| | | //必须是有效状态 |
| | | //where= where.And(x => x.order.status == (int)GlobalEnumVars.OrderStatus.Normal); |
| | | RefAsync<int> totl = 0; |
| | | var list= await _unitOfWork.GetDbClient().Queryable<CoreCmsBillDelivery>().Includes(x => x.order, order => order.Orderitems, ite => ite.productInfo) |
| | | var list = await _unitOfWork.GetDbClient().Queryable<CoreCmsBillDelivery>().Includes(x => x.order, order => order.Orderitems, ite => ite.productInfo).Select(x => new CoreCmsBillDelivery |
| | | { |
| | | sendDistributionAccept = x.sendDistributionAccept == sendDistributionAcceptType.NoAccted ? |
| | | //用户没有同意但是订单已经取消了 需要赋值 取消状态 |
| | | (x.order.status== (int)GlobalEnumVars.OrderStatus.Normal ? sendDistributionAcceptType.NoAccted: sendDistributionAcceptType.Cancelled ): |
| | | ( |
| | | x.sendDistributionAccept== sendDistributionAcceptType.Accepted? |
| | | //用户已经同意了 |
| | | (x.order.confirmStatus == (int)GlobalEnumVars.OrderConfirmStatus.ConfirmReceipt? sendDistributionAcceptType.Delivered: sendDistributionAcceptType.Accepted) |
| | | : x.order.status==(int )GlobalEnumVars.OrderStatus.Cancel? sendDistributionAcceptType.Cancelled: x.sendDistributionAccept |
| | | ), |
| | | order=x.order, |
| | | },true).MergeTable() |
| | | .Where(where).OrderByDescending(x => x.createTime) |
| | | .ToPageListAsync(Param.page, Param.limit, totl); |
| | | var listdata= new PageList<CoreCmsBillDelivery>(list, Param.page, Param.limit, totl); |