<?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
|
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
|
-- 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,
|
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,
|
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,
|
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>
|