✨ feat(拍卖行): 只流3个拍品到世界拍卖行
https://bantugame.feishu.cn/wiki/wikcn1qfpNYNUnOvuKiyK69eqqg?lang=zh-CN&open_in_browser=true
This commit is contained in:
@@ -20,6 +20,7 @@ import { gameData, getAuctionRewardByPoolId } from '../../../pubUtils/data';
|
||||
import { sendMailByContent } from '../../../services/mailService';
|
||||
import { reportTAEvent } from '../../../services/sdkService';
|
||||
import { sendMessageToGuildWithSuc, sendMessageToServerWithSuc } from '../../../services/pushService';
|
||||
import { LOTS_KEEP_TO_WORLD_CNT } from '../../../consts';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -76,7 +77,7 @@ export class AuctionHandler {
|
||||
return resResult(STATUS.AUCITON_STAGE_ERR);
|
||||
}
|
||||
|
||||
let { curBuyer, curPrice, prePrice, maxPrice, gid, count, bidRoles, watchingRoles } = lot;
|
||||
let { curBuyer, curPrice, prePrice, maxPrice, gid, count, bidRoles, watchingRoles, seq, begin } = lot;
|
||||
if (curBuyer === roleId && !max) {
|
||||
res.releaseCallback();
|
||||
return resResult(STATUS.LOT_OFFER_SERIAL);
|
||||
@@ -112,7 +113,8 @@ export class AuctionHandler {
|
||||
reportTAEvent(roleId, TA_EVENT.AUCTION_ITEM_GET, { item_name: dicGoods?.name, item_count: count, deel_price: newPrice }, ip);
|
||||
}
|
||||
bidRoles.push({ roleId, price: newPrice, time: new Date() });
|
||||
const newLot = await LotModel.updateLot({ code, curBuyer: roleId, curPrice: newPrice, auctionStage, prePrice: curPrice, bidRoles, status: max ? LOT_STATUS.MAX : (maxFlag ? LOT_STATUS.SOLD : LOT_STATUS.ING), watchingRoles: Array.from(new Set([...watchingRoles, roleId])) });
|
||||
const newLot = await LotModel.updateLot({ code, curBuyer: roleId, curPrice: newPrice, auctionStage, prePrice: curPrice, bidRoles, status: max ? LOT_STATUS.MAX : (maxFlag ? LOT_STATUS.SOLD : LOT_STATUS.ING), watchingRoles: Array.from(new Set([...watchingRoles, roleId])), seq: 0 });
|
||||
if(seq <= LOTS_KEEP_TO_WORLD_CNT) await LotModel.setSeq(begin, gid, count, seq);
|
||||
await pushAuctionOver(newLot); // 推送竞价超过标志
|
||||
res.releaseCallback();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user