拍卖行:修改分红逻辑
This commit is contained in:
@@ -4,7 +4,7 @@ import { AUCTION_STAGE, DEBUG_MAGIC_WORD, STATUS, CURRENCY_BY_TYPE, CURRENCY_TYP
|
||||
import { LotModel } from "../../../db/Lot";
|
||||
import { ItemReward } from "../../../domain/dbGeneral";
|
||||
import { genCode, resResult } from "../../../pubUtils/util";
|
||||
import { auctionStage, calculateDividend, genAuction, sendUngotDividend, startGuildAuction, startWorldAuction, stopAuction, todayGuildBegin, getBasePrice, debugAuctionLots, officialAuctionLots, auctionBidStatus, getMaxPrice, guildBidStatus, getAuction, pushAuctionOver, treatSingleLotTime, treatLotsTime } from "../../../services/auctionService";
|
||||
import { auctionStage, calculateDividend, genAuction, sendUngotDividend, startGuildAuction, startWorldAuction, stopAuction, todayGuildBegin, getBasePrice, debugAuctionLots, officialAuctionLots, auctionBidStatus, getMaxPrice, guildBidStatus, getAuction, pushAuctionOver, treatSingleLotTime, treatLotsTime, pushAuctionUpdate } from "../../../services/auctionService";
|
||||
import { addItems, getGoldObject, handleCost } from '../../../services/role/rewardService';
|
||||
import { getSimpleRoleInfo } from '../../../services/roleService';
|
||||
import { getRoleOnlineInfo } from '../../../services/redisService';
|
||||
@@ -113,10 +113,10 @@ export class AuctionHandler {
|
||||
await pushAuctionOver(newLot); // 推送竞价超过标志
|
||||
res.releaseCallback();
|
||||
|
||||
const incPrice = newPrice - (curBuyer ? curPrice : 0);
|
||||
const incPrice = curPrice - prePrice > 0? prePrice: 0;
|
||||
let newDividend = null;
|
||||
if (lot.auctionStage === AUCTION_STAGE.GUILD) {
|
||||
const dividend = await DividendModel.updateLot(code, gid, newPrice, incPrice, max);
|
||||
const dividend = await DividendModel.updateLot(code, gid, curPrice, incPrice, max);
|
||||
newDividend = await calculateDividend(dividend);
|
||||
}
|
||||
let newLotResult = await treatSingleLotTime(newLot);
|
||||
|
||||
Reference in New Issue
Block a user