军团:邀请过一次当天不再显示

This commit is contained in:
luying
2021-02-23 14:55:13 +08:00
parent 53b873941e
commit d140c66063
5 changed files with 52 additions and 13 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ export default class GuildRec extends BaseModel {
public static async createGuildRec(roleId: string, guildCode: string, type: number, params: string[]) {
const doc = new GuildRecModel();
const update = Object.assign(doc.toJSON(), { roleId, guildCode, type, params });
const update = Object.assign(doc.toJSON(), { roleId, guildCode, type, params, createTime: nowSeconds() });
delete update._id;
const recCode = genCode(10);
const result: GuildRecType = await GuildRecModel.findOneAndUpdate({ recCode }, update, { upsert: true, new: true }).lean();