Browse Source

Merge branch 'cygx_8.7' into debug

ziwen 2 years ago
parent
commit
4f36864877
2 changed files with 3 additions and 3 deletions
  1. 2 2
      controllers/activity.go
  2. 1 1
      models/article_collect.go

+ 2 - 2
controllers/activity.go

@@ -1061,13 +1061,13 @@ func (this *ActivityCoAntroller) Detail() {
 	collectCount1, err := models.GetActivityVoiceCollectCount(uid, activityId)
 	if err != nil && err.Error() != utils.ErrNoRow() {
 		br.Msg = "获取信息失败"
-		br.ErrMsg = "判断是否已收藏失败,Err:" + strconv.Itoa(uid) + ";articleId" + strconv.Itoa(activityId)
+		br.ErrMsg = "判断是否已收藏失败,Err:" + strconv.Itoa(uid) + ";activityId" + strconv.Itoa(activityId)
 		return
 	}
 	collectCount2, err := models.GetActivityVideoCollectCountByActivityId(uid, activityId)
 	if err != nil && err.Error() != utils.ErrNoRow() {
 		br.Msg = "获取信息失败"
-		br.ErrMsg = "判断是否已收藏失败,Err:" + strconv.Itoa(uid) + ";articleId" + strconv.Itoa(activityId)
+		br.ErrMsg = "判断是否已收藏失败,Err:" + strconv.Itoa(uid) + ";activityId" + strconv.Itoa(activityId)
 		return
 	}
 	if collectCount1+collectCount2 > 0 {

+ 1 - 1
models/article_collect.go

@@ -240,7 +240,7 @@ FROM
 WHERE
 	c.user_id =? 
 	AND vd.activity_id =? 
-	AND c.activity_voice_id = vd.activity_voice_id`
+	AND c.activity_video_id = vd.video_id`
 	err = orm.NewOrm().Raw(sql, userId, activityId,).QueryRow(&count)
 	return
 }