显示中位价

This commit is contained in:
苏尹岚
2020-01-06 11:27:01 +08:00
parent 6f0a3bc971
commit 71ba2e13db
2 changed files with 4 additions and 4 deletions

View File

@@ -114,6 +114,7 @@ type tGetStoresSkusInfo struct {
model.SkuName
PayPercentage int `json:"-"`
dao.StoreSkuExt
RealMidUnitPrice int `json:"realMidUnitPrice"` //真实的该商品的全国中位价
}
type SheetParam struct {
@@ -261,7 +262,7 @@ 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 AND t6.snapshot_at = ?
JOIN price_refer_snapshot t6 ON t6.city_code = t3.city_code AND t6.sku_id = t2.id AND t6.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{}{