浏览代码

Merge branch 'feature/v1.2.6' into dev/v1.2.6_rjj

renjiaojiao 2 年之前
父节点
当前提交
6e967f6be2
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      service/message_mail_box.go

+ 4 - 4
service/message_mail_box.go

@@ -130,7 +130,7 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 							c.nickname AS name,
 							c.headimg,
 							d.content,
-							d.type 
+							d.type, 
 							d.create_time,
 							a.unread as number,
 						    a.timestamp,
@@ -141,7 +141,7 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 							INNER JOIN base_position b ON ( a.my_position_id = %d %s  AND a.your_position_id = b.id )
 							INNER JOIN base_user c ON ( b.user_id = c.id )
 							LEFT JOIN socialize_message d ON ( a.message_id = d.id )
-							LIMIT 0,500
+							ORDER BY a.timestamp DESC LIMIT 0,500
 						)`, in.PositionId, oneNameSql)
 		}
 
@@ -163,7 +163,7 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 							socialize_summary a
 							INNER JOIN socialize_tenant_robot b ON ( a.user_id = %d AND a.ent_id = b.ent_id %s )
 							LEFT JOIN socialize_message c ON ( a.message_id = c.id ) 
-						LIMIT 0,500
+						ORDER BY a.timestamp DESC LIMIT 0,500
 						) `, in.NewUserId, serviceNameSql)
 		//群列表
 		groupSql := fmt.Sprintf(` (
@@ -184,7 +184,7 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 							INNER JOIN %s b ON ( a.position_id = %d AND a.chat_group_id = b.id)
 							INNER JOIN socialize_summary c ON ( b.id = c.chat_group_id )
 							LEFT JOIN socialize_message d ON ( c.message_id = d.id ) 
-						LIMIT 0,500
+						ORDER BY c.timestamp DESC LIMIT 0,500
 						) `, GroupNameSql, in.PositionId)
 		switch in.QueryType {
 		case 1: //分享列表