问卷
This commit is contained in:
@@ -60,6 +60,5 @@ export enum FRIEND_SHIP_SELECT {
|
||||
export const ENTERY_ROLE_PICK = ['roleId', 'roleName', 'serverId', 'ce', 'topLineupCe', 'coin', 'lv', 'exp', 'vLv', 'gold', 'heros', 'jewels', 'consumeGoods', 'title', 'teraphs', 'showLineup', 'heads', 'head', 'frames', 'frame', 'spines', 'spine', 'hasGuild', 'guildCode', 'todayZeroPoint', 'apJson', 'skins', 'totalPay', 'guide', 'hasInit', 'renameCnt', 'totalCost', 'guildName', 'isVip'];
|
||||
|
||||
export enum SURVEY_SELECT {
|
||||
ENTRY = '-__v -_id -surveyId -surveyName -roleIndex -reward -mailContent -createdAt -updatedAt',
|
||||
FIND = '-__v -_id -surveyId -surveyName -roleIndex -reward -mailContent -receivedRole -createdAt -updatedAt'
|
||||
}
|
||||
@@ -42,9 +42,6 @@ export default class Survey extends BaseModel {
|
||||
@prop({ required: true })
|
||||
isEnable: boolean; // 是否显示
|
||||
|
||||
@prop({ required: true, type: String })
|
||||
receivedRole: string[]; // 是否显示
|
||||
|
||||
public static async findEnableSurvey(select = '') {
|
||||
let rec: SurveyType[] = await SurveyModel.find({ isEnable: true, endTime: { $gte: nowSeconds() } }).select(select).lean();
|
||||
return rec;
|
||||
|
||||
@@ -29,6 +29,11 @@ export default class SurveyRec extends BaseModel {
|
||||
return rec;
|
||||
}
|
||||
|
||||
public static async findByRole(roleId: string) {
|
||||
let rec: SurveyRecType[] = await SurveyRecModel.find({ roleId }).lean();
|
||||
return rec;
|
||||
}
|
||||
|
||||
public static async findByCode(code: string) {
|
||||
let rec: SurveyRecType = await SurveyRecModel.findOne({ code }).lean();
|
||||
return rec;
|
||||
|
||||
Reference in New Issue
Block a user