Browse Source

fix:问答点赞、吐槽的话,需要变更来源

Roc 2 years ago
parent
commit
95f92b506d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      logic/yb_community_question/yb_community_question_like_tease.go

+ 2 - 1
logic/yb_community_question/yb_community_question_like_tease.go

@@ -60,8 +60,9 @@ func SetLikeOrTease(userId uint64, communityQuestionId uint32, opType, enable, s
 	} else {
 		ybCommunityQuestionLikeTease.OpType = opType
 		ybCommunityQuestionLikeTease.Enabled = enable
+		ybCommunityQuestionLikeTease.SourceAgent = sourceAgent
 		ybCommunityQuestionLikeTease.ModifyTime = now
-		updates := []string{"op_type", "enabled", "modify_time"}
+		updates := []string{"op_type", "enabled", "source_agent", "modify_time"}
 		err = ybCommunityQuestionLikeTease.Update(updates)
 		if err != nil {
 			errMsg = "更新点赞记录出错"