|
@@ -29,14 +29,14 @@ func AddCygxReportSelectionVoiceHistory(item *CygxReportSelectionVoiceHistory) (
|
|
|
|
|
|
func GetLastCygxReportSelectionVoiceHistory(articleId, userId int) (item *CygxReportSelectionVoiceHistory, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
- sql := ` SELECT * FROM cygx_report_selction_voice_history WHERE article_id=? AND user_id=? ORDER BY create_time DESC limit 1 `
|
|
|
+ sql := ` SELECT * FROM cygx_report_selection_voice_history WHERE article_id=? AND user_id=? ORDER BY create_time DESC limit 1 `
|
|
|
err = o.Raw(sql, articleId, userId).QueryRow(&item)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
func UpdateLastCygxReportSelectionVoiceHistory(playSeconds string, lastId int) (err error) {
|
|
|
o := orm.NewOrm()
|
|
|
- sql := ` UPDATE cygx_report_selction_voice_history SET play_seconds =? WHERE id=? `
|
|
|
+ sql := ` UPDATE cygx_report_selection_voice_history SET play_seconds =? WHERE id=? `
|
|
|
_, err = o.Raw(sql, playSeconds, lastId).Exec()
|
|
|
return
|
|
|
}
|