gongzuming
2024-09-19 a768dc3daa04d35fedfbe75c0a59b9b2545b85c4
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
<?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.mzl.flower.mapper.point.PointGoodsMapper">
 
    <select id="selectGoodsList" resultType="com.mzl.flower.dto.response.point.PointGoodsListDTO">
        SELECT p.*
        FROM t_point_goods p
        WHERE p.deleted = 0
        <if test="condition.name != null and condition.name != ''">
            AND p.name LIKE concat('%', #{condition.name},'%')
        </if>
        <if test="condition.status != null and condition.status != ''">
            AND p.status = #{condition.status}
        </if>
        <if test="condition.stockLower != null">
            AND p.stock &gt; #{condition.stockLower}
        </if>
        <if test="condition.stockUpper != null">
            AND p.stock &lt;= #{condition.stockUpper}
        </if>
        <if test="condition.pointLower != null">
            AND p.point &gt;= #{condition.pointLower}
        </if>
        <if test="condition.pointUpper != null">
            AND p.point &lt;= #{condition.pointUpper}
        </if>
        ORDER BY p.create_time desc
    </select>
 
</mapper>