Pu Zhibing
2024-10-16 c4664502dfdaffff555b532e65b51a57ac8b29c2
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
<?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.chargingPile.mapper.TChargingPileNotificationMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TChargingPileNotification">
        <id column="id" property="id" />
        <result column="site_id" property="siteId" />
        <result column="charging_pile_id" property="chargingPileId" />
        <result column="phone" property="phone"/>
        <result column="content" property="content" />
        <result column="create_time" property="createTime" />
        <result column="del_flag" property="delFlag" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, site_id, charging_pile_id, content, create_time, del_flag
    </sql>
 
    
    
    <select id="chargingPileNotificationPageList" resultType="com.ruoyi.chargingPile.api.model.TChargingPileNotification">
        select
        a.id,
        b.`name` as siteName,
        a.phone,
        a.content,
        a.create_time as createTime
        from t_charging_pile_notification a
        left join t_site b on (a.site_id = b.id)
        where a.del_flag = 0
        <if test="null != siteIds">
            and a.site_id in
            <foreach collection="siteIds" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        order by a.create_time desc
    </select>
</mapper>