|
|
@@ -51,6 +51,11 @@ func NewOrderSortingEnd(c *gin.Context) { |
|
|
|
e.OutErr(c, 400, e.NewErr(400, v["oid"]+",未到制作时间,请勿提交")) |
|
|
|
return |
|
|
|
} |
|
|
|
if utils.StrToInt(v["num"]) > record.Num-record.SuccessNum { |
|
|
|
sess.Rollback() |
|
|
|
e.OutErr(c, 400, e.NewErr(400, record.GoodsTitle+",数量只能提交"+utils.IntToStr(record.Num-record.SuccessNum)+"个")) |
|
|
|
return |
|
|
|
} |
|
|
|
record.SuccessNum += utils.StrToInt(v["num"]) |
|
|
|
if record.SuccessNum >= record.Num { |
|
|
|
record.State = 4 |
|
|
|