捐献所
This commit is contained in:
@@ -154,6 +154,8 @@ export const STATUS = {
|
||||
GUILD_DONATE_BOXS_NOT_GOT: { code: 20924, simStr: '该捐献宝箱未达到领取条件' },
|
||||
GUILD_WISH_POOL_NOT_OWN_EQUIP: { code: 20926, simStr: '未拥有此装备或碎片,不能许愿' },
|
||||
GUILD_WISH_POOL_NOT_OWN_HERO: { code: 20927, simStr: '未拥有此武将或碎片,不能许愿' },
|
||||
HAS_REACH_WISH_COUNT_LIMIT: { code: 20928, simStr: '今日许愿次数已用完,不能许愿' },
|
||||
HAS_RECEIVE_WISH_GOOD: { code: 20929, simStr: '玩家已经收到许愿物品' },
|
||||
|
||||
GUILD_SCRIPT_IS_OPENED_TODAY: { code: 20950, simStr: '今日演武场已开启' },
|
||||
GUILD_SCRIPT_NOT_OPENED: { code: 20951, simStr: '演武场未开启' },
|
||||
|
||||
@@ -26,11 +26,14 @@ export default class Mail extends BaseModel {
|
||||
@prop({ required: true })
|
||||
content: string;
|
||||
|
||||
public static async addMails( mails: Array<MailType>) {
|
||||
@prop({ required: true, default: 0 })
|
||||
status: number;
|
||||
|
||||
public static async addMails(mails: Array<MailType>) {
|
||||
await MailModel.insertMany(mails);
|
||||
}
|
||||
|
||||
public static async addMail(params:{roleId: string, goods: Array<RewardInter>, sendName: string, mailId: number, sendTime?: number, content?:string}) {
|
||||
public static async addMail(params:{ roleId: string, goods: Array<RewardInter>, sendName: string, mailId: number, sendTime?: number, content?:string }) {
|
||||
const doc = new MailModel();
|
||||
const mail = Object.assign(doc.toJSON(), params);
|
||||
await MailModel.create(mail);
|
||||
|
||||
@@ -210,7 +210,7 @@ const strDonate = readJsonFile(FILENAME.DIC_GUILD_DONATE_BASE);
|
||||
let arrDonate = JSON.parse(strDonate);
|
||||
arrDonate.forEach(o => {
|
||||
setStructureConsume(o);
|
||||
o.donateReward = parseDonateReward(o.donatevalue, o.donateReward, o.fundReward);
|
||||
o.donateReward = parseDonateReward(o.donatevalue, o.honourReward, o.fundReward);
|
||||
dicDonateBase.set(o.level, _.pick(o, Object.keys(DicDonateKeys)));
|
||||
});
|
||||
arrDonate = undefined;
|
||||
|
||||
Reference in New Issue
Block a user