CeDo
2021-05-26 2356cf9f68bec5aa46689ab45d49c7fb1ee73de3
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?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.panzhihua.service_grid.dao.EventGridDataMapper">
 
     <resultMap id="baseResult" type="com.panzhihua.service_grid.model.dos.EventGridDataDO">
        <result property="id" column="id"/>
        <result property="type" column="type"/>
        <result property="zoneId" column="zone_id"/>
        <result property="gridStreetId" column="grid_street_id"/>
        <result property="gridCommunityId" column="grid_community_id"/>
        <result property="gridName" column="grid_name"/>
        <result property="mapLevel" column="map_level"/>
        <result property="area" column="area"/>
        <result property="lineColor" column="line_color"/>
        <result property="lineBroadband" column="line_broadband"/>
        <result property="fillColor" column="fill_color"/>
        <result property="remarks" column="remarks"/>
        <result property="data" column="data"/>
        <result property="createBy" column="create_by"/>
        <result property="createAt" column="create_at"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateAt" column="update_at"/>
    </resultMap>
 
    <sql id="columns">
    <![CDATA[
        id,type,zone_id,grid_street_id,grid_community_id,grid_name,map_level,area,line_color,line_broadband,fill_color,remarks,data,create_by,create_at,update_by,update_at
    ]]>
    </sql>
 
 
    <select id="findByPage" resultType="com.panzhihua.common.model.vos.grid.EventGridDataVO"
        parameterType="com.panzhihua.common.model.dtos.grid.PageEventGridDataDTO">
        SELECT <include refid="columns" />
        FROM event_grid_data
        <where>
           <if test="pageEventGridDataDTO.id!=null">
                AND id = #{pageEventGridDataDTO.id}
            </if>
           <if test="pageEventGridDataDTO.type!=null">
                AND type = #{pageEventGridDataDTO.type}
            </if>
           <if test="pageEventGridDataDTO.zoneId!=null">
                AND zone_id = #{pageEventGridDataDTO.zoneId}
            </if>
           <if test="pageEventGridDataDTO.gridStreetId!=null">
                AND grid_street_id = #{pageEventGridDataDTO.gridStreetId}
            </if>
           <if test="pageEventGridDataDTO.gridCommunityId!=null">
                AND grid_community_id = #{pageEventGridDataDTO.gridCommunityId}
            </if>
           <if test="pageEventGridDataDTO.gridName!=null">
                AND grid_name = #{pageEventGridDataDTO.gridName}
            </if>
           <if test="pageEventGridDataDTO.mapLevel!=null">
                AND map_level = #{pageEventGridDataDTO.mapLevel}
            </if>
           <if test="pageEventGridDataDTO.area!=null">
                AND area = #{pageEventGridDataDTO.area}
            </if>
           <if test="pageEventGridDataDTO.lineColor!=null">
                AND line_color = #{pageEventGridDataDTO.lineColor}
            </if>
           <if test="pageEventGridDataDTO.lineBroadband!=null">
                AND line_broadband = #{pageEventGridDataDTO.lineBroadband}
            </if>
           <if test="pageEventGridDataDTO.fillColor!=null">
                AND fill_color = #{pageEventGridDataDTO.fillColor}
            </if>
           <if test="pageEventGridDataDTO.remarks!=null">
                AND remarks = #{pageEventGridDataDTO.remarks}
            </if>
           <if test="pageEventGridDataDTO.data!=null">
                AND data = #{pageEventGridDataDTO.data}
            </if>
           <if test="pageEventGridDataDTO.createBy!=null">
                AND create_by = #{pageEventGridDataDTO.createBy}
            </if>
           <if test="pageEventGridDataDTO.createAtBegin!=null">
                AND create_at >= #{pageEventGridDataDTO.createAtBegin}
           </if>
           <if test="pageEventGridDataDTO.createAtEnd!=null">
                AND create_at &lt;= #{pageEventGridDataDTO.createAtEnd}
           </if>
           <if test="pageEventGridDataDTO.updateBy!=null">
                AND update_by = #{pageEventGridDataDTO.updateBy}
            </if>
           <if test="pageEventGridDataDTO.updateAtBegin!=null">
                AND update_at >= #{pageEventGridDataDTO.updateAtBegin}
           </if>
           <if test="pageEventGridDataDTO.updateAtEnd!=null">
                AND update_at &lt;= #{pageEventGridDataDTO.updateAtEnd}
           </if>
        </where>
        <if test="pageEventGridDataDTO.sortColumns!=null">
            ORDER BY ${pageEventGridDataDTO.sortColumns} ${pageEventGridDataDTO.sortType}
        </if>
    </select>
 
</mapper>