This commit is contained in:
邹宗楠
2023-02-28 17:47:13 +08:00
parent 5a9dcb1c61
commit 825ef64a8f
3 changed files with 25 additions and 9 deletions

View File

@@ -1820,9 +1820,14 @@ func GetOrderStoreIDs(db *DaoDB, beginAt, endAt time.Time, vendorID int) (storeI
return storeIDs, err
}
// 根据门店id获取正在刷单的门店商品
//func GetOrderListByStoreList(db *DaoDB, storeId []int64) (order []*model.GoodsOrder, err error) {
// sql := `
// S
//`
//}
// GetOrderListByStoreList 根据门店id获取正在刷单的门店商品
func GetOrderListByStoreList(db *DaoDB, storeId []int64) (order []*model.GoodsOrder, err error) {
sql := `SELECT * FROM goods_order g WHERE g.order_created_at >= ? AND g.order_created_at <= ? g.vendor_store_id IN (` + GenQuestionMarks(len(storeId)) + `)` + `AND g.vendor_id = ? AND g.status < ?`
sqlParam := []interface{}{time.Now().AddDate(0, 0, -7), time.Now(), storeId, model.VendorIDDD, model.OrderStatusDelivering}
if err := GetRows(db, &order, sql, sqlParam...); err != nil {
return nil, err
}
return order, nil
}