|
@@ -20,6 +20,7 @@ import org.springblade.business.feign.OperationLogClient;
|
|
|
import org.springblade.business.feign.RecycleBinClient;
|
|
|
import org.springblade.business.service.ImageClassificationShowService;
|
|
|
import org.springblade.business.utils.FileUtils;
|
|
|
+import org.springblade.business.utils.VideoFrameExtractor;
|
|
|
import org.springblade.business.vo.ImageClassificationShowVO;
|
|
|
import org.springblade.business.vo.TreeVo;
|
|
|
import org.springblade.common.utils.CommonUtil;
|
|
@@ -484,7 +485,11 @@ public class ImageClassificationFileController extends BladeController {
|
|
|
}
|
|
|
|
|
|
//获取当前节点下的文件
|
|
|
- Integer count = this.imageClassificationFileService.queryCurrentClassifyAllFileCount(projectId, contractId, vo.getId());
|
|
|
+ String type = "1";
|
|
|
+ if (vo.getId().toString().equals("1526085356632051714") || vo.getId().toString().equals("1526085256795033601")) {
|
|
|
+ type = "2";
|
|
|
+ }
|
|
|
+ Integer count = this.imageClassificationFileService.queryCurrentClassifyAllFileCount(projectId, contractId, vo.getId(), type);
|
|
|
vo.setCount(count);
|
|
|
|
|
|
});
|
|
@@ -530,7 +535,7 @@ public class ImageClassificationFileController extends BladeController {
|
|
|
@ApiImplicitParam(name = "staDate", value = "开始时间"),
|
|
|
@ApiImplicitParam(name = "endDate", value = "结束时间")
|
|
|
})
|
|
|
- public R<Object> page(ImageClassificationFileVO fileVO, Query query) {
|
|
|
+ public R<Object> page(ImageClassificationFileVO fileVO, Query query) throws Exception {
|
|
|
IPage<ImageClassificationFileVO> page = this.imageClassificationFileService.selectImageClassificationFilePage(Condition.getPage(query), fileVO);
|
|
|
List<ImageClassificationFileVO> sortedRecords = page.getRecords().stream()
|
|
|
.filter(vos -> vos.getCreateTime() != null)//过滤掉创建时间为null的记录
|
|
@@ -553,6 +558,14 @@ public class ImageClassificationFileController extends BladeController {
|
|
|
List<ImageClassificationFileVO> value = stringObjectEntry.getValue();
|
|
|
Map<String, Object> stringObjectMap = new HashMap<>();
|
|
|
stringObjectMap.put("name", date);
|
|
|
+
|
|
|
+ for (ImageClassificationFileVO vo : value) {
|
|
|
+ if (StringUtils.isNotEmpty(vo.getImageUrl()) && isVideoUrl(vo.getImageUrl()) && StringUtils.isEmpty(vo.getVideoCoverUrl())) {
|
|
|
+ //设置默认视频封面logo
|
|
|
+ vo.setVideoCoverUrl("https://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload/20230904/b86888a3fcd280d56053639dbfddb35d.jpg");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
stringObjectMap.put("child", value);
|
|
|
list.add(stringObjectMap);
|
|
|
}
|
|
@@ -560,7 +573,18 @@ public class ImageClassificationFileController extends BladeController {
|
|
|
}
|
|
|
page.setRecords(sortedRecords);
|
|
|
return R.data(page);
|
|
|
+ }
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据Url地址后缀判断是否为视频地址
|
|
|
+ */
|
|
|
+ public static boolean isVideoUrl(String url) {
|
|
|
+ String lowercaseUrl = url.toLowerCase(); //将URL转换为小写,以便不区分大小写
|
|
|
+ return lowercaseUrl.endsWith(".mp4") || lowercaseUrl.endsWith(".avi") || lowercaseUrl.endsWith(".mov")
|
|
|
+ || lowercaseUrl.endsWith(".wmv") || lowercaseUrl.endsWith(".mkv") || lowercaseUrl.endsWith(".flv")
|
|
|
+ || lowercaseUrl.endsWith(".3gp")
|
|
|
+ || lowercaseUrl.endsWith(".m4v")
|
|
|
+ || lowercaseUrl.endsWith(".webm");
|
|
|
}
|
|
|
|
|
|
/**
|