This commit is contained in:
gazebo
2018-11-14 10:22:49 +08:00
parent b370e4d158
commit 0e6c0d4a52

View File

@@ -584,7 +584,7 @@ func GetJdPromotions(ctx *jxcontext.Context, keyword string, params map[string]i
sqlParams = append(sqlParams, params["skuID"].(int))
}
if params["cityCode"] != nil {
sql += " AND (SELECT COUNT(*) FROM promotion_store tt1 JOIN store st ON st.id = tt1.store_id AND st.code = ? WHERE tt1.promotion_id = t1.id) > 0"
sql += " AND (SELECT COUNT(*) FROM promotion_store tt1 JOIN store st ON st.id = tt1.store_id AND st.city_code = ? WHERE tt1.promotion_id = t1.id) > 0"
sqlParams = append(sqlParams, params["cityCode"].(int))
}
sql += `