This commit is contained in:
苏尹岚
2021-03-25 17:25:17 +08:00
parent f2b8089536
commit 8f0e1ecb2f

View File

@@ -303,6 +303,7 @@ func GetStoresSkusForStore(ctx *jxcontext.Context, storeID int, isFocus, isAct b
}
sql += `
LEFT JOIN sku_category d ON d.id = a.category_id AND d.deleted_at = ?
LEFT JOIN sku_name_place_bind f ON a.id = f.name_id AND e.city_code = f.place_code
`
sqlParams = append(sqlParams, utils.DefaultTimeValue)
if categoryID != 0 {
@@ -339,7 +340,9 @@ func GetStoresSkusForStore(ctx *jxcontext.Context, storeID int, isFocus, isAct b
)
}
sql += `
WHERE a.deleted_at = ? AND a.status = ?
WHERE a.deleted_at = ?
AND a.status = ?
AND (a.is_global = 1 OR f.id IS NOT NULL)
`
sqlParams = append(sqlParams,
utils.DefaultTimeValue, model.SkuStatusNormal,