Commit 02a723b7 authored by 吴春's avatar 吴春

提交代码

parent bf2cd2f9
......@@ -2676,5 +2676,95 @@ namespace Mall.WebApi.Controllers.MallBase
}
#endregion
#region 微店
/// <summary>
/// 分销订单后台分页列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetOldSmallShopOrdersPageList()
{
var parms = RequestParm;
ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(parms.msg.ToString());
JObject parameters = JObject.Parse(parms.msg.ToString());
RB_Goods_Order_Extend demodel = new RB_Goods_Order_Extend()
{
OrderSource = (UserSourceEnum)parameters.GetInt("OrderSource"),
OrderType = parameters.GetInt("OrderType"),
DeliveryMethod = (OrderDeliveryMethodEnum)parameters.GetInt("DeliveryMethod"),
OrderId = parameters.GetInt("OrderId"),
StartTime = parameters.GetStringValue("StartTime"),
EndTime = parameters.GetStringValue("EndTime"),
OrderStatus = (OrderStatusEnum)parameters.GetInt("OrderStatus"),
OrderNo = parameters.GetStringValue("OrderNo"),
UserName = parameters.GetStringValue("UserName"),
UserId = parameters.GetInt("UserId"),
GoodsName = parameters.GetStringValue("GoodsName"),
DistributionUserId = parameters.GetInt("DistributionUserId")
};
demodel.TenantId = parms.TenantId;
demodel.MallBaseId = parms.MallBaseId;
demodel.Recycled = 2;
var list = orderModule.GetSmallShopOrdersPageList(pagelist.pageIndex, pagelist.pageSize, out long count, demodel);
pagelist.count = Convert.ToInt32(count);
pagelist.pageData = list.Select(x => new
{
x.OrderId,
x.OrderNo,
x.MerchantsNo,
x.OrderSource,
OrderSourceName = x.OrderSource.GetEnumName(),
x.UserId,
x.UserName,
x.DeliveryMethod,
DeliveryMethodName = x.DeliveryMethod.GetEnumName(),
x.Income,
x.FreightMoney,
x.CouponMoney,
x.PaymentWay,
PaymentWayName = x.PaymentWay.GetEnumName(),
DetailList = x.DetailList.Select(y => new
{
y.Id,
y.CoverImage,
y.CoverImagePath,
y.OrderType,
OrderTypeName = y.OrderType.GetEnumName(),
y.GoodsName,
SpecificationList = JsonConvert.DeserializeObject<List<string>>(y.Specification),
y.ProductCode,
y.Final_Price,
y.Number
}),
x.Consignee,
x.Mobile,
x.ShoppingAddress,
x.BuyerMessage,
x.Remark,
x.OrderStatus,
OrderStatusName = x.OrderStatus.GetEnumName(),
PaymentTime = x.PaymentTime.HasValue ? x.PaymentTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
DeliveryTime = x.DeliveryTime.HasValue ? x.DeliveryTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
ReceivingTime = x.ReceivingTime.HasValue ? x.ReceivingTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
x.IsOrderCommission,
OrderCommissionList = x.SmallShopsCommissionOrderList.Select(z => new
{
z.Id,
z.UserId,
z.UserName,
z.Mobile,
z.Name,
z.Commission,
z.CommissionState
}),
x.TenantId,
x.MallBaseId,
CreateDate = x.CreateDate.HasValue ? x.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""
});
return ApiResult.Success("", pagelist);
}
#endregion
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment