全局:加载json方法全部改为最新
This commit is contained in:
@@ -9,7 +9,7 @@ import { ARMY } from '../pubUtils/dicParam';
|
||||
import { lockData } from './redLockService';
|
||||
import { pinus } from 'pinus';
|
||||
import { MailModel, MailType } from '../db/Mail';
|
||||
import { getRandomByLen, resResult } from '../pubUtils/util';
|
||||
import { resResult, getRandSingleEelm } from '../pubUtils/util';
|
||||
import { STATUS } from '../consts/statusCode';
|
||||
import { GuildTrainReportModel } from '../db/GuildTrainReport';
|
||||
import { DATA_NAME } from '../consts/dataName';
|
||||
@@ -131,14 +131,16 @@ export async function resetTrain(code: string, serverId: number) {
|
||||
let { shilianRewardRatio } = getTrainBaseByLv(GUILD_STRUCTURE.TRAIN);
|
||||
//结算未领取的宝箱奖励发送到邮件中
|
||||
userGuildList.forEach(async function ({roleId, trainRewards}) {
|
||||
let goods = [];
|
||||
let goods: { id: number, count: number }[] = [];
|
||||
guildTrains.forEach(guildTrain=>{
|
||||
guildTrain.trainInstances.forEach(({ trainBoxs })=>{
|
||||
if (!findWhere(trainBoxs, {roleId})) {
|
||||
let { heroRewards } = getArmyTrainJuDian(guildTrain.trainId);
|
||||
let good = getRandomByLen(heroRewards);
|
||||
good.count = Math.floor((100 + shilianRewardRatio) * good.count/100);
|
||||
goods.push(good);
|
||||
let good = getRandSingleEelm(heroRewards);
|
||||
goods.push({
|
||||
id: good.id,
|
||||
count: Math.floor((100 + shilianRewardRatio) * good.count/100)
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user