|
|
@@ -32,10 +32,11 @@ public class AuctionRecordService {
|
|
|
private UserRepo userRepo;
|
|
|
|
|
|
public Page<AuctionRecord> all(PageQuery pageQuery) {
|
|
|
- return auctionRecordRepo.findAll(JpaUtils.toSpecification(pageQuery, AuctionRecord.class), JpaUtils.toPageRequest(pageQuery));
|
|
|
+ return auctionRecordRepo
|
|
|
+ .findAll(JpaUtils.toSpecification(pageQuery, AuctionRecord.class), JpaUtils.toPageRequest(pageQuery));
|
|
|
}
|
|
|
|
|
|
- public AuctionRecord created(Long userId, Long auctionId, BigDecimal amount) {
|
|
|
+ public AuctionRecord create(Long userId, Long auctionId, BigDecimal amount) {
|
|
|
AuctionActivity auction = auctionActivityRepo.findById(auctionId)
|
|
|
.orElseThrow(new BusinessException("暂无"));
|
|
|
|
|
|
@@ -72,8 +73,8 @@ public class AuctionRecordService {
|
|
|
|
|
|
AuctionRecord save = new AuctionRecord();
|
|
|
BeanUtils.copyProperties(record, save);
|
|
|
- record.setId(null);
|
|
|
- record.setBidderPrice(amount);
|
|
|
+ save.setId(null);
|
|
|
+ save.setBidderPrice(amount);
|
|
|
save = auctionRecordRepo.save(save);
|
|
|
|
|
|
if (save.isPayDeposit()) {
|