linwe
2024-08-09 8b7258c9427882bb1798f1502eaa35184c6e374e
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?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="org.springblade.modules.ownersCommittee.mapper.OwnersCommitteeMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="ownersCommitteeResultMap"
               type="org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity">
    </resultMap>
 
 
    <select id="selectOwnersCommitteePage" resultMap="ownersCommitteeResultMap">
        <include refid="selectOwnersCommittee"/>
        <where>
            <if test="ownersCommittee.id != null ">and id = #{ownersCommittee.id}</if>
            <if test="ownersCommittee.areaId != null ">and area_id = #{ownersCommittee.areaId}</if>
            <if test="ownersCommittee.areaName != null  and ownersCommittee.areaName != ''">and area_name =
                #{ownersCommittee.areaName}
            </if>
            <if test="ownersCommittee.establishTime != null ">and establish_time = #{ownersCommittee.establishTime}</if>
            <if test="ownersCommittee.imageUrl != null  and ownersCommittee.imageUrl != ''">and image_url =
                #{ownersCommittee.imageUrl}
            </if>
            <if test="ownersCommittee.latitude != null  and ownersCommittee.latitude != ''">and latitude =
                #{ownersCommittee.latitude}
            </if>
            <if test="ownersCommittee.longitude != null  and ownersCommittee.longitude != ''">and longitude =
                #{ownersCommittee.longitude}
            </if>
            <if test="ownersCommittee.location != null  and ownersCommittee.location != ''">and location =
                #{ownersCommittee.location}
            </if>
            <if test="ownersCommittee.mobile != null  and ownersCommittee.mobile != ''">and mobile =
                #{ownersCommittee.mobile}
            </if>
            <if test="ownersCommittee.name != null  and ownersCommittee.name != ''">and name like
                concat('%',#{ownersCommittee.name},'%')
            </if>
            <if test="ownersCommittee.peopleTotal != null  and ownersCommittee.peopleTotal != ''">and people_total =
                #{ownersCommittee.peopleTotal}
            </if>
            <if test="ownersCommittee.principalId != null ">and principal_id = #{ownersCommittee.principalId}</if>
            <if test="ownersCommittee.principalName != null  and ownersCommittee.principalName != ''">and principal_name
                = #{ownersCommittee.principalName}
            </if>
            <if test="ownersCommittee.profile != null  and ownersCommittee.profile != ''">and profile =
                #{ownersCommittee.profile}
            </if>
            <if test="ownersCommittee.session != null ">and session = #{ownersCommittee.session}</if>
            <if test="ownersCommittee.startTime != null ">and start_time = #{ownersCommittee.startTime}</if>
            <if test="ownersCommittee.endTime != null ">and end_time = #{ownersCommittee.endTime}</if>
            <if test="ownersCommittee.sort != null ">and sort = #{ownersCommittee.sort}</if>
            <if test="ownersCommittee.status != null ">and status = #{ownersCommittee.status}</if>
            <if test="ownersCommittee.type != null ">and type = #{ownersCommittee.type}</if>
            <if test="ownersCommittee.createId != null ">and create_id = #{ownersCommittee.createId}</if>
            <if test="ownersCommittee.updateId != null ">and update_id = #{ownersCommittee.updateId}</if>
            <if test="ownersCommittee.createTime != null ">and create_time = #{ownersCommittee.createTime}</if>
            <if test="ownersCommittee.updateTime != null ">and update_time = #{ownersCommittee.updateTime}</if>
            <if test="ownersCommittee.deleteFlag != null ">and delete_flag = #{ownersCommittee.deleteFlag}</if>
            <if test="ownersCommittee.areaIdList != null ">
                and area_id in
                <foreach collection="ownersCommittee.areaIdList" item="item" separator="," open="(" close=")">
                    #{item}
                </foreach>
 
            </if>
        </where>
    </select>
 
 
    <resultMap type="org.springblade.modules.ownersCommittee.dto.OwnersCommitteeDTO" id="OwnersCommitteeDTOResult">
        <result property="id" column="id"/>
        <result property="areaId" column="area_id"/>
        <result property="areaName" column="area_name"/>
        <result property="establishTime" column="establish_time"/>
        <result property="imageUrl" column="image_url"/>
        <result property="latitude" column="latitude"/>
        <result property="longitude" column="longitude"/>
        <result property="location" column="location"/>
        <result property="mobile" column="mobile"/>
        <result property="name" column="name"/>
        <result property="peopleTotal" column="people_total"/>
        <result property="principalId" column="principal_id"/>
        <result property="principalName" column="principal_name"/>
        <result property="profile" column="profile"/>
        <result property="session" column="session"/>
        <result property="startTime" column="start_time"/>
        <result property="endTime" column="end_time"/>
        <result property="sort" column="sort"/>
        <result property="status" column="status"/>
        <result property="type" column="type"/>
        <result property="createId" column="create_id"/>
        <result property="updateId" column="update_id"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="deleteFlag" column="delete_flag"/>
    </resultMap>
 
    <sql id="selectOwnersCommittee">
        select
            id,
            area_id,
            area_name,
            establish_time,
            image_url,
            latitude,
            longitude,
            location,
            mobile,
            name,
            people_total,
            principal_id,
            principal_name,
            profile,
            session,
            start_time,
            end_time,
            sort,
            status,
            type,
            create_id,
            update_id,
            create_time,
            update_time,
            delete_flag
        from
            jczz_owners_committee
    </sql>
 
    <select id="selectOwnersCommitteeById" parameterType="int" resultMap="OwnersCommitteeDTOResult">
        <include refid="selectOwnersCommittee"/>
        where
        id = #{id}
    </select>
 
    <select id="selectOwnersCommitteeList"
            parameterType="org.springblade.modules.ownersCommittee.dto.OwnersCommitteeDTO"
            resultMap="OwnersCommitteeDTOResult">
        <include refid="selectOwnersCommittee"/>
        <where>
            <if test="id != null ">and id = #{id}</if>
            <if test="areaId != null ">and area_id = #{areaId}</if>
            <if test="areaName != null  and areaName != ''">and area_name = #{areaName}</if>
            <if test="establishTime != null ">and establish_time = #{establishTime}</if>
            <if test="imageUrl != null  and imageUrl != ''">and image_url = #{imageUrl}</if>
            <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
            <if test="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
            <if test="location != null  and location != ''">and location = #{location}</if>
            <if test="mobile != null  and mobile != ''">and mobile = #{mobile}</if>
            <if test="name != null  and name != ''">and name = #{name}</if>
            <if test="peopleTotal != null  and peopleTotal != ''">and people_total = #{peopleTotal}</if>
            <if test="principalId != null ">and principal_id = #{principalId}</if>
            <if test="principalName != null  and principalName != ''">and principal_name = #{principalName}</if>
            <if test="profile != null  and profile != ''">and profile = #{profile}</if>
            <if test="session != null ">and session = #{session}</if>
            <if test="startTime != null ">and start_time = #{startTime}</if>
            <if test="endTime != null ">and end_time = #{endTime}</if>
            <if test="sort != null ">and sort = #{sort}</if>
            <if test="status != null ">and status = #{status}</if>
            <if test="type != null ">and type = #{type}</if>
            <if test="createId != null ">and create_id = #{createId}</if>
            <if test="updateId != null ">and update_id = #{updateId}</if>
            <if test="createTime != null ">and create_time = #{createTime}</if>
            <if test="updateTime != null ">and update_time = #{updateTime}</if>
            <if test="deleteFlag != null ">and delete_flag = #{deleteFlag}</if>
        </where>
    </select>
 
 
</mapper>