puzhibing
2023-08-01 883d16070288862180dd65fc58e7927f9040a30d
cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
@@ -26,23 +26,10 @@
        `status`,
        state
        from t_coupon
        where 1 = 1SELECT id,
        `name`,
        useScope,
        `type`,
        distributionMethod,
        date_format(startTime ,'%Y-%m-%d') as startTime,
        date_format(endTime ,'%Y-%m-%d') as endTime,
        userPopulation,
        quantityIssued,
        pickUpQuantity,
        `status`,
        state
        from t_coupon
        where 1=1
          <if test="name != null">
              and `name` like concat('%', #{name}, '%')
          </if>
        where 1 = 1
        <if test="name != null">
            and `name` like concat('%', #{name}, '%')
        </if>
        <if test="type != null">
            and type = #{type}
        </if>