显示中位价

This commit is contained in:
苏尹岚
2020-01-06 10:51:54 +08:00
parent df6a0b1a1c
commit a5ea3ebd3d

View File

@@ -261,13 +261,14 @@ func getGetStoresSkusBaseSQL(db *dao.DaoDB, storeIDs, skuIDs []int, isFocus bool
sql += `
JOIN store_sku_bind t4 ON t4.store_id = t3.id AND t4.sku_id = t2.id AND t4.deleted_at = ?
LEFT JOIN sku_name_place_bind t5 ON t1.id = t5.name_id AND t3.city_code = t5.place_code
LEFT JOIN price_refer_snapshot t6 ON t6.city_code = t3.city_code AND t6.name_id = t1.id
LEFT JOIN price_refer_snapshot t6 ON t6.city_code = t3.city_code AND t6.name_id = t1.id AND snapshot_at = ?
WHERE t1.deleted_at = ? AND (t1.is_global = 1 OR t5.id IS NOT NULL OR 1 = ?)/* AND t1.status = ?*/
`
sqlParams = append(sqlParams, []interface{}{
utils.DefaultTimeValue,
utils.DefaultTimeValue,
utils.Bool2Int(isFocus),
utils.Time2Date(time.Now().AddDate(0, 0, -1)),
// model.SkuStatusNormal,
})
if isFocus {