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