feat(gvg): 添加debug接口

This commit is contained in:
luying
2023-02-08 14:22:43 +08:00
parent f305ee99c4
commit 040d37dcf8
5 changed files with 65 additions and 4 deletions

View File

@@ -176,6 +176,11 @@ export default class GVGLeagueFarm extends BaseModel {
{ new: true }).lean();
return result;
}
public static async setMyHarvestTime(configId: number, leagueCode: string, time: number) {
console.log(configId, leagueCode, nowSeconds(), time)
await GVGLeagueFarmModel.updateMany({ configId, leagueCode, harvestTime: { $gt: nowSeconds() } }, { $set: { harvestTime: nowSeconds() + time }});
}
}
export const GVGLeagueFarmModel = getModelForClass(GVGLeagueFarm);