拍卖行:定时刷新、结算和简单测试,个别bug修复
This commit is contained in:
@@ -5,7 +5,7 @@ import { AUCTION_STAGE, DEBUG_MAGIC_WORD, STATUS, OFFER_RATIO, CURRENCY_BY_TYPE,
|
||||
import { LotModel } from "../../../db/Lot";
|
||||
import { ItemReward } from "../../../domain/dbGeneral";
|
||||
import { resResult } from "../../../pubUtils/util";
|
||||
import { auctionStage, calculateDividend, genAuction, todayGuildBegin } from "../../../services/auctionService";
|
||||
import { auctionStage, calculateDividend, genAuction, sendUngotDividend, startGuildAuction, startWorldAuction, stopAuction, todayGuildBegin } from "../../../services/auctionService";
|
||||
import { addItems, handleCost } from '../../../services/rewardService';
|
||||
import { getSimpleRoleInfo } from '../../../services/roleService';
|
||||
import { getRoleOnlineInfo } from '../../../services/redisService';
|
||||
@@ -143,7 +143,8 @@ export class AuctionHandler {
|
||||
const serverId = session.get('serverId');
|
||||
const begin = todayGuildBegin();
|
||||
const lots = await LotModel.watchingLotsByBegin(serverId, roleId, begin);
|
||||
return resResult(STATUS.SUCCESS, { lots });
|
||||
const stage = auctionStage();
|
||||
return resResult(STATUS.SUCCESS, { lots: stage === AUCTION_STAGE.END ? [] : lots });
|
||||
}
|
||||
|
||||
async offerRecs(msg: { count: number }, session: BackendSession) {
|
||||
@@ -199,4 +200,40 @@ export class AuctionHandler {
|
||||
|
||||
return resResult(STATUS.SUCCESS, result);
|
||||
}
|
||||
|
||||
// ! 测试接口
|
||||
async debugScheduleStartGuild(msg: { magicWord: string }, session: BackendSession) {
|
||||
const result = await startGuildAuction();
|
||||
if (result === true) {
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
return resResult(STATUS.INTERNAL_ERR);
|
||||
}
|
||||
|
||||
// ! 测试接口
|
||||
async debugScheduleStartWorld(msg: { magicWord: string }, session: BackendSession) {
|
||||
const result = await startWorldAuction();
|
||||
if (result === true) {
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
return resResult(STATUS.INTERNAL_ERR);
|
||||
}
|
||||
|
||||
// ! 测试接口
|
||||
async debugScheduleStopAuction(msg: { magicWord: string }, session: BackendSession) {
|
||||
const result = await stopAuction();
|
||||
if (result === true) {
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
return resResult(STATUS.INTERNAL_ERR);
|
||||
}
|
||||
|
||||
// ! 测试接口
|
||||
async debugScheduleSendUngotDividend(msg: { magicWord: string }, session: BackendSession) {
|
||||
const result = await sendUngotDividend();
|
||||
if (result === true) {
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
return resResult(STATUS.INTERNAL_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user