|
@@ -4,8 +4,11 @@ import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
ybResponse "hongze/hongze_mobile_admin/models/response/yb"
|
|
|
+ "hongze/hongze_mobile_admin/models/tables/company_approval_message"
|
|
|
"hongze/hongze_mobile_admin/models/tables/wx_user"
|
|
|
"hongze/hongze_mobile_admin/models/tables/yb_community_question_comment"
|
|
|
+ "hongze/hongze_mobile_admin/services"
|
|
|
+ "hongze/hongze_mobile_admin/services/alarm_msg"
|
|
|
"hongze/hongze_mobile_admin/utils"
|
|
|
"strings"
|
|
|
"time"
|
|
@@ -96,6 +99,9 @@ func SoftDeleteQuestionComment(questionCommentId int) (err error, errMsg string)
|
|
|
if err != nil {
|
|
|
errMsg = "删除提问失败"
|
|
|
}
|
|
|
+
|
|
|
+ // 删除评论后的逻辑处理
|
|
|
+ go afterDeleteComment(questionCommentInfo)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -127,3 +133,15 @@ func SetHotQuestionComment(questionCommentId int) (err error, errMsg string) {
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// afterDeleteComment 删除评论后的逻辑处理
|
|
|
+func afterDeleteComment(communityQuestionComment *yb_community_question_comment.YbCommunityQuestionComment) {
|
|
|
+ var err error
|
|
|
+ defer func() {
|
|
|
+ if err != nil {
|
|
|
+ go alarm_msg.SendAlarmMsg("问答评论信息删除后,标记站内消息失败"+time.Now().Format(utils.FormatDateTime)+";Err:"+err.Error(), 3)
|
|
|
+ }
|
|
|
+ }()
|
|
|
+ err = company_approval_message.CancelCompanyApprovalMessage(int(communityQuestionComment.CommunityQuestionCommentId), services.CompanyApprovalMessageSourceTypeByQuestionComment)
|
|
|
+ return
|
|
|
+}
|