🐞 fix(拍卖行): 修复拍卖行发生的很多问题
This commit is contained in:
@@ -569,9 +569,8 @@ export async function getLotStatus(auctionStage: number, max: boolean, maxFlag:
|
||||
}
|
||||
|
||||
export async function extendLotTime(lot: LotType) {
|
||||
if(lot.status != LOT_STATUS.BIDDING) {
|
||||
clearLotTimer(lot.code);
|
||||
} else {
|
||||
clearLotTimer(lot.code);
|
||||
if(lot.status == LOT_STATUS.BIDDING) {
|
||||
let timer = setTimeout(async () => {
|
||||
await sendSingleLot(lot.code);
|
||||
}, lot.end.getTime() - Date.now());
|
||||
@@ -582,6 +581,7 @@ export async function extendLotTime(lot: LotType) {
|
||||
export async function sendSingleLot(code: string) {
|
||||
console.log('schedule sendSingleLot called:', new Date());
|
||||
let lot = await LotModel.setLotSold(code, AUCTION_STAGE.GUILD); // 正在竞拍的拍品
|
||||
if(!lot) return;
|
||||
await sendLotsRewardToMlail([lot]);
|
||||
await pushAuctionOver(lot);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user