This commit is contained in:
苏尹岚
2021-01-11 15:12:49 +08:00
parent 6bbc45ad59
commit 154791b487

View File

@@ -1487,10 +1487,10 @@ func GetCoupons(db *DaoDB, couponType int, couponStatuss, storeIDs []int, keywor
SELECT DISTINCT a.*
FROM coupons a
LEFT JOIN store_coupons b ON a.id = b.coupon_id
WHERE 1 = 1
OR a.is_all = ?
WHERE (1 = 1
OR a.is_all = ?)
`
sqlParams := []interface{}{utils.DefaultTimeValue, model.YES}
sqlParams := []interface{}{model.YES}
if couponType != 0 {
sql += " AND a.coupon_type = ?"
sqlParams = append(sqlParams, couponType)