Commit 284f0cfc authored by shiyu's avatar shiyu

刷新价格问题修复

parent 55eda757
......@@ -17,6 +17,7 @@ import com.wwdz.ch.db.domain.distribution.*;
import com.wwdz.ch.db.dto.request.distribution.AuctionRecordRequestDto;
import com.wwdz.ch.core.api.WxAppletApi;
import com.wwdz.ch.core.entity.AuctionOfferNoticeMsg;
import com.wwdz.ch.db.dto.request.distribution.SpecialPerformanceConfigRequestDto;
import com.wwdz.ch.wx.entity.vo.distribution.AuctionRecordRowVo;
import com.wwdz.ch.wx.entity.vo.distribution.AuctionRecordVo;
import com.wwdz.ch.wx.service.distribution.AuctionRecordService;
......@@ -243,10 +244,19 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
//查询商品竞拍信息
AuctionConfig auctionConfig = auctionConfigDao.findByItemId(dto.getItemId());
AuctionRecord lastedRecord = auctionRecordDao.findLastedRecord(dto.getItemId());
SpecialPerformanceConfigRequestDto specialPerformanceConfigRequestDto = new SpecialPerformanceConfigRequestDto();
specialPerformanceConfigRequestDto.setItemId(dto.getItemId());
List<SpecialPerformanceConfig> specialPerformanceConfigList = specialPerformanceConfigDao.findList(specialPerformanceConfigRequestDto);
if (!CollectionUtils.isEmpty(specialPerformanceConfigList)) {
SpecialPerformanceConfig specialPerformanceConfig = specialPerformanceConfigList.get(0);
auctionRecordVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(specialPerformanceConfig.getCurrentPrice()));
}
//当前价
if (CollectionUtils.isEmpty(auctionRecordList)) {
//没有出价记录最新价格为0
auctionRecordVo.setCurrentPrice("0");
// auctionRecordVo.setCurrentPrice("0");
if (auctionConfig.getStartPrice() == 0) {
auctionRecordVo.setNextPrice(PriceUtil.convertPriceFenToYuan(auctionConfig.getStartPrice() + auctionConfig.getAddExtent()));
} else {
......@@ -255,7 +265,7 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
auctionRecordVo.setUserState(DistributionEnum.AuctionUserStateEnum.PROCESS.getCode());
auctionRecordVo.setUserStateName(DistributionEnum.AuctionUserStateEnum.PROCESS.getDes());
} else {
auctionRecordVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(lastedRecord.getPrice()));
// auctionRecordVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(lastedRecord.getPrice()));
auctionRecordVo.setNextPrice(PriceUtil.convertPriceFenToYuan(lastedRecord.getPrice() + auctionConfig.getAddExtent()));
//如果最高价是自己出的,用户状态显示已领先
if (lastedRecord.getUserId().longValue() == dto.getUserId().longValue()) {
......
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