Commit 015f0ce2 authored by chenzhao's avatar chenzhao

修改sql

parent ab7a1691
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</select> </select>
<select id="pageBuildingVideo" resultType="com.yeejoin.equipmanage.common.entity.vo.BuildingVideoVO"> <select id="pageBuildingVideo" resultType="com.yeejoin.equipmanage.common.entity.vo.BuildingVideoVO">
SELECT <!-- SELECT
v.id AS id, v.id AS id,
v.name AS name, v.name AS name,
v.token AS token, v.token AS token,
...@@ -87,7 +87,39 @@ ...@@ -87,7 +87,39 @@
</foreach> </foreach>
</if> </if>
</where> </where>
order by v.create_date-->
SELECT
v.id AS id,
v.name AS name,
v.token AS token,
v.url AS url,
v.code AS code,
v.address,
v.preset_position as presetPosition
FROM wl_video v
JOIN wl_video_source vc ON vc.video_id = v.id
join wl_form_instance wfl on wfl.instance_id = vc.source_id
WHERE
1 = 1
<if test="dto.buildingId!=null and dto.buildingId!=''">
and FIND_IN_SET(#{dto.buildingId}, vc.parent_source_ids)
</if>
<if test="dto.bizOrgCode!=null and dto.bizOrgCode!=''">
and v.biz_org_code LIKE CONCAT(#{dto.bizOrgCode}, '%')
</if>
<if test="dto.equipmentName!=null and dto.equipmentName!=''">
and v.name like concat('%',#{dto.equipmentName},'%')
</if>
<if test="dto.code!=null and dto.code!=''">
and v.code like concat('%',#{dto.code},'%')
</if>
<if test="dto.orgCode!=null and dto.bizOrgCode!=''">
and wfl.field_value like concat (#{dto.bizOrgCode},'%')
</if>
GROUP BY id
order by v.create_date order by v.create_date
</select> </select>
<select id="getFireEquipByVideoId" resultType="com.yeejoin.equipmanage.common.entity.vo.BuildingListVO"> <select id="getFireEquipByVideoId" resultType="com.yeejoin.equipmanage.common.entity.vo.BuildingListVO">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment