|
@@ -1,6 +1,7 @@ |
|
|
package svc |
|
|
package svc |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
|
|
|
"applet/app/admin/svc/order" |
|
|
"applet/app/db" |
|
|
"applet/app/db" |
|
|
"applet/app/db/model" |
|
|
"applet/app/db/model" |
|
|
"applet/app/e" |
|
|
"applet/app/e" |
|
@@ -41,7 +42,9 @@ func NewOrderSortingEnd(c *gin.Context) { |
|
|
defer sess.Close() |
|
|
defer sess.Close() |
|
|
sess.Begin() |
|
|
sess.Begin() |
|
|
//修改制作记录 |
|
|
//修改制作记录 |
|
|
|
|
|
oids := make([]string, 0) |
|
|
for _, v := range args.OrderInfo { |
|
|
for _, v := range args.OrderInfo { |
|
|
|
|
|
oids = append(oids, v["oid"]) |
|
|
record := db.GetOrderGoods(sess, v["oid"], args.Gid, args.SkuId) |
|
|
record := db.GetOrderGoods(sess, v["oid"], args.Gid, args.SkuId) |
|
|
if record.MakeDate > utils.StrToInt(time.Now().Format("20060102")) { |
|
|
if record.MakeDate > utils.StrToInt(time.Now().Format("20060102")) { |
|
|
sess.Rollback() |
|
|
sess.Rollback() |
|
@@ -98,8 +101,15 @@ func NewOrderSortingEnd(c *gin.Context) { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
sess.Commit() |
|
|
sess.Commit() |
|
|
|
|
|
if len(oids) > 0 { |
|
|
|
|
|
ord := db.GetOrderByIds(eg, oids) |
|
|
|
|
|
if ord != nil { |
|
|
|
|
|
for _, v := range *ord { |
|
|
|
|
|
order.JudgePackageOrdOrdState(&v) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
e.OutSuc(c, "success", nil) |
|
|
e.OutSuc(c, "success", nil) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|