zengh
2022-08-04 592a06ce92ee99abb5fee41437c1d0a834106cb9
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<?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.architecture.mapper.ArchitectureMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="architectureResultMap" type="org.springblade.modules.architecture.entity.Architecture">
        <id column="id" property="id"/>
        <result column="mechanismName" property="mechanismname"/>
        <result column="address" property="address"/>
        <result column="telePhone" property="telephone"/>
        <result column="introduce" property="introduce"/>
        <result column="jd" property="jd"/>
        <result column="wd" property="wd"/>
        <result column="gd" property="gd"/>
        <result column="tpUrl" property="tpurl"/>
        <result column="codeUrl" property="codeurl"/>
        <result column="websiteUrl" property="websiteurl"/>
        <result column="type" property="type"/>
        <result column="campus" property="campus"/>
        <result column="heading" property="heading"/>
        <result column="pitch" property="pitch"/>
        <result column="roll" property="roll"/>
        <result column="panoramaurl" property="panoramaurl"/>
        <result column="address_name" property="addressName"/>
    </resultMap>
 
 
    <select id="selectArchitecturePage" resultMap="architectureResultMap">
        select *
        from sys_architecture
        where is_deleted = 0
    </select>
 
 
    <!--联动-->
    <select id="selectType" resultType="java.util.HashMap">
        select id as dictKey, mechanismName as dictValue
        from sys_architecture
        where campus = #{campus}
          and type = #{type}
    </select>
 
    <!--查询校内建筑列表-->
    <select id="selectList" resultType="java.util.HashMap">
        SELECT id, mechanismName as mechanismname, tpUrl as tpurl
        FROM `sys_architecture`
        WHERE campus = #{campus}
          and type = #{type}
          and is_deleted = 0
    </select>
 
    <!--查询校内建筑基本信息-->
    <select id="selectInArchite" resultType="java.util.HashMap">
        SELECT id,
               mechanismName as mechanismname,
               address,
               telephone,
               introduce,
               jd,
               wd,
               gd,
               tpurl,
               codeurl,
               websiteurl,
               type,
               campus,
               heading,
               pitch,
               roll,
               panoramaurl,
               address_name,
               x
        FROM `sys_architecture`
        WHERE id = #{id}
          and is_deleted = 0
    </select>
 
 
    <select id="selectArch" resultType="java.util.HashMap">
        SELECT jd, wd, mechanismName as mechanismname, tpUrl as tpurl, codeUrl as codeurl, introduce, panoramaurl
        FROM sys_architecture
        WHERE panoramaurl IS NOT NULL
          AND panoramaurl!='' and is_deleted = 0
    </select>
    <select id="selectArchALL" resultType="java.util.HashMap">
        SELECT jd, wd, mechanismName AS mechanismname, tpUrl AS tpurl, codeUrl AS codeurl, introduce, panoramaurl,x
        FROM sys_architecture
        WHERE is_deleted = 0
        --         UNION
--         SELECT jd, wd, mechanismName AS mechanismname, tpUrl AS tpurl, codeUrl AS codeurl, introduce, panoramaurl
--         FROM sys_mechanism
--         WHERE is_deleted = 0
    </select>
 
    <select id="selectIns" resultType="java.lang.String">
        SELECT GROUP_CONCAT(mechanismName) AS mechanismname
        FROM sys_life
        WHERE loutype = #{id}
          and is_deleted = 0
    </select>
 
    <!--    <select id="selectLook" resultType="java.util.HashMap">-->
    <!--        SELECT GROUP_CONCAT(mechanismName) AS mechanismname-->
    <!--        FROM sys_architecture-->
    <!--        WHERE mechanismName LIKE '%${mechanismName}%' and is_deleted = 0-->
    <!--        UNION-->
    <!--        SELECT GROUP_CONCAT(mechanismName) AS mechanismname-->
    <!--        FROM sys_mechanism-->
    <!--        WHERE mechanismName LIKE '%${mechanismName}%' and is_deleted = 0-->
    <!--        UNION-->
    <!--        SELECT GROUP_CONCAT(mechanismName) AS mechanismname-->
    <!--        FROM sys_life-->
    <!--        WHERE mechanismName LIKE '%${mechanismName}%' and is_deleted = 0-->
    <!--    </select>-->
 
    <!--视频监控-->
    <select id="selectVideo" resultType="java.util.HashMap">
        SELECT jd,
               mechanismName as mechanismname,
               wd,
               videourl
        FROM sys_architecture
        WHERE videourl IS NOT NULL
          AND videourl != '' and is_deleted = 0
        UNION
        SELECT jd,
               wd,
               mechanismName as mechanismname,
               videourl
        FROM sys_mechanism
        WHERE videourl IS NOT NULL
          AND videourl != '' and is_deleted = 0
        UNION
        SELECT jd,
               wd,
               mechanismName as mechanismname,
               videourl
        FROM sys_life
        WHERE videourl IS NOT NULL
          AND videourl != '' and is_deleted = 0
    </select>
 
    <select id="selectLook" resultType="java.util.HashMap">
        SELECT mechanismName AS mechanismname,
               address,
               telePhone     AS telephone,
               introduce,
               jd,
               wd,
               x,
               y,
               gd,
               tpUrl         as tpurl,
               codeUrl       as codeurl,
               heading,
               pitch,
               roll,
               videourl,
               panoramaurl
        FROM sys_architecture
        WHERE mechanismName LIKE '%${mechanismName}%'
          AND is_deleted = 0
        UNION
        SELECT mechanismName AS mechanismname,
               address,
               telePhone     AS telephone,
               introduce,
               jd,
               wd,
               x,
               y,
               gd,
               tpUrl         as tpurl,
               codeUrl       as codeurl,
               heading,
               pitch,
               roll,
               videourl,
               panoramaurl
        FROM sys_mechanism
        WHERE mechanismName LIKE '%${mechanismName}%'
          AND is_deleted = 0
        UNION
        SELECT mechanismName AS mechanismname,
               address,
               telePhone     AS telephone,
               introduce,
               jd,
               wd,
               x,
               y,
               gd,
               tpUrl         as tpurl,
               codeUrl       as codeurl,
               heading,
               pitch,
               roll,
               videourl,
               panoramaurl
        FROM sys_life
        WHERE mechanismName LIKE '%${mechanismName}%'
          AND is_deleted = 0
    </select>
</mapper>