浏览代码

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

Roc 2 年之前
父节点
当前提交
95f92b506d
共有 1 个文件被更改,包括 2 次插入1 次删除
  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 = "更新点赞记录出错"