🐞 fix(拍卖行): 修改当拍品售出时的报错

This commit is contained in:
luying
2023-06-09 10:02:21 +08:00
parent 085e62fd9c
commit 666212bf20
2 changed files with 6 additions and 1 deletions
@@ -62,10 +62,14 @@ export class AuctionHandler {
} }
const lot = await LotModel.findLot(code); const lot = await LotModel.findLot(code);
if (!lot || lot.status === LOT_STATUS.SOLD || lot.status === LOT_STATUS.MAX) { if (!lot) {
res.releaseCallback(); res.releaseCallback();
return resResult(STATUS.GUILD_LOT_NOT_FOUND); return resResult(STATUS.GUILD_LOT_NOT_FOUND);
} }
if (lot.status === LOT_STATUS.SOLD || lot.status === LOT_STATUS.MAX) {
res.releaseCallback();
return resResult(STATUS.GUILD_LOT_HAS_SOLD);
}
if (auctionStage === AUCTION_STAGE.GUILD && lot.guildCode !== guildCode) { if (auctionStage === AUCTION_STAGE.GUILD && lot.guildCode !== guildCode) {
res.releaseCallback(); res.releaseCallback();
+1
View File
@@ -269,6 +269,7 @@ export const STATUS = {
DIVIDEND_GUILD_PLAYER_ONLY: { code: 21004, simStr: '需要参加军团活动才能领取' }, DIVIDEND_GUILD_PLAYER_ONLY: { code: 21004, simStr: '需要参加军团活动才能领取' },
AUCTION_GUILD_MEMBER_ONLY: { code: 21005, simStr: '不是军团的成员无法出价' }, AUCTION_GUILD_MEMBER_ONLY: { code: 21005, simStr: '不是军团的成员无法出价' },
AUCITON_STAGE_ERR: { code: 21006, simStr: '拍卖超时,请刷新客户端重新进入' }, AUCITON_STAGE_ERR: { code: 21006, simStr: '拍卖超时,请刷新客户端重新进入' },
GUILD_LOT_HAS_SOLD: { code: 21007, simStr: '拍品已售出' },
// 军团活动 21100-21199 // 军团活动 21100-21199
GUILD_ACTIVITY_NOT_OPEN: { code: 21100, simStr: '活动未开放' }, GUILD_ACTIVITY_NOT_OPEN: { code: 21100, simStr: '活动未开放' },