调度定时把文件上传到minio , 播放基于minio
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
package com.rj.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.rj.entity.AudioManagementSegments;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -12,5 +18,20 @@ import com.rj.entity.AudioManagementSegments;
|
||||
*/
|
||||
public interface AudioManagementSegmentsMapper extends BaseMapper<AudioManagementSegments> {
|
||||
|
||||
}
|
||||
/**
|
||||
* 本地路径已填、MinIO URL 未填的分段。使用注解 SQL,避免 Lambda 条件生成 audio_file_url / audio_file_path 的多余占位符,
|
||||
* 并在此方法上关闭租户行插件(否则会出现 tenant_id = null 等错误条件)。
|
||||
*/
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
@Select("SELECT * FROM audio_management_segments WHERE (audio_file_url IS NULL OR audio_file_url = '') "
|
||||
+ "AND audio_file_path IS NOT NULL AND audio_file_path <> '' "
|
||||
+ "ORDER BY create_time ASC LIMIT #{limit}")
|
||||
List<AudioManagementSegments> listSegmentsNeedingMinioUpload(@Param("limit") int limit);
|
||||
|
||||
/**
|
||||
* 仅按主键更新 MinIO URL,不拼接 tenant_id(供调度任务等无租户上下文场景使用)。
|
||||
*/
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
@Update("UPDATE audio_management_segments SET audio_file_url = #{audioFileUrl} WHERE id = #{id}")
|
||||
int updateAudioFileUrlByIdIgnoreTenant(@Param("id") String id, @Param("audioFileUrl") String audioFileUrl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user