jenkins:debug用拍卖行测试出价
This commit is contained in:
@@ -46,8 +46,8 @@ export class AuctionHandler {
|
||||
}
|
||||
|
||||
|
||||
async offer(msg: { code: string, max: boolean, auctionStage: number }, session: BackendSession) {
|
||||
const { code, max, auctionStage } = msg;
|
||||
async offer(msg: { code: string, max: boolean, auctionStage: number, magicWord: string }, session: BackendSession) {
|
||||
const { code, max, auctionStage, magicWord } = msg;
|
||||
const roleId = session.get('roleId');
|
||||
const sid = session.get('sid');
|
||||
const serverId = session.get('serverId');
|
||||
@@ -71,7 +71,7 @@ export class AuctionHandler {
|
||||
return resResult(STATUS.AUCTION_GUILD_MEMBER_ONLY);
|
||||
}
|
||||
|
||||
if(!await checkAuctionStage(auctionStage)) {
|
||||
if(!await checkAuctionStage(auctionStage, magicWord)) {
|
||||
res.releaseCallback();
|
||||
return resResult(STATUS.AUCITON_STAGE_ERR);
|
||||
}
|
||||
|
||||
@@ -515,7 +515,9 @@ export async function pushAuctionUpdate(lots: LotType[], dividends: DividendType
|
||||
|
||||
}
|
||||
|
||||
export async function checkAuctionStage(auctionStage: number) {
|
||||
export async function checkAuctionStage(auctionStage: number, magicWord: string) {
|
||||
if(magicWord == DEBUG_MAGIC_WORD) return true
|
||||
|
||||
const curTime = await getCurrentTimeWithSetDay();
|
||||
if(auctionStage != AUCTION_STAGE.GUILD && auctionStage != AUCTION_STAGE.WORLD) return false;
|
||||
if(auctionStage == AUCTION_STAGE.GUILD) {
|
||||
|
||||
@@ -129,7 +129,7 @@ describe('拍卖行测试', function () {
|
||||
done();
|
||||
return;
|
||||
}
|
||||
pinusClient.request('guild.auctionHandler.offer', { code: unsoldLots[0].code, max: false }, (res) => {
|
||||
pinusClient.request('guild.auctionHandler.offer', { code: unsoldLots[0].code, max: false, magicWord: DEBUG_MAGIC_WORD }, (res) => {
|
||||
checkSuccessResponse(res);
|
||||
checkLot(res.data.lot);
|
||||
if (res.data.dividend) {
|
||||
@@ -144,7 +144,7 @@ describe('拍卖行测试', function () {
|
||||
return;
|
||||
}
|
||||
gid = unsoldLots[0].gid;
|
||||
pinusClient.request('guild.auctionHandler.offer', { code: unsoldLots[0].code, max: true }, (res) => {
|
||||
pinusClient.request('guild.auctionHandler.offer', { code: unsoldLots[0].code, max: true, magicWord: DEBUG_MAGIC_WORD }, (res) => {
|
||||
checkSuccessResponse(res);
|
||||
checkLot(res.data.lot);
|
||||
if(res.data.dividend) {
|
||||
|
||||
Reference in New Issue
Block a user