好友:玩家武将详细信息
This commit is contained in:
@@ -2,7 +2,7 @@ import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType, mongoose, Ref } from '@typegoose/typegoose';
|
||||
import Role, { RoleType } from './Role';
|
||||
import { genCode } from '../pubUtils/util';
|
||||
import { ROLE } from '../consts';
|
||||
import { ROLE_SELECT } from '../consts';
|
||||
|
||||
/**
|
||||
* 好友系统关系表
|
||||
@@ -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_FRIEND_APPLY_LIST, 'Role')
|
||||
.populate('friend', ROLE_SELECT.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_FRIEND_APPLY_LIST, 'Role')
|
||||
.populate('friend', ROLE_SELECT.SHOW_FRIEND_APPLY_LIST, 'Role')
|
||||
.lean({ getters: true });
|
||||
return list;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user