拍卖行:个人可以竞价后出一口价,修改军团拍卖记录的状态

This commit is contained in:
liangtongchuan
2021-03-25 11:24:21 +08:00
parent fca0a80eda
commit 1802e2127d
3 changed files with 16 additions and 10 deletions
+7 -2
View File
@@ -20,7 +20,7 @@ export function getBasePrice(gid: number, count: number) {
}
// ! 获取一口价,假数据
function getMaxPrice(gid: number, count: number) {
export function getMaxPrice(gid: number, count: number) {
const good = getGoodById(gid);
return (good ? good.quality * 200 : 200) * count;
}
@@ -238,10 +238,15 @@ export async function sendUngotDividendJob() {
}
export function auctionBidStatus(roleId: string, lot: LotParam) {
const { curBuyer, gid, status } = lot;
const { curBuyer, status } = lot;
return curBuyer !== roleId ? AUCTION_BID_STATUS.RETURN : status === LOT_STATUS.SOLD || status === LOT_STATUS.MAX ? AUCTION_BID_STATUS.SUC : AUCTION_BID_STATUS.LEAD;
}
export function guildBidStatus(lot: { max: boolean, gid: number, count: number, price: number, dividendStatus: number }) {
const { max, gid, count, price: lotPrice, dividendStatus } = lot;
return max || lotPrice === getMaxPrice(gid, count) || ((dividendStatus == DIVIDEND_STATUS.END || dividendStatus == DIVIDEND_STATUS.SENT) && lotPrice !== 0)
}
export async function sendUngotDividend(debug = false) {
try {
console.log('schedule sendUngotDividend called:', new Date());