军团&好友:推荐列表做一下乱序
This commit is contained in:
@@ -44,7 +44,7 @@ export default class FriendApply extends BaseModel {
|
||||
|
||||
// 获取自己发出的申请列表
|
||||
public static async getSentApplyList(roleId: string, time: Date) {
|
||||
const list: FriendApplyType[] = await FriendApplyModel.find({ frdRoleId: roleId, createdAt: { $gt: time } }, { _id: 0 })
|
||||
const list: FriendApplyType[] = await FriendApplyModel.find({ frdRoleId: roleId, updatedAt: { $gt: time } }, { _id: 0 })
|
||||
.lean({ getters: true });
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@ export default class Role extends BaseModel {
|
||||
*/
|
||||
public static async getInviteList(time: number, serverId: number) {
|
||||
const result = await RoleModel.find({ loginTime: { $gt: time }, hasGuild: false, serverId })
|
||||
.select('roleId roleName ce headHid sHid lv title job quitTime')
|
||||
.select({roleId: 1, roleName: 1,ce: 1,headHid: 1,sHid: 1,lv: 1,title: 1,job: 1,quitTime: 1, _id: 0})
|
||||
.sort({quitTime: -1, lv: -1, ce: -1})
|
||||
.limit(100).lean({getters: true});
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user