This commit is contained in:
gazebo
2018-09-20 17:02:25 +08:00
parent 1fa6540f19
commit d8eb17f6be
9 changed files with 176 additions and 104 deletions

View File

@@ -22,7 +22,7 @@ func (p *PurchaseHandler) SyncStoreSku(storeID int, skuIDs []int, isForce bool,
FROM store_sku_bind
WHERE store_id = ?
`
if skuIDs != nil {
if skuIDs != nil && len(skuIDs) > 0 {
sql += " AND sku_id IN (" + dao.GenQuestionMarks(len(skuIDs)) + ")"
sqlParams = append(sqlParams, skuIDs)
}
@@ -84,7 +84,7 @@ func (p *PurchaseHandler) SyncStoreSku(storeID int, skuIDs []int, isForce bool,
SET jd_sync_status = 0
WHERE store_id = ?
`
if skuIDs != nil {
if skuIDs != nil && len(skuIDs) > 0 {
sql += " AND sku_id IN (" + dao.GenQuestionMarks(len(skuIDs)) + ")"
}
_, err = dao.ExecuteSQL(db, sql, sqlParams)