tangzy
2022-01-20 729d31eea3b5e5294f232730f20a2142463e15b5
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
<?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"/>
    </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
        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
        FROM sys_architecture 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}%'
        UNION
        SELECT GROUP_CONCAT(mechanismName) AS mechanismname
        FROM sys_mechanism
        WHERE mechanismName LIKE '%${mechanismName}%'
        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>
</mapper>