Browse Source

机器人信息不算未读处理

WH01243 2 years ago
parent
commit
7290c315ef
1 changed files with 6 additions and 1 deletions
  1. 6 1
      service/message_mail_box.go

+ 6 - 1
service/message_mail_box.go

@@ -608,7 +608,12 @@ func UserSynchronousList(customerServiceId, userId, entId, messageId int64, crea
 		//更新汇总表
 		ok := int64(0)
 		if sendUserType == 1 {
-			ok = IC.BaseMysql.UpdateOrDeleteBySql(fmt.Sprintf("UPDATE  socialize_summary SET message_id = %d, unread = unread+1, customer_service_access = %d WHERE user_id = %d and ent_id= %d", messageId, customer_service_access, userId, entId))
+			if itemType == 4 {
+				//机器人消息保存处理
+				ok = IC.BaseMysql.UpdateOrDeleteBySql(fmt.Sprintf("UPDATE  socialize_summary SET message_id = %d  WHERE user_id = %d and ent_id= %d", messageId, customer_service_access, userId, entId))
+			} else {
+				ok = IC.BaseMysql.UpdateOrDeleteBySql(fmt.Sprintf("UPDATE  socialize_summary SET message_id = %d, unread = unread+1, customer_service_access = %d WHERE user_id = %d and ent_id= %d", messageId, customer_service_access, userId, entId))
+			}
 		} else {
 			ok = IC.BaseMysql.UpdateOrDeleteBySql(fmt.Sprintf("UPDATE  socialize_summary SET message_id = %d, customer_service_access = %d WHERE user_id = %d and ent_id= %d", messageId, customer_service_access, userId, entId))
 		}