新增订单轮询
This commit is contained in:
parent
261ec08fb4
commit
779b6eb1c0
|
@ -32,7 +32,7 @@ func ClearUnpayOrder() {
|
||||||
session.Begin()
|
session.Begin()
|
||||||
_, err := session.In("id", ids).Update(&ordersmodel.Orders{State: 9})
|
_, err := session.In("id", ids).Update(&ordersmodel.Orders{State: 9})
|
||||||
if err == nil {
|
if err == nil {
|
||||||
_, err = session.Exec("update Products set stock=stock+1 where id in (" + strings.Join(prodIds, ",") + ")")
|
_, err = session.Exec("update products set stock=stock+1 where id in (" + strings.Join(prodIds, ",") + ")")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
session.Commit()
|
session.Commit()
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue