| | |
| | | ScoreGoodsStyleMapper scoreGoodsStyleMapper; |
| | | @Resource |
| | | ScoreGoodsSearchMapper scoreGoodsSearchMapper; |
| | | @Resource |
| | | ScoreOrderMapper scoreOrderMapper; |
| | | |
| | | @Autowired |
| | | private MqUtil mqUtil; |
| | |
| | | |
| | | PageHelper.startPage(xcxGoodsListDto.getPageNo(), xcxGoodsListDto.getPageSize()); |
| | | List<XcxGoodsListVo> data = scoreGoodsMapper.selectXcxGoodsList(xcxGoodsListDto); |
| | | if(StrUtil.isNotEmpty(xcxGoodsListDto.getUserId())){ |
| | | if(CollUtil.isNotEmpty(data)){ |
| | | for(XcxGoodsListVo xcxGoodsListVo : data){ |
| | | if(ScoreGoods.ISQG_YES == xcxGoodsListVo.getIsQg()){ |
| | | //抢购时间内,用户购买该商品的数量 |
| | | Integer sumCnt = scoreOrderMapper.selectGoodsQuotaTime(xcxGoodsListDto.getUserId(),xcxGoodsListVo.getId(),xcxGoodsListVo.getQgStartTime(),xcxGoodsListVo.getQgEndTime()); |
| | | xcxGoodsListVo.setAvaQuotaTime( |
| | | ((xcxGoodsListVo.getQuotaTime() == null?0:xcxGoodsListVo.getQuotaTime()) - sumCnt) > 0?((xcxGoodsListVo.getQuotaTime() == null?0:xcxGoodsListVo.getQuotaTime()) - sumCnt):0 |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if(StrUtil.isNotEmpty(xcxGoodsListDto.getName())){ |
| | | Example exampleSearch = new Example(ScoreGoodsSearch.class); |
| | | Example.Criteria criteriaSearch = exampleSearch.createCriteria(); |