diff --git a/main_program/service/SrtFileService.go b/main_program/service/SrtFileService.go index 2e02865..c31d1d6 100644 --- a/main_program/service/SrtFileService.go +++ b/main_program/service/SrtFileService.go @@ -35,7 +35,7 @@ func (srt *srtFileService) QuerySrtFilesByVideoId(videoId string) (srtFiles []en func (srt *srtFileService) QueryOneNotScanVideoIdByRegion(region string) (videoId string, err error) { var srtFile entity.Srtfile - sqlStr := "SELECT Srtfile.* FROM Srtfile JOIN Videos ON Srtfile.videoId = Videos.videoId JOIN Channel ON Videos.channelId = Channel.channelId WHERE Channel.region = ? and Srtfile.isScan = 0;" + sqlStr := "SELECT Srtfile.* FROM Srtfile JOIN Videos ON Srtfile.videoId = Videos.videoId JOIN Channel ON Videos.channelId = Channel.channelId WHERE Channel.region = ? and Srtfile.isScan = 0 limit 1;" result := common.MysqlDB.Raw(sqlStr, region).First(&srtFile) if result.Error != nil { return "", errors.New("no srtFile")