Commit 272e2a0c by 章家宝

fix:车辆固定佣金设置跑流程bug

1 parent a456a448
......@@ -55,7 +55,7 @@ public class AppraiseService extends AbstractAuctionService {
throw new FieldException("startingBidPrice", appeal.getStartingBidPrice(), "该车辆已有未审核的评估申请,请勿重复提交。");
}
int fixedCommissionSwitch = appeal.getFixedCommissionSwitch() == null ? 0 : appeal.getFixedCommissionSwitch();
double fixedCommission = fixedCommissionSwitch == 1 ? appeal.getFixedCommission() : 0;
Double fixedCommission = fixedCommissionSwitch == 1 ? appeal.getFixedCommission() : null;
appeal.setFixedCommission(fixedCommission);
appeal.setFixedCommissionSwitch(fixedCommissionSwitch);
Vehicle vehicle = vehicleDao.findById(appeal.getVehicle().getVehicleId()).orElseThrow();
......@@ -74,7 +74,7 @@ public class AppraiseService extends AbstractAuctionService {
NoticeField.STARTING_BID_PRICE, save.getStartingBidPrice(),
NoticeField.REFERENCE_PRICE, save.getReferencePrice(),
NoticeField.FIXED_COMMISSION_SWITCH, save.getFixedCommissionSwitch() == 1 ? "是" : "否",
NoticeField.FIXED_COMMISSION, fixedCommission
NoticeField.FIXED_COMMISSION, fixedCommission == null ? "无" : fixedCommission
));
return save;
}
......
......@@ -391,6 +391,7 @@ public class AuctionOrderService extends AbstractAuctionService {
double startingBidPrice = vehicle.getStartingBidPrice();
bid = new Bid();
bid.setBidPrice(startingBidPrice);
bid.setAuctionVehicle(auctionVehicle);
}
bid.setAccount(account);
return calculateCommissionPrice(LocalDateTime.now(), bid);
......@@ -415,6 +416,7 @@ public class AuctionOrderService extends AbstractAuctionService {
bid.setBidPrice(vehicle.getStartingBidPrice());
bid.setAccount(account);
bid.setCreateTime(LocalDateTime.now());
bid.setAuctionVehicle(auctionVehicle);
}
int bidResult = 0;
if (hasBid && bid.getBidPrice() >= vehicle.getReservePrice()) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!