liujie
2023-09-16 1aa309700fb7e12d85f98bed22a45bdac448ec1c
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
<?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.dsh.activity.mapper.PointsMerchandiseMapper">
 
 
    <select id="queryGoodsListOfSearch" resultType="java.util.Map">
        SELECT id,
               `name`,
               `cover`,
               `type`,
               date_format(startTime ,'%Y-%m-%d') as startTime,
               date_format(endTime ,'%Y-%m-%d') as endTime,
               useScope,
               userPopulation,
               quantityIssued,
               pickUpQuantity,
               `sort`,
               shelves
        from t_points_merchandise
        where 1 = 1
        <if test="name != null">
            and `name` like concat('%', #{name}, '%')
        </if>
        <if test="type != null">
            and type = #{type}
        </if>
        <if test="redemptionMethod != null">
            and redemptionMethod = #{redemptionMethod}
        </if>
        <if test="userPopulation != null">
            and userPopulation = #{userPopulation}
        </if>
        <if test="state != null">
            and `state` = #{state}
        </if>
        order by insertTime desc
    </select>
</mapper>