Browse Source

fix:历史消息问题修改

duxin 2 years ago
parent
commit
714a711e17
1 changed files with 3 additions and 3 deletions
  1. 3 3
      service/message_mail_box.go

+ 3 - 3
service/message_mail_box.go

@@ -579,7 +579,7 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
 			"where  a.own_id=  %d and a.iswithdraw = 0"+
 			"AND ((a.send_user_id=   %d AND   a.receive_user_id=   %d) or (a.send_user_id=  %d AND  a.receive_user_id=  %d)) "+
 			"AND  a.type=2  %s "+
-			"ORDER BY a.create_time ,a.id   desc "+
+			"ORDER BY a.create_time desc,a.id   asc "+
 			"limit 0 ,  %d ",
 			util.SOCIALIZE_MESSAGE_MAILBOX, util.SOCIALIZE_MESSAGE, util.BASE_USER, util.BASE_USER,
 			in.NewUserId, in.NewUserId, in.SendId, in.SendId, in.NewUserId, lastStr, in.PageSize)
@@ -595,7 +595,7 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
 				"AND (a.type = 5 or a.type=4 or a.type=6 or  a.type=7 or a.type=8 )   "+
 				"AND c.ent_id =   %d "+
 				"AND c.user_id =   %d  %s "+
-				"ORDER BY a.create_time ,a.id desc "+
+				"ORDER BY a.create_time desc ,a.id asc "+
 				"limit 0 ,  %d ",
 				util.SOCIALIZE_MESSAGE_MAILBOX, util.SOCIALIZE_MESSAGE, util.SOCIALIZE_CHAT_SESSION,
 				in.EntId, in.SendId, lastStr, in.PageSize)
@@ -612,7 +612,7 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
 				"AND  c.ent_id = %d "+
 				"AND c.user_id =  %d "+
 				"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  ,a.id   desc "+
+				"ORDER BY a.create_time  desc,a.id   asc "+
 				"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)