Commit fedbd32b authored by liudong1993's avatar liudong1993

课程下单

parent 0dfbe62a
...@@ -309,12 +309,16 @@ namespace Mall.Model.Entity.Product ...@@ -309,12 +309,16 @@ namespace Mall.Model.Entity.Product
/// </summary> /// </summary>
public int? SmallShopsId { get; set; } public int? SmallShopsId { get; set; }
/// <summary> /// <summary>
/// 订单分类 0正常订单 1司导订单 /// 订单分类 0正常订单 1司导订单 2教育订单
/// </summary> /// </summary>
public int OrderClassify { get; set; } public int OrderClassify { get; set; }
/// <summary> /// <summary>
/// 目的地(司导订单) /// 目的地(司导订单)
/// </summary> /// </summary>
public string DestinationAddress { get; set; } public string DestinationAddress { get; set; }
/// <summary>
/// 课程卡抵扣金额
/// </summary>
public decimal? EducationMoney { get; set; }
} }
} }
...@@ -345,5 +345,9 @@ namespace Mall.Model.Entity.Product ...@@ -345,5 +345,9 @@ namespace Mall.Model.Entity.Product
/// 评论返积分 /// 评论返积分
/// </summary> /// </summary>
public int CommentGiveIntegral { get; set; } public int CommentGiveIntegral { get; set; }
/// <summary>
/// 使用课程卡id
/// </summary>
public int? EducationCouponId { get; set; }
} }
} }
This diff is collapsed.
...@@ -456,7 +456,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -456,7 +456,7 @@ namespace Mall.WebApi.Controllers.MallBase
} }
/// <summary> /// <summary>
/// 下单 /// 商城下单
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
...@@ -545,6 +545,72 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -545,6 +545,72 @@ namespace Mall.WebApi.Controllers.MallBase
return orderModule.SetAppletGoodsOrderInfo(demodel); return orderModule.SetAppletGoodsOrderInfo(demodel);
} }
/// <summary>
/// 教育下单
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetAppletCourseOrderInfo()
{
var req = RequestParm;
var userInfo = AppletUserInfo;
RB_Goods_Order_Extend demodel = JsonConvert.DeserializeObject<RB_Goods_Order_Extend>(req.msg.ToString());
if (demodel.IsFormShoppingCart == 1)
{
if (demodel.ShoppingCartIdList == null || !demodel.ShoppingCartIdList.Any())
{
return ApiResult.ParamIsNull("请传递购物车id");
}
}
if (demodel.DetailList == null || !demodel.DetailList.Any())
{
return ApiResult.ParamIsNull("请传递商品信息");
}
foreach (var item in demodel.DetailList)
{
if ((item.GoodsId ?? 0) <= 0)
{
return ApiResult.ParamIsNull("请传递商品id");
}
if ((item.Number ?? 0) <= 0)
{
return ApiResult.ParamIsNull("请传递商品数量");
}
}
if ((demodel.Income ?? 0) <= 0)
{
return ApiResult.ParamIsNull("订单金额不正确");
}
demodel.BuyerMessage ??= "";//买家留言
demodel.OrderSource ??= UserSourceEnum.WeiXin;
#region 赋默认值
demodel.TenantId = userInfo.TenantId;
demodel.MallBaseId = userInfo.MallBaseId;
demodel.Country ??= 2;
demodel.OrderStatus = Common.Enum.Goods.OrderStatusEnum.NonPayment;
demodel.CreateDate = DateTime.Now;
demodel.Fee ??= 0;
demodel.FreightMoney ??= 0;
demodel.HistoryOrderStatus ??= 0;
demodel.IsApplyForCancel ??= 2;
demodel.IsOrderCommission ??= 2;
demodel.MerchantsNo ??= "";
demodel.Recycled ??= 2;
demodel.Refund ??= 0;
demodel.Status = 0;
demodel.AnchorName ??= "";
demodel.UpdateDate = DateTime.Now;
demodel.UserId = userInfo.UserId;
demodel.SmallShopsId = req.SmallShopsId;
demodel.OrderClassify = 2;
#endregion
return orderModule.SetAppletCourseOrderInfo(demodel);
}
/// <summary> /// <summary>
/// 司导下单 /// 司导下单
/// </summary> /// </summary>
......
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