Commit 07150b8c authored by shiyu's avatar shiyu

刷新拍卖最新出价时保证金额度判断

parent 16456484
......@@ -325,6 +325,16 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
auctionRecordVo.setUserStateName(DistributionEnum.AuctionUserStateEnum.PROCESS.getDes());
}
}
//检查用户的保证金额度是否满足出价
EarnestRecordRequestDto earnestRecordRequestDto = new EarnestRecordRequestDto();
earnestRecordRequestDto.setUserId(dto.getUserId());
earnestRecordRequestDto.setAuctionPrice(PriceUtil.convertPriceFromStr(auctionRecordVo.getNextPrice()));
Result checkEnoughEarnestResult = auctionEarnestService.checkEnoughEarnest(earnestRecordRequestDto);
if (!checkEnoughEarnestResult.getSuccess()) {
return checkEnoughEarnestResult;
}
auctionRecordVo.setStartPrice(PriceUtil.convertPriceFenToYuan(auctionConfig.getStartPrice()));
Date startTime = auctionConfig.getStartTime();
Date realEndTime = auctionConfig.getRealEndTime();
......
......@@ -108,7 +108,7 @@ public class AuctionEarnestServiceImpl implements AuctionEarnestService {
UserAccount userAccount = userAccountDao.findByUserId(dto.getUserId());
long earnestUsableAmount = userAccount.getEarnestUsableAmount();
if (occupyAmount > earnestUsableAmount) {
return Result.failed("保证金额度不够,请先缴纳");
return Result.failed("保证金不足,去缴纳");
}
return Result.success();
} catch (Exception e) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment