刷新调价包

This commit is contained in:
苏尹岚
2019-12-11 10:49:29 +08:00
parent 90edf2a581
commit 3cac9bfa32
4 changed files with 107 additions and 55 deletions

View File

@@ -895,13 +895,15 @@ func UpdateStoreSkuBindSyncStatus(db *DaoDB, vendorIDs []int, storeID int) (num
func GetStoreSkusByNameIDs(db *DaoDB, storeIDs []int, nameID int) (skuList []*StoreSkuSyncInfo, err error) {
sql := `
SELECT a.*,c.unit,c.name
FROM store_sku_bind a
FROM store_sku_bind a
JOIN sku b ON a.sku_id = b.id
JOIN sku_name c ON b.name_id = c.id
WHERE b.name_id = ?
AND a.deleted_at = ?
`
sqlParams := []interface{}{
nameID,
utils.DefaultTimeValue,
}
if len(storeIDs) > 0 {
sql += " AND a.store_id in (" + GenQuestionMarks(len(storeIDs)) + ")"
@@ -1061,7 +1063,7 @@ func GetStoreSkuNamePrice(db *DaoDB) (storeSkuNamePriceList []*model.StoreSkuNam
}
err = GetRows(db, &storeSkuNamePriceList, sql, sqlParams...)
if err != nil {
return nil,err
return nil, err
}
return storeSkuNamePriceList, err
}