好友:当天申请过好友的不再在邀请列表显示

This commit is contained in:
luying
2021-02-23 15:51:40 +08:00
parent d140c66063
commit 92d223314b
2 changed files with 14 additions and 1 deletions
+7
View File
@@ -42,6 +42,13 @@ export default class FriendApply extends BaseModel {
return list;
}
// 获取自己发出的申请列表
public static async getSentApplyList(roleId: string, time: Date) {
const list: FriendApplyType[] = await FriendApplyModel.find({ frdRoleId: roleId, createdAt: { $gt: time } }, { _id: 0 })
.lean({ getters: true });
return list;
}
// 根据applyCode获得申请
public static async getApplyListByCode(applyCodeList: string[]) {
const list: FriendApplyType[] = await FriendApplyModel.find({ applyCode: { $in: applyCodeList } }, { _id: 0 })