From aed297a5fbc8df9dab01b28da21f872ee546b43c Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 13 十月 2025 16:15:11 +0800
Subject: [PATCH] 2025.10.13 1. 统一调整controller层的返回类型,通过添加全局响应增强器GlobalResponseAdvice来管理返回结果; 2. 新增mybatis-generator自定义插件,实现给数据库实体entity自动添加swagger注解@ApiModel和@ApiModelProperty
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt
index 4081cf9..927627b 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt
@@ -10,6 +10,7 @@
import cn.flightfeather.supervision.domain.ds1.repository.MediaFileRep
import cn.flightfeather.supervision.domain.ds1.repository.SceneRep
import cn.flightfeather.supervision.domain.ds1.repository.SubTaskRep
+import cn.flightfeather.supervision.lightshare.service.DomainitemService
import cn.flightfeather.supervision.lightshare.service.MediafileService
import cn.flightfeather.supervision.lightshare.vo.MediaFileVo
import com.fasterxml.jackson.core.type.TypeReference
@@ -30,6 +31,7 @@
private val inspectionRep: InspectionRep,
private val subTaskRep: SubTaskRep,
private val sceneRep: SceneRep,
+ private val domainItemService: DomainitemService,
@Value("\${filePath}") var filePath: String,
@Value("\${imgPath}") var imgPath: String,
) : MediafileService {
@@ -63,8 +65,8 @@
throw BizException("宸℃煡璁板綍id鍜屽贰鏌ヤ换鍔d鑷冲皯濉啓鍏朵腑涓�涓�")
}
sceneId ?: throw BizException("璁板綍瀵瑰簲鐨勫満鏅笉瀛樺湪")
- val sceneInfo = sceneRep.findScene(sceneId = sceneId)
- val mediaFileTypeList = Constant.MediaFileType.getList(sceneInfo?.typeid).map { it.value }
+ val sceneInfo = sceneRep.findScene(sceneId = sceneId) ?: throw BizException("鍦烘櫙涓嶅瓨鍦紝鑾峰彇鍦烘櫙鍥剧墖澶辫触")
+ val mediaFileTypeList = domainItemService.getMediaFileType(sceneInfo.typeid?.toInt()).entries.map { it.key?.toInt() }
return mediaFileRep.findList(inspectionGuid, mediaFileTypeList)
}
--
Gitblit v1.9.3