|
@@ -113,10 +113,10 @@ type CygxMicroRoadshowVideoHistory struct {
|
|
|
ModifyTime time.Time `description:"视频修改时间"`
|
|
|
}
|
|
|
|
|
|
-func GetLastCygxMicroRoadshowVideoHistory(videoId int) (item *CygxMicroRoadshowVideoHistory, err error) {
|
|
|
+func GetLastCygxMicroRoadshowVideoHistory(videoId, userId int) (item *CygxMicroRoadshowVideoHistory, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
- sql := ` SELECT * FROM cygx_micro_roadshow_video_history WHERE video_id=? ORDER BY create_time DESC limit 1 `
|
|
|
- err = o.Raw(sql, videoId).QueryRow(&item)
|
|
|
+ sql := ` SELECT * FROM cygx_micro_roadshow_video_history WHERE video_id=? AND user_id=? ORDER BY create_time DESC limit 1 `
|
|
|
+ err = o.Raw(sql, videoId, userId).QueryRow(&item)
|
|
|
return
|
|
|
}
|
|
|
|