puzhibing
2023-08-04 624c9eec90d59297800f03276f8518daa1bd9f94
cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
@@ -27,9 +27,9 @@
        state
        from t_coupon
        where 1 = 1
          <if test="name != null">
              and `name` like concat('%', #{}, '%')
          </if>
        <if test="name != null">
            and `name` like concat('%', #{name}, '%')
        </if>
        <if test="type != null">
            and type = #{type}
        </if>
@@ -47,6 +47,37 @@
        </if>
          order by insertTime desc
    </select>
    <select id="queryCouponExamineList" resultType="java.util.Map">
        SELECT id,
               `name`,
               useScope,
               `type`,
               distributionMethod,
               date_format(startTime ,'%Y-%m-%d') as startTime,
               date_format(endTime ,'%Y-%m-%d') as endTime,
               userPopulation,
               quantityIssued,
               pickUpQuantity,
               auditStatus
        from t_coupon
        where auditStatus != 2
        <if test="name != null">
            and `name` like concat('%', #{name}, '%')
        </if>
        <if test="type != null">
            and type = #{type}
        </if>
        <if test="distributionMethod != null">
            and distributionMethod = #{distributionMethod}
        </if>
        <if test="userPopulation != null">
            and userPopulation = #{userPopulation}
        </if>
        <if test="auditStatus != null">
            and auditStatus = #{auditStatus}
        </if>
        order by insertTime desc
    </select>
</mapper>