You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.7 KiB
45 lines
1.7 KiB
3 months ago
|
<?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.model2d3d.viewer.back.dao.ex.BasicBuildingMapperExt">
|
||
|
|
||
|
|
||
|
<select id="checkExist" resultType="java.lang.Integer">
|
||
|
SELECT
|
||
|
COUNT(1)
|
||
|
FROM
|
||
|
basic_building
|
||
|
WHERE
|
||
|
flag != 1 AND (name = #{buildingName} OR unique_identification = #{uniqueIdentification})
|
||
|
<if test="companyId != null">
|
||
|
AND company_id = #{companyId}
|
||
|
</if>
|
||
|
<if test="buildingId != null">
|
||
|
AND building_id != #{buildingId}
|
||
|
</if>
|
||
|
</select>
|
||
|
|
||
|
|
||
|
<select id="getListPage" resultType="com.model2d3d.viewer.back.vo.building.BuildingPageVO">
|
||
|
SELECT
|
||
|
bbuilding.building_id buildingId,
|
||
|
bbuilding.company_id companyId,
|
||
|
bbuilding.name buildingName,
|
||
|
bbuilding.address,
|
||
|
bbuilding.unique_identification,
|
||
|
bbuilding.dimensional_url
|
||
|
FROM
|
||
|
basic_building bbuilding
|
||
|
INNER JOIN basic_company bcomp ON bcomp.id = bbuilding.company_id
|
||
|
WHERE
|
||
|
bbuilding.flag != 1 AND bcomp.flag != 1
|
||
|
AND bbuilding.company_id IN <foreach collection="params.companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
|
||
|
<if test="params.buildingIdList != null">
|
||
|
AND bbuilding.building_id IN <foreach collection="params.buildingIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
|
||
|
</if>
|
||
|
<if test="params.buildingName != null">
|
||
|
AND bbuilding.name LIKE CONCAT('%',#{params.buildingName},'%')
|
||
|
</if>
|
||
|
</select>
|
||
|
|
||
|
|
||
|
</mapper>
|