lisy
2023-08-01 c9ae4fb9e1e99beec9ffde48243b5564fcd7163f
管理后台优惠券列表sql语句bug
1个文件已修改
21 ■■■■ 已修改文件
cloud-server-activity/src/main/resources/mapper/CouponMapper.xml 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>