错误提示,门店评分修改
This commit is contained in:
@@ -1033,18 +1033,18 @@ func RefershStoreSkusMidPrice(db *DaoDB, storeIDs []int) (count int64, err error
|
||||
UPDATE store_sku_bind a
|
||||
JOIN store d ON d.id = a.store_id
|
||||
JOIN price_refer_snapshot b ON a.sku_id = b.sku_id AND b.snapshot_at = ? AND d.city_code = b.city_code
|
||||
SET a.price = b.mid_price*100
|
||||
SET a.price = (b.mid_price*IF(d.pay_percentage=0,100,d.pay_percentage))/100
|
||||
WHERE 1=1
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue,
|
||||
utils.Time2Date(time.Now().AddDate(0, 0, -1)),
|
||||
}
|
||||
if len(storeIDs) > 0 {
|
||||
sql += " AND a.store_id IN (" + GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, storeIDs)
|
||||
}
|
||||
sql += `
|
||||
AND a.price > b.mid_price*100
|
||||
AND (a.price/IF(d.pay_percentage=0,100,d.pay_percentage))*100 > b.mid_price
|
||||
AND a.deleted_at = ?
|
||||
AND a.status = ?
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user