|
@@ -395,9 +395,10 @@ func HandleCommentByCommunityQuestionItemList(userId uint64, questionList []*res
|
|
|
// messageToAdmin 添加站内消息
|
|
|
func messageToAdmin(wxUser user.UserInfo, communityQuestionComment *yb_community_question_comment.YbCommunityQuestionComment) {
|
|
|
var err error
|
|
|
-
|
|
|
defer func() {
|
|
|
- go alarm_msg.SendAlarmMsg("新增问答评论信息完成后,发送消息给管理员失败"+time.Now().Format("2006-01-02 15:04:05")+";Err:"+err.Error(), 3)
|
|
|
+ if err != nil {
|
|
|
+ go alarm_msg.SendAlarmMsg("新增问答评论信息完成后,发送消息给管理员失败"+time.Now().Format("2006-01-02 15:04:05")+";Err:"+err.Error(), 3)
|
|
|
+ }
|
|
|
}()
|
|
|
|
|
|
//因为产品说只要给沛总发送信息,那么没办法咯,只去获取沛总的信息 2022-07-19 11:29:16
|
|
@@ -417,7 +418,9 @@ func messageToAdmin(wxUser user.UserInfo, communityQuestionComment *yb_community
|
|
|
func systemMessageToAdmin(adminInfo admin.Admin, wxUser user.UserInfo, communityQuestionComment *yb_community_question_comment.YbCommunityQuestionComment) {
|
|
|
var err error
|
|
|
defer func() {
|
|
|
- go alarm_msg.SendAlarmMsg("新增问答评论信息完成后,站内评论信息发送给管理员失败"+time.Now().Format("2006-01-02 15:04:05")+";Err:"+err.Error(), 3)
|
|
|
+ if err != nil {
|
|
|
+ go alarm_msg.SendAlarmMsg("新增问答评论信息完成后,站内评论信息发送给管理员失败"+time.Now().Format("2006-01-02 15:04:05")+";Err:"+err.Error(), 3)
|
|
|
+ }
|
|
|
}()
|
|
|
// 接收人的admin_id
|
|
|
receiveUserId := int(adminInfo.AdminID)
|
|
@@ -459,9 +462,10 @@ func systemMessageToAdmin(adminInfo admin.Admin, wxUser user.UserInfo, community
|
|
|
// wxMessageToAdmin 微信模板消息通知管理员
|
|
|
func wxMessageToAdmin(adminInfo admin.Admin, communityQuestionComment *yb_community_question_comment.YbCommunityQuestionComment) {
|
|
|
var err error
|
|
|
-
|
|
|
defer func() {
|
|
|
- go alarm_msg.SendAlarmMsg("新增问答评论信息完成后,微信模板消息发送给管理员失败"+time.Now().Format("2006-01-02 15:04:05")+";Err:"+err.Error(), 3)
|
|
|
+ if err != nil {
|
|
|
+ go alarm_msg.SendAlarmMsg("新增问答评论信息完成后,微信模板消息发送给管理员失败"+time.Now().Format("2006-01-02 15:04:05")+";Err:"+err.Error(), 3)
|
|
|
+ }
|
|
|
}()
|
|
|
|
|
|
if global.CONFIG.Serve.RunMode == "debug" {
|
|
@@ -480,7 +484,9 @@ func wxMessageToAdmin(adminInfo admin.Admin, communityQuestionComment *yb_commun
|
|
|
func afterDelete(communityQuestionComment *yb_community_question_comment.YbCommunityQuestionComment) {
|
|
|
var err error
|
|
|
defer func() {
|
|
|
- go alarm_msg.SendAlarmMsg("问答评论信息删除后,标记站内消息失败"+time.Now().Format("2006-01-02 15:04:05")+";Err:"+err.Error(), 3)
|
|
|
+ if err != nil {
|
|
|
+ go alarm_msg.SendAlarmMsg("问答评论信息删除后,标记站内消息失败"+time.Now().Format("2006-01-02 15:04:05")+";Err:"+err.Error(), 3)
|
|
|
+ }
|
|
|
}()
|
|
|
err = company_approval_message.CancelCompanyApprovalMessage(int(communityQuestionComment.CommunityQuestionCommentID), company_approval_message.CompanyApprovalMessageSourceTypeByQuestionComment)
|
|
|
return
|