日常bug

This commit is contained in:
苏尹岚
2020-02-13 18:21:59 +08:00
parent 721c0eda3d
commit ba0b726871
3 changed files with 19 additions and 14 deletions

View File

@@ -627,12 +627,12 @@ func GetStorePriceScoreSnapshot(db *DaoDB, snapDate time.Time) (storePriceScoreS
sql := `
SELECT c.store_id,ROUND(count(c.unit_price * IF(d.pay_percentage < 50 , 70, d.pay_percentage) / 100 <= a.mid_unit_price or NULL)/count(*)*100,2) score
FROM price_refer_snapshot a
JOIN store_sku_bind c ON c.sku_id = a.sku_id AND c.status = ? AND c.deleted_at = ?
JOIN store_sku_bind c ON c.sku_id = a.sku_id AND c.deleted_at = ?
JOIN store d ON c.store_id = d.id AND d.city_code = a.city_code AND d.deleted_at = ? AND d.status != ?
WHERE 1=1
`
sqlParams := []interface{}{
model.StoreSkuBindStatusNormal, utils.DefaultTimeValue,
utils.DefaultTimeValue,
utils.DefaultTimeValue, model.StoreStatusDisabled,
}
if !utils.IsTimeZero(snapDate) {