|
|
|
|
<?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.dongjian.dashboard.back.dao.ex.BasicBuildingMapperExt">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getListPage" resultType="com.dongjian.dashboard.back.vo.building.BuildingPageVO">
|
|
|
|
|
SELECT
|
|
|
|
|
bbuilding.building_id buildingId,
|
|
|
|
|
bbuilding.company_id companyId,
|
|
|
|
|
bcomp.company_name companyName,
|
|
|
|
|
bbuilding.name buildingName,
|
|
|
|
|
bbuilding.address,
|
|
|
|
|
bbuilding.udf_building_id udfBuildingId,
|
|
|
|
|
bbuilding.building_bucket,
|
|
|
|
|
bbuilding.floor_info_list,
|
|
|
|
|
bbuilding.thumbnail_num,
|
|
|
|
|
bbuilding.show_switch_2d3d,
|
|
|
|
|
bbuilding.brief_introduction,
|
|
|
|
|
bbuilding.picture_introduction
|
|
|
|
|
FROM
|
|
|
|
|
basic_building bbuilding
|
|
|
|
|
INNER JOIN data_center_aeon_admin.basic_company bcomp ON bcomp.id = bbuilding.company_id
|
|
|
|
|
WHERE
|
|
|
|
|
bbuilding.flag != 1 AND bcomp.flag != 1
|
|
|
|
|
AND bbuilding.company_id IN <foreach collection="companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
|
|
<if test="bindBuildingIdList != null">
|
|
|
|
|
AND bbuilding.building_id IN <foreach collection="bindBuildingIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="buildingIdList != null">
|
|
|
|
|
AND bbuilding.building_id IN <foreach collection="buildingIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="buildingName != null">
|
|
|
|
|
AND bbuilding.name LIKE CONCAT('%',#{buildingName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
order by bbuilding.building_id desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getBuildingIdListByCompanyId" resultType="java.lang.Long">
|
|
|
|
|
SELECT
|
|
|
|
|
building_id
|
|
|
|
|
FROM
|
|
|
|
|
basic_building
|
|
|
|
|
WHERE flag = 0
|
|
|
|
|
AND company_id IN <foreach collection="companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
|
|
|
|
|
|
|
ORDER BY building_id
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|