推荐商品

This commit is contained in:
苏尹岚
2019-12-06 15:49:48 +08:00
parent c3e3be933c
commit 5d556203fe

View File

@@ -672,12 +672,11 @@ func GetTopSkusByStoreIDs(db *DaoDB, storeIDs []int) (skuAndName []*model.SkuAnd
AND a.order_created_at BETWEEN ? and NOW()
`
sqlParams := []interface{}{
utils.DefaultTimeValue,
utils.DefaultTimeValue,
time.Now().AddDate(0, -1, 0),
}
if len(storeIDs) > 0 {
sql += " AND a.store_id in(" + GenQuestionMarks(len(storeIDs)) + ")"
sql += " AND a.store_id IN(" + GenQuestionMarks(len(storeIDs)) + ")"
sqlParams = append(sqlParams, storeIDs)
}
sql += `