diff --git a/src/main/java/com/zcloud/controller/videoreceive/VideoReceiveController.java b/src/main/java/com/zcloud/controller/videoreceive/VideoReceiveController.java index e6ee8515..b5684c56 100644 --- a/src/main/java/com/zcloud/controller/videoreceive/VideoReceiveController.java +++ b/src/main/java/com/zcloud/controller/videoreceive/VideoReceiveController.java @@ -264,6 +264,13 @@ public class VideoReceiveController extends BaseController { return videoReceiveService.listAllForMap(pd); } + @RequestMapping(value="/listAllCameraForMapBinding") + @ResponseBody + public Object listAllCameraForMapBingDing() throws Exception{ + PageData pd = this.getPageData(); + return videoReceiveService.listAllForMapBinding(pd); + } + @RequestMapping(value="/getHlsPath") @ResponseBody public Object getHlsPath() throws Exception{ diff --git a/src/main/java/com/zcloud/mapper/datasource/videoreceive/VideoReceiveMapper.java b/src/main/java/com/zcloud/mapper/datasource/videoreceive/VideoReceiveMapper.java index 01102712..7a062cf0 100644 --- a/src/main/java/com/zcloud/mapper/datasource/videoreceive/VideoReceiveMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/videoreceive/VideoReceiveMapper.java @@ -43,6 +43,8 @@ public interface VideoReceiveMapper { List<PageData> listAllForMap(PageData pd); + List<PageData> listAllForMapBinding(PageData pd); + /**列表 * @param page * @throws Exception diff --git a/src/main/java/com/zcloud/service/receive/VideoReceiveService.java b/src/main/java/com/zcloud/service/receive/VideoReceiveService.java index 7154f3dd..e06ea524 100644 --- a/src/main/java/com/zcloud/service/receive/VideoReceiveService.java +++ b/src/main/java/com/zcloud/service/receive/VideoReceiveService.java @@ -42,6 +42,8 @@ public interface VideoReceiveService { Object listAllForMap(PageData pd); + Object listAllForMapBinding(PageData pd); + /**列表 * @param page * @throws Exception diff --git a/src/main/java/com/zcloud/service/receive/impl/VideoReceiveServiceImpl.java b/src/main/java/com/zcloud/service/receive/impl/VideoReceiveServiceImpl.java index 00498920..c2d0a6a5 100644 --- a/src/main/java/com/zcloud/service/receive/impl/VideoReceiveServiceImpl.java +++ b/src/main/java/com/zcloud/service/receive/impl/VideoReceiveServiceImpl.java @@ -67,6 +67,16 @@ public class VideoReceiveServiceImpl implements VideoReceiveService { return map; } + @Override + public Object listAllForMapBinding(PageData pd) { + Map<String,Object> map = new HashMap<String,Object>(); + String errInfo = "success"; + List<PageData> varList = videoReceiveMapper.listAllForMapBinding(pd); + map.put("varList", varList); + map.put("result", errInfo); + return map; + } + /**列表 * @param page * @throws Exception diff --git a/src/main/resources/mybatis/datasource/videoreceive/VideoReceiveMapper.xml b/src/main/resources/mybatis/datasource/videoreceive/VideoReceiveMapper.xml index 504c8f73..bbc73d7f 100644 --- a/src/main/resources/mybatis/datasource/videoreceive/VideoReceiveMapper.xml +++ b/src/main/resources/mybatis/datasource/videoreceive/VideoReceiveMapper.xml @@ -15,6 +15,8 @@ <!-- 字段 --> <sql id="Field"> f.VIDEORECEIVE_ID, + f.GATE_AREA_ID, + f.ISBINDING, f.ResCode, f.OrgCode, f.ResName, @@ -77,34 +79,34 @@ update <include refid="tableName"></include> set - <if test="ResCode != null and ResCode != ''"><!-- 门禁区域 --> + <if test="ResCode != null and ResCode != ''"> ResCode=#{ResCode}, </if> - <if test="OrgCode != null and OrgCode != ''"><!-- 门禁区域 --> + <if test="OrgCode != null and OrgCode != ''"> OrgCode=#{OrgCode}, </if> - <if test="ResName != null and ResName != ''"><!-- 门禁区域 --> + <if test="ResName != null and ResName != ''"> ResName=#{ResName}, </if> - <if test="ResType != null and ResType != ''"><!-- 门禁区域 --> + <if test="ResType != null and ResType != ''"> ResType=#{ResType}, </if> - <if test="ResSubType != null and ResSubType != ''"><!-- 门禁区域 --> + <if test="ResSubType != null and ResSubType != ''"> ResSubType=#{ResSubType}, </if> - <if test="ISDELETE != null and ISDELETE != ''"><!-- 门禁区域 --> + <if test="ISDELETE != null and ISDELETE != ''"> ISDELETE=#{ISDELETE}, </if> - <if test="LONGITUDE != null and LONGITUDE != ''"><!-- 门禁区域 --> + <if test="LONGITUDE != null and LONGITUDE != ''"> LONGITUDE=#{LONGITUDE}, </if> - <if test="LATITUDE != null and LATITUDE != ''"><!-- 门禁区域 --> + <if test="LATITUDE != null and LATITUDE != ''"> LATITUDE=#{LATITUDE}, </if> - <if test="ISBINDING != null and ISBINDING != ''"><!-- 门禁区域 --> + <if test="ISBINDING != null and ISBINDING != ''"> ISBINDING=#{ISBINDING}, </if> - <if test="GATE_AREA_ID != null and GATE_AREA_ID != ''"><!-- 门禁区域 --> + <if test="GATE_AREA_ID != null and GATE_AREA_ID != ''"> GATE_AREA_ID=#{GATE_AREA_ID}, </if> VIDEORECEIVE_ID = VIDEORECEIVE_ID @@ -213,4 +215,18 @@ from <include refid="tableName"></include> f </select> + + <select id="listAllForMapBinding" parameterType="pd" resultType="pd"> + select + VIDEORECEIVE_ID as id, + ResName as NAME, + ResName as MAP_POINT_NAME, + LONGITUDE as LONGITUDE, + LATITUDE as LATITUDE, + ResCode + from + <include refid="tableName"></include> f + where + f.ISBINDING = '1' + </select> </mapper>