luo
2023-09-23 6357f89bf38b83b779e233249c2b0e480b78e164
cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
@@ -31,6 +31,19 @@
        illustrate
        from t_coupon
        where 1 = 1
        <if test="cityCode != null">
           and id in(
            SELECT DISTINCT couponId FROM
            (SELECT DISTINCT couponId
            from t_coupon_store
            WHERE storeId = #{storeId}
            UNION ALL
            SELECT DISTINCT couponId
            from t_coupon_city
            WHERE provinceCode = #{cityCode}) o)
        </if>
        <if test="name != null">
            and `name` like concat('%', #{name}, '%')
        </if>