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
<?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.ShopPointMapper">
 
    <sql id="ShopPointList">
        SELECT
        ts.`name` shopName,
        ts.shop_manager shopLeaderName,
        ts.phone,
        tsp.type,
        tsp.create_time,
        tsp.variable_point
        FROM
        t_shop_point tsp
        LEFT JOIN t_shop ts ON tsp.shop_id = ts.id
        <where>
            <if test="shopPoint.shopName != null and shopPoint.shopName != ''">
                AND ts.`name` LIKE concat('%',#{shopPoint.shopName},'%')
            </if>
            <if test="shopPoint.shopLeaderName != null and shopPoint.shopLeaderName != ''">
                AND ts.shop_manager LIKE concat('%',#{shopPoint.shopLeaderName},'%')
            </if>
            <if test="shopPoint.phone != null and shopPoint.phone != ''">
                AND ts.phone LIKE concat('%',#{shopPoint.phone},'%')
            </if>
            <if test="shopPoint.type != null">
                AND tsp.type = #{shopPoint.type}
            </if>
            <if test="shopPoint.startTime !=null and shopPoint.endTime !=null">
                AND tsp.create_time BETWEEN #{shopPoint.startTime} AND #{shopPoint.endTime}
            </if>
 
        </where>
    </sql>
 
    <select id="selectShopPointList" resultType="com.ruoyi.other.api.domain.ShopPoint">
        <include refid="ShopPointList"/>
    </select>
    <select id="queryShpointPage" resultType="com.ruoyi.other.api.domain.ShopPoint">
        <include refid="ShopPointList"/>
    </select>
</mapper>