军团捐献,许愿池,装备,养成 注释
This commit is contained in:
@@ -4,6 +4,11 @@ import { getTodayZeroPoint, nowSeconds } from '../pubUtils/timeUtil';
|
||||
import { GuildModel } from '../db/Guild';
|
||||
import { findWhere } from 'underscore';
|
||||
import { GUILD_STRUCTURE } from '../consts/constModules/guildConst';
|
||||
/**
|
||||
* 获得军团捐献,并检查是否刷新捐献数据
|
||||
* @param code
|
||||
* @param serverId
|
||||
*/
|
||||
export async function getDonation(code: string, serverId: number) {
|
||||
let donation = await DonationModel.getDonation(code);
|
||||
if (!donation) {
|
||||
@@ -17,7 +22,11 @@ export async function getDonation(code: string, serverId: number) {
|
||||
return donation;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建军团捐献信息
|
||||
* @param code
|
||||
* @param serverId
|
||||
*/
|
||||
export async function createDonation(code: string, serverId: number) {
|
||||
let { structure } = await GuildModel.findGuild(code, serverId, 'structure');
|
||||
let { lv } = findWhere(structure, {id: GUILD_STRUCTURE.DONATE});
|
||||
|
||||
Reference in New Issue
Block a user