- fk
This commit is contained in:
@@ -309,13 +309,13 @@ func (p *PurchaseHandler) setStoreOrderSeq(order *model.GoodsOrder) {
|
|||||||
sql := `
|
sql := `
|
||||||
SELECT COUNT(*) ct
|
SELECT COUNT(*) ct
|
||||||
FROM goods_order t1
|
FROM goods_order t1
|
||||||
WHERE t1.store_id = ? AND t1.order_created_at >= ?
|
WHERE t1.store_id = ? AND t1.order_created_at >= ? AND t1.vendor_id = ?
|
||||||
`
|
`
|
||||||
var count int
|
var count int
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
if err := dao.GetRow(db, &count, sql, order.StoreID, dateBegin); err == nil {
|
if err := dao.GetRow(db, &count, sql, order.StoreID, dateBegin, model.VendorIDWSC); err == nil {
|
||||||
order.OrderSeq = count + 1
|
order.OrderSeq = count + 1
|
||||||
globals.SugarLogger.Errorf("setStoreOrderSeq orderID:%s, orderSeq:%d", order.VendorOrderID, order.OrderSeq)
|
globals.SugarLogger.Debugf("setStoreOrderSeq orderID:%s, dateBegin:%s, orderSeq:%d", order.VendorOrderID, utils.Time2Str(dateBegin), order.OrderSeq)
|
||||||
} else {
|
} else {
|
||||||
globals.SugarLogger.Errorf("setStoreOrderSeq orderID:%s failed with error:%v", order.VendorOrderID, err)
|
globals.SugarLogger.Errorf("setStoreOrderSeq orderID:%s failed with error:%v", order.VendorOrderID, err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user