|
@@ -317,7 +317,6 @@ func DeleteReport(reportIds int) (err error) {
|
|
|
}
|
|
|
|
|
|
type ReportDetail struct {
|
|
|
- gorm.Model
|
|
|
Id int `gorm:"column:id;primary_key;autoIncrement" description:"报告Id"`
|
|
|
AddType int `gorm:"column:add_type" description:"新增方式:1:新增报告,2:继承报告"`
|
|
|
ClassifyIdFirst int `gorm:"column:classify_id_first" description:"一级分类id"`
|
|
@@ -662,7 +661,7 @@ func ModifyReportVideo(reportId int, videoUrl, videoName, videoSize string, play
|
|
|
// @return err error
|
|
|
func ModifyReportVideoByNoVideo(reportId int, videoUrl, videoName, videoSize string, playSeconds float64) (err error) {
|
|
|
//o := orm.NewOrmUsingDB("rddp")
|
|
|
- sql := `UPDATE report SET video_url=?,video_name=?,video_play_seconds=?,video_size=? WHERE id=? AND video_url=""`
|
|
|
+ sql := `UPDATE report SET video_url=?,video_name=?,video_play_seconds=?,video_size=? WHERE id=? AND video_url=''`
|
|
|
//_, err = o.Raw(sql, videoUrl, videoName, playSeconds, videoSize, reportId).Exec()
|
|
|
err = global.DmSQL["rddp"].Exec(sql, videoUrl, videoName, playSeconds, videoSize, reportId).Error
|
|
|
return
|
|
@@ -1051,7 +1050,7 @@ func UpdateReportPublishTime(reportId int, videoNameDate string) (err error) {
|
|
|
return
|
|
|
}
|
|
|
//修改音频标题
|
|
|
- sql2 := ` UPDATE report SET video_name=CONCAT(SUBSTRING_INDEX(video_name,"(",1),"` + videoNameDate + `") WHERE id = ? and (video_name !="" and video_name is not null)`
|
|
|
+ sql2 := ` UPDATE report SET video_name=CONCAT(SUBSTRING_INDEX(video_name,"(",1),"` + videoNameDate + `") WHERE id = ? and (video_name !='' and video_name is not null)`
|
|
|
//_, err = o.Raw(sql2, reportId).Exec()
|
|
|
err = global.DmSQL["rddp"].Exec(sql2, reportId).Error
|
|
|
return
|
|
@@ -1066,7 +1065,7 @@ func UpdateReportChapterPublishTime(reportId int, videoNameDate string) (err err
|
|
|
return
|
|
|
}
|
|
|
//修改音频标题
|
|
|
- sql2 := ` UPDATE report_chapter SET video_name=CONCAT(SUBSTRING_INDEX(video_name,"(",1),"` + videoNameDate + `") WHERE report_id = ? and (video_name !="" and video_name is not null)`
|
|
|
+ sql2 := ` UPDATE report_chapter SET video_name=CONCAT(SUBSTRING_INDEX(video_name,"(",1),"` + videoNameDate + `") WHERE report_id = ? and (video_name !='' and video_name is not null)`
|
|
|
//_, err = o.Raw(sql2, reportId).Exec()
|
|
|
err = global.DmSQL["rddp"].Exec(sql2, reportId).Error
|
|
|
return
|