好友:一键申请提示

This commit is contained in:
luying
2021-02-02 19:47:57 +08:00
parent 5da98956b9
commit 1fb4e7b9be
12 changed files with 245 additions and 37 deletions

View File

@@ -37,7 +37,7 @@ export default class FriendApply extends BaseModel {
public static async getApplyList(roleId: string) {
const list: FriendApplyType[] = await FriendApplyModel.find({ roleId }, { _id: 0 })
// .select(select)
.populate('friend', ROLE.SHOW_SIMPLE, 'Role')
.populate('friend', ROLE.SHOW_FRIEND_APPLY_LIST, 'Role')
.lean({ getters: true });
return list;
}
@@ -46,7 +46,7 @@ export default class FriendApply extends BaseModel {
public static async getApplyListByCode(applyCodeList: string[]) {
const list: FriendApplyType[] = await FriendApplyModel.find({ applyCode: { $in: applyCodeList } }, { _id: 0 })
// .select(select)
.populate('friend', ROLE.SHOW_SIMPLE, 'Role')
.populate('friend', ROLE.SHOW_FRIEND_APPLY_LIST, 'Role')
.lean({ getters: true });
return list;
}