change 3 år sedan
förälder
incheckning
ffe8f95e17

+ 4 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/polyv/service/impl/PolyvVideoServiceImpl.java

@@ -330,7 +330,7 @@ public class PolyvVideoServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVi
         Object total = jsonObject.get("total");
         List<PolyvVideoVo> list=jsonArray.toJavaList(PolyvVideoVo.class);
         //视频更新到数据库
-        if (CollectionUtils.isEmpty(list)) {
+        if (!CollectionUtils.isEmpty(list)) {
             for (PolyvVideoVo polyvVideoVo : list) {
                 CourseStreamingQueryBo courseStreamingQueryBo = new CourseStreamingQueryBo();
                 courseStreamingQueryBo.setRecordingVideoId(polyvVideoVo.getVid());
@@ -365,7 +365,9 @@ public class PolyvVideoServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVi
         }
         TableDataInfo tableDataInfo = new TableDataInfo();
         tableDataInfo.setRows(list);
-        tableDataInfo.setTotal(Convert.toLong(total));
+        if (total != null) {
+            tableDataInfo.setTotal(Convert.toLong(total));
+        }
         tableDataInfo.setCode(200);
         tableDataInfo.setMsg("请求正常");
         return tableDataInfo;