|
|
@@ -189,7 +189,7 @@ func (e *TaskConfService) DownloadFile(taskId int, md5String string) (info respo
|
|
|
//改由存储至数据库的时候拼接前缀
|
|
|
//var prefix string = global.GVA_CONFIG.PrefixUrl.PrefixLocal
|
|
|
//数据库中无记录,即不需要更新
|
|
|
- err = global.GVA_DB.Table("upload_file").Where("task_id = ? and state = 1", taskId).Order("id desc").Limit(1).Find(&file).Error
|
|
|
+ err = global.GVA_DB.Table("upload_file").Where("task_id = ? and state = 1", taskId).Order("id desc").First(&file).Error
|
|
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
|
|
info = response.DownloadFile{
|
|
|
Url: "",
|
|
|
@@ -205,6 +205,7 @@ func (e *TaskConfService) DownloadFile(taskId int, md5String string) (info respo
|
|
|
Md5String: "",
|
|
|
Flag: false,
|
|
|
}
|
|
|
+ return info, errors.New("不需要更新")
|
|
|
} else {
|
|
|
fullUrl := file.Url
|
|
|
info = response.DownloadFile{
|