Преглед на файлове

政务外网大屏首页视频记录接口

yangyue преди 1 година
родител
ревизия
64003e8522

+ 11 - 0
video/src/main/java/cn/com/taiji/video/cotroller/VideoUrlController.java

@@ -4,6 +4,7 @@ package cn.com.taiji.video.cotroller;
 import cn.com.taiji.video.model.VideoAnalysisLineDTO;
 import cn.com.taiji.video.model.VideoAnalysisPieDTO;
 import cn.com.taiji.video.model.VideoDTO;
+import cn.com.taiji.video.model.VideoRecord;
 import cn.com.taiji.video.service.IVideoUrlService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -32,6 +33,11 @@ public class VideoUrlController {
         return urlService.queryVideoList();
     }
 
+    @GetMapping("record/list")
+    public List<VideoRecord> queryVideoRecord() {
+        return urlService.queryVideoRecord();
+    }
+
     @GetMapping("analysis/test")
     public void queryTestPie(Integer type, String startTime, String endTime) {
         LocalDate startDate = LocalDate.parse(startTime);
@@ -39,6 +45,11 @@ public class VideoUrlController {
         urlService.queryTestPie(type, startDate, endDate);
     }
 
+    @GetMapping("analysis/all")
+    public Integer queryPieRecordAll() {
+        return urlService.queryPieRecordAll();
+    }
+
     @GetMapping("analysis/pie")
     public VideoAnalysisPieDTO queryPieRecord(Integer type) {
         return urlService.queryPieRecord(type);

+ 2 - 0
video/src/main/java/cn/com/taiji/video/mapper/HtDpVideoAnalysisMapper.java

@@ -16,6 +16,8 @@ import java.util.List;
 @Mapper
 public interface HtDpVideoAnalysisMapper extends BaseMapper<HtDpVideoAnalysis> {
 
+    Integer selectAllFilter();
+
     List<AnalysisDTO> selectFilter(@Param("year") String year, @Param("yearMonth") String yearMonth);
 
     List<VideoAnalysisLineDTO> selecttotal(@Param("year") String year, @Param("yearMonth") String yearMonth);

+ 8 - 0
video/src/main/java/cn/com/taiji/video/mapper/HtDpVideoMapper.java

@@ -2,6 +2,7 @@ package cn.com.taiji.video.mapper;
 
 import cn.com.taiji.video.model.HtDpVideo;
 import cn.com.taiji.video.model.VideoDTO;
+import cn.com.taiji.video.model.VideoRecord;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 
@@ -23,4 +24,11 @@ public interface HtDpVideoMapper extends BaseMapper<HtDpVideo> {
      */
     List<VideoDTO> selectVideoList();
 
+    /**
+     * 查询视频记录列表
+     *
+     * @return 视频记录集合
+     */
+    List<VideoRecord> selectVideoRecord();
+
 }

+ 2 - 0
video/src/main/java/cn/com/taiji/video/service/IHtDpVideoAnalysisService.java

@@ -14,6 +14,8 @@ import java.util.List;
  */
 public interface IHtDpVideoAnalysisService extends IService<HtDpVideoAnalysis> {
 
+    Integer queryAllFilter();
+
     List<AnalysisDTO> queryFilter(String year, String yearMonth);
 
     List<VideoAnalysisLineDTO> querytotal(String year, String yearMonth);

+ 13 - 0
video/src/main/java/cn/com/taiji/video/service/IVideoUrlService.java

@@ -4,6 +4,7 @@ package cn.com.taiji.video.service;
 import cn.com.taiji.video.model.VideoAnalysisLineDTO;
 import cn.com.taiji.video.model.VideoAnalysisPieDTO;
 import cn.com.taiji.video.model.VideoDTO;
+import cn.com.taiji.video.model.VideoRecord;
 
 import java.time.LocalDate;
 import java.util.List;
@@ -30,6 +31,12 @@ public interface IVideoUrlService {
 
     /**
      * 查询视频记录
+     * @return List<VideoRecord>
+     */
+    List<VideoRecord> queryVideoRecord();
+
+    /**
+     * 查询视频记录
      * @param type 类型
      * @param startDate 开始日期
      * @param endDate 结束日期
@@ -38,6 +45,12 @@ public interface IVideoUrlService {
 
     /**
      * 查询视频记录
+     * @return VideoAnalysisDTO
+     */
+    Integer queryPieRecordAll();
+
+    /**
+     * 查询视频记录
      * @param type 类型
      * @return VideoAnalysisDTO
      */

+ 5 - 0
video/src/main/java/cn/com/taiji/video/service/impl/HtDpVideoAnalysisServiceImpl.java

@@ -21,6 +21,11 @@ public class HtDpVideoAnalysisServiceImpl extends ServiceImpl<HtDpVideoAnalysisM
     private HtDpVideoAnalysisMapper videoAnalysisMapper;
 
     @Override
+    public Integer queryAllFilter() {
+        return videoAnalysisMapper.selectAllFilter();
+    }
+
+    @Override
     public List<AnalysisDTO> queryFilter(String year, String yearMonth) {
         return videoAnalysisMapper.selectFilter(year,yearMonth);
     }

+ 10 - 0
video/src/main/java/cn/com/taiji/video/service/impl/VideoUrlServiceImpl.java

@@ -119,6 +119,11 @@ public class VideoUrlServiceImpl implements IVideoUrlService {
     }
 
     @Override
+    public List<VideoRecord> queryVideoRecord() {
+        return videoMapper.selectVideoRecord();
+    }
+
+    @Override
     public void queryTestPie(Integer type, LocalDate startDate, LocalDate endDate) {
         DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM");
         ArtemisConfig.host=analysisUrl;
@@ -172,6 +177,11 @@ public class VideoUrlServiceImpl implements IVideoUrlService {
     }
 
     @Override
+    public Integer queryPieRecordAll() {
+        return videoAnalysisService.queryAllFilter();
+    }
+
+    @Override
     public VideoAnalysisPieDTO queryPieRecord(Integer type) {
         LocalDate localDate = LocalDate.now();
         String year = String.valueOf(localDate.getYear());

+ 3 - 1
video/src/main/resources/mapper/HtDpVideoAnalysisMapper.xml

@@ -3,7 +3,9 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.taiji.video.mapper.HtDpVideoAnalysisMapper">
-
+    <select id="selectAllFilter" resultType="Integer">
+        SELECT ifnull(sum(pic_analysis_total),0) AS count FROM `ht_dp_video_analysis
+    </select>
     <select id="selectFilter" resultType="AnalysisDTO">
         SELECT type,sum(pic_analysis_total) AS count FROM `ht_dp_video_analysis`
         <where>

+ 5 - 0
video/src/main/resources/mapper/HtDpVideoMapper.xml

@@ -42,4 +42,9 @@
         order by sort
     </select>
 
+    <select id="selectVideoRecord" resultType="VideoRecord">
+        select area_name,area_type,code,name,sort from ht_dp_video_record
+        order by sort
+    </select>
+
 </mapper>