diff --git a/app/ipad/svc/svc_order_make.go b/app/ipad/svc/svc_order_make.go index a52c52c..1cb479a 100644 --- a/app/ipad/svc/svc_order_make.go +++ b/app/ipad/svc/svc_order_make.go @@ -43,6 +43,11 @@ func NewOrderSortingEnd(c *gin.Context) { //修改制作记录 for _, v := range args.OrderInfo { record := db.GetOrderGoods(sess, v["oid"], args.Gid, args.SkuId) + if record.MakeDate > utils.StrToInt(time.Now().Format("20060102")) { + sess.Rollback() + e.OutErr(c, 400, e.NewErr(400, v["oid"]+",未到制作时间,请勿提交")) + return + } record.SuccessNum += utils.StrToInt(v["num"]) if record.SuccessNum >= record.Num { record.State = 4 @@ -111,6 +116,11 @@ func commNewMake(c *gin.Context, args map[string]string) { e.OutErr(c, 400, e.NewErr(400, "订单查找失败,请重试")) return } + if orderGoods.MakeDate > utils.StrToInt(time.Now().Format("20060102")) { + sess.Rollback() + e.OutErr(c, 400, e.NewErr(400, "该订单未到制作时间,请勿提交")) + return + } WaitMakeNum := orderGoods.WaitMakeNum if state == 2 { //制作完成 if utils.StrToInt(args["num"]) > orderGoods.WaitMakeNum {