1
phpcjl
2024-12-20 d51a8cfa10c34d9c1e7d6b4726d31e75ecee5dc6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.other.mapper.CouponInfoMapper">
 
    <select id="queryCouponInfoPage" resultType="com.ruoyi.other.api.domain.CouponInfo">
        SELECT
            tci.id,
            tci.create_time,
            tci.coupon_name,
            tci.coupon_type,
            tci.condition_amount,
            tci.discount_amount,
            tci.money_amount,
            tci.discount,
            tci.for_good_ids,
            tci.send_num,
            tci.max_num,
            tci.period_type,
            tci.period_start_time,
            tci.period_end_time,
            tci.period_days,
            tci.send_start_time,
            tci.send_end_time,
            tci.send_type,
            tci.need_point,
            tci.person_type,
            tci.person_ids
        FROM
            t_coupon_info tci
        <where>
            tci.del_flag = 0
            <if test="couponInfo.couponName != null and couponInfo.couponName != ''">
                AND tci.coupon_name LIKE concat('%', #{couponInfo.couponName}, '%')
            </if>
            <if test="couponInfo.couponType != null">
                AND tci.coupon_type = #{couponInfo.couponType}
            </if>
            <if test="couponInfo.sendType != null">
                AND tci.send_type = #{couponInfo.sendType}
            </if>
            <if test="couponInfo.personType != null">
                AND tci.person_type = #{couponInfo.personType}
            </if>
            <if test="couponInfo.shelfStatus != null">
                AND tci.shelf_status = #{couponInfo.shelfStatus}
            </if>
        </where>
    </select>
</mapper>