拍卖行:出价后更新分红
This commit is contained in:
@@ -63,8 +63,9 @@ export class AuctionHandler {
|
||||
bidRoles.push({roleId, price: newPrice, time: new Date()});
|
||||
const newLot = await LotModel.updateLot({ code, curBuyer: roleId, curPrice: newPrice, bidRoles});
|
||||
|
||||
// TODO 更新分红
|
||||
return resResult(STATUS.SUCCESS, { lot: newLot });
|
||||
const incPrice = newPrice - (curBuyer ? curPrice : 0);
|
||||
const dividend = await DividendModel.updateLot(code, gid, newPrice, incPrice);
|
||||
return resResult(STATUS.SUCCESS, { lot: newLot, dividend });
|
||||
}
|
||||
|
||||
async watchLot(msg: { code: string }, session: BackendSession) {
|
||||
|
||||
Reference in New Issue
Block a user