Browse Source

回放修改2.6

wwh 2 years ago
parent
commit
683de7405a

+ 13 - 1
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/controller/VideoRecorControllerSg.java

@@ -5,7 +5,11 @@ package com.huimv.video.dhicc.test.controller;
 
 
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.dahuatech.icc.exception.ClientException;
 import com.dahuatech.icc.exception.ClientException;
+import com.huimv.video.dhicc.entity.IccChannel;
+import com.huimv.video.dhicc.mapper.IccChannelMapper;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
@@ -40,12 +44,20 @@ public class VideoRecorControllerSg {
     @Autowired
     @Autowired
     private OauthConfigBaseInfo03 oauthConfigBaseInfo03;
     private OauthConfigBaseInfo03 oauthConfigBaseInfo03;
 
 
+    @Autowired
+    private IccChannelMapper iccChannelMapper;
+
     @RequestMapping("/getVideoRecord")
     @RequestMapping("/getVideoRecord")
     public R getVideoRecord(@RequestBody Map<String, Object> params1) throws ClientException, ParseException {
     public R getVideoRecord(@RequestBody Map<String, Object> params1) throws ClientException, ParseException {
         String happendTime = (String) params1.get("happendTime");
         String happendTime = (String) params1.get("happendTime");
         String channelId = (String) params1.get("nodeCode");
         String channelId = (String) params1.get("nodeCode");
         Integer farmId = (Integer) params1.get("farmId");
         Integer farmId = (Integer) params1.get("farmId");
+        String channelName = (String) params1.get("channelName");
 
 
+        LambdaQueryWrapper<IccChannel> wrapper3 = Wrappers.lambdaQuery();
+        wrapper3.eq(IccChannel::getChannelName, channelName);
+        IccChannel iccChannel = iccChannelMapper.selectOne(wrapper3);
+        System.out.println(iccChannel);
 
 
 
 
         //开始结束时间代为处理
         //开始结束时间代为处理
@@ -59,7 +71,7 @@ public class VideoRecorControllerSg {
 
 
 
 
         Map<String, Object> test = new HashMap<>();
         Map<String, Object> test = new HashMap<>();
-        test.put("channelId", channelId);
+        test.put("channelId", iccChannel.getChannelId());
         test.put("recordSource", "2");
         test.put("recordSource", "2");
         test.put("startTime", befor);
         test.put("startTime", befor);
         test.put("endTime", after);
         test.put("endTime", after);