feiyu02
2024-09-10 6c7f45871b93ef26d353a5a3596701ac2f39ed9c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package cn.flightfeather.supervision.domain.ds1.repository
 
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.domain.ds1.entity.Mediafile
import cn.flightfeather.supervision.domain.ds1.mapper.MediafileMapper
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Repository
import tk.mybatis.mapper.entity.Example
import java.io.File
 
/**
 * 多媒体文件数据库操作
 * @date 2024/9/10
 * @author feiyu02
 */
@Repository
class MediaFileRep(private val mediaFileMapper: MediafileMapper, @Value("\${imgPath}") var imgPath: String,) {
 
    fun deleteOne(guid: String?): Int {
        return mediaFileMapper.deleteByPrimaryKey(guid)
    }
 
    fun findList(idList: List<String>): List<Mediafile?> {
        return mediaFileMapper.selectByExample(Example(Mediafile::class.java).apply {
            createCriteria().andIn("guid", idList)
        })
    }
}