Bläddra i källkod

fix:历史消息排序修改

duxin 2 år sedan
förälder
incheckning
dae869bed3
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. 4 4
      service/message_mail_box.go

+ 4 - 4
service/message_mail_box.go

@@ -670,7 +670,7 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
 			"AND  a.type IN ( 2, 6 )  %s "+
 			"AND a.chat_group_id IS null "+
 			"AND a.send_user_type = a.receive_user_type "+
-			"ORDER BY a.create_time desc,a.id asc "+
+			"ORDER BY a.id desc "+
 			"limit 0 ,  %d ",
 			util.SOCIALIZE_MESSAGE_MAILBOX, util.SOCIALIZE_MESSAGE, util.BASE_USER, util.BASE_USER,
 			in.PositionId, in.PositionId, in.SendId, in.SendId, in.PositionId, lastStr, in.PageSize)
@@ -684,7 +684,7 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
 			"LEFT JOIN %s b ON a.messag_id = b.id "+
 			"WHERE a.own_type = 2  and a.iswithdraw = 0 AND a.own_id = %d "+
 			"AND a.chat_group_id = %d AND a.type IN ( 3, 6 )  %s "+
-			"ORDER BY a.create_time desc,a.id DESC "+
+			"ORDER BY a.id DESC "+
 			"LIMIT 0, %d",
 			util.SOCIALIZE_MESSAGE_MAILBOX, util.SOCIALIZE_MESSAGE, in.PositionId,
 			in.ChatGroupId, lastStr, in.PageSize)
@@ -702,7 +702,7 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
 				"AND c.ent_id =   %d "+
 				"AND c.user_id =   %d  %s "+
 				"AND a.send_user_type != a.receive_user_type "+
-				"ORDER BY a.create_time desc ,a.id asc "+
+				"ORDER BY a.id desc "+
 				"limit 0 ,  %d ",
 				util.SOCIALIZE_MESSAGE_MAILBOX, util.SOCIALIZE_MESSAGE, util.SOCIALIZE_CHAT_SESSION,
 				in.EntId, in.SendId, lastStr, in.PageSize)
@@ -720,7 +720,7 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
 				"AND c.user_id =  %d "+
 				"AND a.send_user_type != a.receive_user_type "+
 				"AND ( a.type = 4 OR a.type = 5 or a.type=6 or  a.type=7 or  a.type=8)  %s "+
-				"ORDER BY a.create_time  desc,a.id   asc "+
+				"ORDER BY a.id  desc "+
 				"limit 0 ,   %d ",
 				util.SOCIALIZE_MESSAGE_MAILBOX, util.SOCIALIZE_MESSAGE, util.SOCIALIZE_CHAT_SESSION, in.SendId, in.NewUserId, util.SOCIALIZE_TENANT_ROBOT, util.SOCIALIZE_APPRAISE,
 				in.NewUserId, in.SendId, in.NewUserId, lastStr, in.PageSize)