Commit 21513a1a authored by shiyu's avatar shiyu

专场列表出价次数

parent 3f120f53
......@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.logging.Handler;
......@@ -68,10 +69,14 @@ public class SysSpecialPerformanceServiceImpl implements SysSpecialPerformanceSe
//出价总数
List<SpecialPerformanceConfig> allItemlist = specialPerformanceConfigDao.findAllItem(specialPerformance.getId());
List<Long> itemIdList = allItemlist.stream().map(SpecialPerformanceConfig::getItemId).collect(Collectors.toList());
AuctionRecordRequestDto auctionRecordRequestDtoOfTotal = new AuctionRecordRequestDto();
auctionRecordRequestDtoOfTotal.setItemIdList(itemIdList);
long totalOfferNum = auctionRecordDao.count(auctionRecordRequestDtoOfTotal);
specialPerformanceVo.setOfferNum(totalOfferNum);
if (CollectionUtils.isEmpty(itemIdList)) {
specialPerformanceVo.setOfferNum(0L);
} else {
AuctionRecordRequestDto auctionRecordRequestDtoOfTotal = new AuctionRecordRequestDto();
auctionRecordRequestDtoOfTotal.setItemIdList(itemIdList);
long totalOfferNum = auctionRecordDao.count(auctionRecordRequestDtoOfTotal);
specialPerformanceVo.setOfferNum(totalOfferNum);
}
specialPerformanceVo.setStateName(SpecialPerformanceEnum.StateEnum.getNameByCode(specialPerformance.getState()));
specialPerformanceVos.add(specialPerformanceVo);
}
......
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