Commit 4842128b authored by 黄奎's avatar 黄奎

代码优化

parent 7c071532
...@@ -2685,7 +2685,7 @@ namespace Mall.Module.Product ...@@ -2685,7 +2685,7 @@ namespace Mall.Module.Product
coupon = new coupon = new
{ {
enabled = true, enabled = true,
use = CouponsMoney > 0 && demodel.User_Coupon_Id > 0 ? true : false, use = CouponsMoney > 0 && demodel.User_Coupon_Id > 0,
coupon_discount = CouponsMoney, coupon_discount = CouponsMoney,
user_coupon_id = CouponsMoney > 0 ? demodel.User_Coupon_Id ?? 0 : 0 user_coupon_id = CouponsMoney > 0 ? demodel.User_Coupon_Id ?? 0 : 0
}, },
...@@ -14038,16 +14038,13 @@ namespace Mall.Module.Product ...@@ -14038,16 +14038,13 @@ namespace Mall.Module.Product
{ {
var omodel = new RB_Goods_Order(); var omodel = new RB_Goods_Order();
int OrderId = 0; int OrderId = 0;
var dmodel = new RB_Goods_OrderDetail(); RB_Goods_OrderDetail dmodel;
if (demodel.OrderDetailId > 0) if (demodel.OrderDetailId > 0)
{ {
dmodel = goods_OrderDetailRepository.GetEntity(demodel.OrderDetailId); dmodel = goods_OrderDetailRepository.GetEntity(demodel.OrderDetailId);
if (dmodel == null) { return false; } if (dmodel == null) { return false; }
OrderId = dmodel.OrderId ?? 0; OrderId = dmodel.OrderId ?? 0;
if (dmodel.IsComment == 1) { return false; } if (dmodel.IsComment == 1) { return false; }
//omodel = goods_OrderRepository.GetEntity(OrderId);
//if (omodel == null) { return false; }
//if (omodel.OrderStatus != OrderStatusEnum.Received) { return false; }
} }
bool flag = goods_CommentRepository.Insert(demodel) > 0; bool flag = goods_CommentRepository.Insert(demodel) > 0;
if (flag) if (flag)
...@@ -14959,7 +14956,7 @@ namespace Mall.Module.Product ...@@ -14959,7 +14956,7 @@ namespace Mall.Module.Product
{ {
item.OrderId = OrderId; item.OrderId = OrderId;
//插入订单明细表 //插入订单明细表
int detailId = goods_OrderDetailRepository.Insert(item, trans); goods_OrderDetailRepository.Insert(item, trans);
} }
//记录日志 //记录日志
goods_LogRepository.Insert(new RB_Goods_Log() goods_LogRepository.Insert(new RB_Goods_Log()
......
...@@ -238,7 +238,7 @@ namespace Mall.WebApi.Controllers.Education ...@@ -238,7 +238,7 @@ namespace Mall.WebApi.Controllers.Education
query.TenantId = userInfo.TenantId; query.TenantId = userInfo.TenantId;
query.MallBaseId = userInfo.MallBaseId; query.MallBaseId = userInfo.MallBaseId;
query.UserId = userInfo.UserId; query.UserId = userInfo.UserId;
RB_Education_Coupon_Extend resultModel = new RB_Education_Coupon_Extend(); RB_Education_Coupon_Extend resultModel;
if (query.TriggerType == 2) if (query.TriggerType == 2)
{ {
query.TriggerType = 4; query.TriggerType = 4;
......
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