puzhibing
2023-12-04 3ad6b6ba2ba56fc0bcd2130e47190779c6e15acc
cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
@@ -89,6 +89,7 @@
        where 1 = 1 and distributionMethod = 4
        and auditStatus = 2
        and startTime < now()
          and state= 1
        <if test="cityCode != null">
            and id in(
            SELECT DISTINCT couponId FROM
@@ -97,9 +98,8 @@
            WHERE storeId = #{storeId}
            UNION ALL
            SELECT DISTINCT couponId
            from t_coupon_city
            WHERE provinceCode = #{cityCode}) o)
            WHERE cityCode = #{cityCode}) o)
        </if>
        <if test="name != null">
            and `name` like concat('%', #{name}, '%')
@@ -117,8 +117,6 @@
        <if test="state != null">
            and `state` = #{state}
        </if>
        union all
        SELECT id,
        `name`,
@@ -136,23 +134,12 @@
        from t_coupon
        where 1 = 1 and distributionMethod = 4 and useScope = 1
        and auditStatus = 2
        and state= 1
        and startTime &lt; now()
        <if test="name != null">
            and `name` like concat('%', #{name}, '%')
        </if>
        <if test="type != null">
            and type = #{type}
        </if>
        <if test="userPopulation != null">
            and userPopulation = #{userPopulation}
        </if>
        <if test="status !=null">
            and `status` = #{status}
        </if>
        <if test="state != null">
            and `state` = #{state}
        </if>
    </select>
    <select id="queryCouponExamineList" resultType="java.util.Map">