Commit 2334bbe3 authored by shiyu's avatar shiyu

编辑商品4

parent 7ff32b72
......@@ -42,6 +42,11 @@ public class AuctionRecordVo implements Entity {
*/
private String startPrice;
/**
* 下次出价价格
*/
private String nextPrice;
/**
* 实际竞拍结束时间
*/
......
......@@ -187,7 +187,9 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
AuctionRecord lastedRecord = auctionRecordDao.findLastedRecord(dto.getItemId());
//当前价
if (CollectionUtils.isEmpty(auctionRecordList)) {
auctionRecordVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(auctionConfig.getStartPrice()));
//没有出价记录最新价格为0
auctionRecordVo.setCurrentPrice("0");
auctionRecordVo.setNextPrice(PriceUtil.convertPriceFenToYuan(auctionConfig.getStartPrice()));
auctionRecordVo.setUserState(DistributionEnum.AuctionUserStateEnum.PROCESS.getCode());
auctionRecordVo.setUserStateName(DistributionEnum.AuctionUserStateEnum.PROCESS.getDes());
} else {
......
......@@ -93,12 +93,15 @@ public class SupplierItemServiceImpl implements SupplierItemService {
if (auctionRecord != null && auctionRecord.getPrice() != null) {
supplierItemVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(auctionRecord.getPrice()));
} else {
//没有出价记录最新价格为0
supplierItemVo.setCurrentPrice("0");
//查询商品起拍价
AuctionConfig auctionConfig = auctionConfigDao.findByItemId(supplierItem.getId());
if (auctionConfig != null) {
supplierItemVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(auctionConfig.getStartPrice()));
}
}
}
supplierItemVos.add(supplierItemVo);
});
return Result.success(PageSearchResult.of(pageInfo, supplierItemVos));
......@@ -283,8 +286,8 @@ public class SupplierItemServiceImpl implements SupplierItemService {
supplierItemVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(auctionRecord.getPrice()));
} else {
//查询商品起拍价
AuctionConfig auctionConfig = auctionConfigDao.findByItemId(supplierItem.getId());
supplierItemVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(auctionConfig.getStartPrice()));
//AuctionConfig auctionConfig = auctionConfigDao.findByItemId(supplierItem.getId());
supplierItemVo.setCurrentPrice("0");
}
}
supplierItemVos.add(supplierItemVo);
......
......@@ -53,7 +53,7 @@ public class AutoCreateAuctionOrderJob {
/**
* 隔2分钟运行一次
*/
@Scheduled(fixedDelay = 1000 * 60 * 5)
@Scheduled(fixedDelay = 1000 * 60 * 2)
public void execute() {
RLock lock = redissonClient.getLock(AUTO_CREATE_AUCTION_ORDER_KEY);
if (!lock.tryLock()) {
......
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