拍卖行:修复竞拍记录中错误的状态
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import { AUCTION_BID_STATUS } from './../../../consts/constModules/auctionConst';
|
||||
import { DividendModel } from './../../../db/Dividend';
|
||||
import { Application, BackendSession, ChannelService } from "pinus";
|
||||
import { AUCTION_STAGE, DEBUG_MAGIC_WORD, STATUS, OFFER_RATIO, CURRENCY_BY_TYPE, CURRENCY_TYPE, DATA_NAME, LOT_STATUS } from "../../../consts";
|
||||
import { LotModel } from "../../../db/Lot";
|
||||
import { ItemReward, LotRec } from "../../../domain/dbGeneral";
|
||||
import { resResult } from "../../../pubUtils/util";
|
||||
import { auctionStage, calculateDividend, genAuction, sendUngotDividend, startGuildAuction, startWorldAuction, stopAuction, todayGuildBegin, getBasePrice, debugAuctionLots, officialAuctionLots } from "../../../services/auctionService";
|
||||
import { auctionStage, calculateDividend, genAuction, sendUngotDividend, startGuildAuction, startWorldAuction, stopAuction, todayGuildBegin, getBasePrice, debugAuctionLots, officialAuctionLots, auctionBidStatus } from "../../../services/auctionService";
|
||||
import { addItems, handleCost } from '../../../services/rewardService';
|
||||
import { getSimpleRoleInfo } from '../../../services/roleService';
|
||||
import { getRoleOnlineInfo } from '../../../services/redisService';
|
||||
@@ -157,8 +156,8 @@ export class AuctionHandler {
|
||||
const lotsData = await LotModel.recentBidLots(serverId, roleId, msg.count);
|
||||
const bidRecs = lotsData.map(lot => {
|
||||
const bidRec = lot.bidRoles.find(role => { return role.roleId === roleId });
|
||||
const { curBuyer, gid } = lot;
|
||||
return { ...bidRec, gid, status: curBuyer === roleId ? AUCTION_BID_STATUS.SUC : AUCTION_BID_STATUS.RETURN };
|
||||
const { gid } = lot;
|
||||
return { ...bidRec, gid, status: auctionBidStatus(roleId, lot) };
|
||||
});
|
||||
return resResult(STATUS.SUCCESS, { bidRecs });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user