| | |
| | | import com.ruoyi.goods.controller.management.dto.GoodsSeckillQuery; |
| | | import com.ruoyi.goods.controller.management.dto.GoodsSeckillUpd; |
| | | import com.ruoyi.goods.controller.management.vo.GoodsSeckillVO; |
| | | import com.ruoyi.goods.domain.GoodsSeckillAppointment; |
| | | import com.ruoyi.goods.domain.MemberGoodsCollection; |
| | | import com.ruoyi.goods.mapper.GoodsSeckillMapper; |
| | | import com.ruoyi.goods.service.IGoodsSeckillAppointmentService; |
| | | import com.ruoyi.goods.service.IGoodsSeckillService; |
| | | import com.ruoyi.goods.service.IGoodsSkuService; |
| | | import com.ruoyi.goods.service.IMemberGoodsCollectionService; |
| | |
| | | |
| | | @Resource |
| | | private IMemberGoodsCollectionService iMemberGoodsCollectionService; |
| | | |
| | | @Resource |
| | | private IGoodsSeckillAppointmentService iGoodsSeckillAppointmentService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void addGoodsSeckill(GoodsSeckillDTO dto) { |
| | |
| | | in.add(0); |
| | | in.add(1); |
| | | wrapper4.in(GoodsSeckill::getStartStatus,in); |
| | | if(goodsSkuIdList.size()>0){ |
| | | wrapper4.in(GoodsSeckill::getGoodsSkuId,goodsSkuIdList); |
| | | } |
| | | |
| | | wrapper4.orderByAsc(GoodsSeckill::getSortNum); |
| | | Page<GoodsSeckill> page2 = this.page(page, wrapper4); |
| | | |
| | |
| | | }else{ |
| | | homeGoodsSeckillInfoVO.setIsCollection(1); |
| | | } |
| | | |
| | | LambdaQueryWrapper<GoodsSeckillAppointment> wrapper4= Wrappers.lambdaQuery(); |
| | | wrapper4.eq(GoodsSeckillAppointment::getDelFlag,0); |
| | | wrapper4.eq(GoodsSeckillAppointment::getMemberId,homeGoodsSkuDTO.getMemberId()); |
| | | wrapper4.eq(GoodsSeckillAppointment::getGoodsSeckillId,homeGoodsSkuDTO.getGoodsSkuId()); |
| | | List<GoodsSeckillAppointment> list2 = iGoodsSeckillAppointmentService.list(wrapper4); |
| | | if (list2.size()>0){ |
| | | homeGoodsSeckillInfoVO.setIsAppointment(2); |
| | | }else{ |
| | | homeGoodsSeckillInfoVO.setIsAppointment(1); |
| | | } |
| | | |
| | | return homeGoodsSeckillInfoVO; |
| | | } |
| | | } |