فهرست منبع

fix:撤回消息信息修改

duxin 2 سال پیش
والد
کامیت
22a9fbfc67
1فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 5 2
      service/message_mail_box.go

+ 5 - 2
service/message_mail_box.go

@@ -655,7 +655,10 @@ func (b MessaggeService) UpdateReadById(in *messagecenter.ReadStateReq) bool {
 func (b MessaggeService) WithdrawMessage(in *messagecenter.ReadWithdrawReq) bool {
 	messageId := encrypt.SE.Decode4Hex(in.MessageId)
 	nowForm := time.Now().Local()
-	b.Count(in.NewUserId, in.UserType, in.EntUserId, true)
-	return util.Mysql.Update(util.SOCIALIZE_MESSAGE_MAILBOX,
+	m := util.Mysql.Update(util.SOCIALIZE_MESSAGE_MAILBOX,
 		map[string]interface{}{"messag_id": messageId}, map[string]interface{}{"iswithdraw": 1, "withdraw_time": nowForm.Format(util.Date_Full_Layout)})
+	if m {
+		b.Count(in.NewUserId, in.UserType, in.EntUserId, true)
+	}
+	return m
 }