hcst_sunzhen 5 лет назад
Родитель
Сommit
6943db9400

+ 20 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/PerformanceController2.java

@@ -535,6 +535,26 @@ public class PerformanceController2 {
         return result;
     }
 
+    @AutoLog(value = "获取本周相关有效视频列表")
+    @ApiOperation(value = "获取本周相关有效视频列表", notes = "获取本周相关有效视频列表")
+    @PostMapping(value = "/getWeekEffiVideoList")
+    public Result<List<MaterialInfo>> getWeekEffiVideoList(@RequestBody PerformanceTimeDTO dto,
+                                                       HttpServletRequest req) {
+        Result<List<MaterialInfo>> result = new Result<>();
+        String userId = dto.getUserId();
+        String startDate = dto.getStartDate();
+        String endDate = dto.getEndDate();
+        Integer appType = dto.getAppType();
+        if(userId==null || appType == null){
+            result.setSuccess(false);
+            result.setMessage("userId和appType不能为空");
+        }
+        List<MaterialInfo> materialInfoList = performanceService.getEffiWeekVideoList(appType, startDate, endDate, userId);
+        result.setSuccess(true);
+        result.setResult(materialInfoList);
+        return result;
+    }
+
     //快手优化季度绩效报表
     //List<UserDto2> kuaishouYouhuaQuarterReport(Integer year, Integer quarter);
     @AutoLog(value = "快手优化季度绩效报表")

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IPerformanceService2.java

@@ -90,6 +90,8 @@ public interface IPerformanceService2 extends IService<Performance> {
     //获取有效视频列表
     List<MaterialInfo> effiVideoList(Integer appType, Integer year, Integer quarter, String userId);
 
+    List<MaterialInfo> getEffiWeekVideoList(Integer appType, String startDate, String endDate, String userId);
+
     //获取快手优化师绩效实时数据
     List<UserDto2> kuaishouYouhuaPerformanceInfoNow();
 

+ 8 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/PerformanceServiceImpl2.java

@@ -1963,6 +1963,14 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
         return materialInfoList;
     }
 
+    //根据userid,appType,年度,季度查询有效视频列表
+    public List<MaterialInfo> getEffiWeekVideoList(Integer appType, String startDate, String endDate, String userId){
+        List<MaterialInfo> materialInfoList = userEfficientVideoMapMapper.getEffiWeekVideoList(appType, startDate, endDate, userId);
+        return materialInfoList;
+    }
+
+
+
     //快手优化季度绩效报表
     //@Override
     public List<UserDto2> kuaishouYouhuaQuarterReport(Integer year, Integer quarter) {

+ 1 - 1
performance-appraisal/src/main/java/cn/com/ctop/userefficientvideomap/entity/PerformanceTimeDTO.java

@@ -7,7 +7,7 @@ import java.io.Serializable;
 
 @Data
 public class PerformanceTimeDTO implements Serializable {
-    private String StartDate;
+    private String startDate;
     private String endDate;
     private Integer year;
     private Integer quarter;

+ 1 - 0
performance-appraisal/src/main/java/cn/com/ctop/userefficientvideomap/mapper/UserEfficientVideoMapMapper.java

@@ -130,5 +130,6 @@ public interface UserEfficientVideoMapMapper extends BaseMapper<UserEfficientVid
 
 
 
+    List<MaterialInfo> getEffiWeekVideoList(@Param("appType")Integer appType, @Param("startDate")String startDate, @Param("endDate")String endDate, @Param("userId")String userId);
 }
 

+ 18 - 0
performance-appraisal/src/main/java/cn/com/ctop/userefficientvideomap/mapper/xml/UserEfficientVideoMapMapper.xml

@@ -889,4 +889,22 @@
         m.quarter = #{quarter}
     </select>
 
+    <!-- 视频周有效素材 -->
+    <select id="getEffiWeekVideoList" resultType="cn.com.ctop.common.module.entity.MaterialInfo">
+            select
+            i.id as id,
+            i.code as code,
+            i.url as url,
+            i.material_name as materialName,
+            i.watermark_material_name as watermarkMaterialName
+        from
+        ctop_user_efficient_video_map m
+        left join ctop_material_info i on m.efficient_video_signature = i.code
+        where
+        m.user_id = #{userId} and
+        m.app_type =#{appType} and
+        m.calc_date &lt;= #{endDate} and
+        m.calc_date &gt;= #{startDate}
+    </select>
+
 </mapper>