浏览代码

1.下单规则更新

master
huangjiajun 6 个月前
父节点
当前提交
f8064c392c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      app/admin/svc/order/svc_order_list.go

+ 2
- 2
app/admin/svc/order/svc_order_list.go 查看文件

@@ -713,7 +713,7 @@ func OrderEditNum(c *gin.Context) {
order.Amount = utils.Float64ToStr(utils.StrToFloat64(order.Amount) + utils.StrToFloat64(args["num"])*utils.StrToFloat64(orderGoodsSku.Price))
}
orderGoodsSku.DeductMemo = args["memo"]
_, err = sess.Where("id=?", orderGoodsSku.Id).Cols("num,memo,old_num,price").Update(orderGoodsSku)
_, err = sess.Where("id=?", orderGoodsSku.Id).Cols("num,memo,deduct_memo,old_num,price").Update(orderGoodsSku)
if err != nil {
sess.Rollback()
e.OutErr(c, 400, e.NewErr(400, "修改失败"))
@@ -786,7 +786,7 @@ func OrderEditNum(c *gin.Context) {
orderGoods.OldNum = orderGoods.Num
orderGoods.Num = utils.StrToInt(args["num"])
orderGoods.DeductMemo = args["memo"]
_, err = sess.Where("id=?", orderGoods.Id).Cols("num,sku_code,sku_id,sku,memo,old_num,price").Update(orderGoods)
_, err = sess.Where("id=?", orderGoods.Id).Cols("num,sku_code,sku_id,sku,memo,deduct_memo,old_num,price").Update(orderGoods)
if err != nil {
sess.Rollback()
e.OutErr(c, 400, e.NewErr(400, "修改失败"))


正在加载...
取消
保存