| | |
| | | import com.ruoyi.auction.mapper.AuctionBidRecordMapper; |
| | | import com.ruoyi.auction.mapper.AuctionSalesroomGoodsMapper; |
| | | import com.ruoyi.auction.mapper.AuctionSalesroomMapper; |
| | | import com.ruoyi.auction.service.IAuctionBrowseRecordService; |
| | | import com.ruoyi.auction.service.IAuctionSalesroomGoodsService; |
| | | import com.ruoyi.auction.service.IAuctionSalesroomService; |
| | | import com.ruoyi.common.core.constant.SecurityConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.enums.AuctionGoodsStatusEnum; |
| | | import com.ruoyi.common.core.enums.AuctionOrderTypeEnum; |
| | | import com.ruoyi.common.core.enums.AuctionStartStatusEnum; |
| | | import com.ruoyi.common.core.enums.BidStatusEnum; |
| | |
| | | |
| | | @Resource |
| | | private OrderClient orderClient; |
| | | |
| | | @Resource |
| | | |
| | | private IAuctionBrowseRecordService iAuctionBrowseRecordService; |
| | | |
| | | @Resource |
| | | private IAuctionSalesroomService iAuctionSalesroomService; |
| | | |
| | | |
| | | |
| | |
| | | forepartAuctionSalesroomGoodsVO.setStartTime(auctionSalesroomGoods.getStartTime()); |
| | | forepartAuctionSalesroomGoodsVO.setCoverPic(goodsSku.getCoverPic()); |
| | | forepartAuctionSalesroomGoodsVO.setDescription(goodsSku.getDescription()); |
| | | forepartAuctionSalesroomGoodsVO.setDetail(goodsSku.getDetail()); |
| | | forepartAuctionSalesroomGoodsVO.setYears(String.valueOf(goodsSku.getYears().getYear())); |
| | | forepartAuctionSalesroomGoodsVO.setUnit(goodsSku.getUnit()); |
| | | forepartAuctionSalesroomGoodsVO.setSpec(goodsSku.getSpec()); |
| | | forepartAuctionSalesroomGoodsVO.setSpecUnit(goodsSku.getSpecUnit()); |
| | |
| | | wrapper2.orderByAsc(AuctionSalesroomGoods::getSortNum); |
| | | wrapper2.last("limit 1"); |
| | | AuctionSalesroomGoods auctionSalesroomGoods = this.getOne(wrapper2); |
| | | auctionSalesroomGoods.setStatus(AuctionStartStatusEnum.IN_AUCTION); |
| | | auctionSalesroomGoods.setStatus(AuctionGoodsStatusEnum.IN_PROGRESS); |
| | | this.updateById(auctionSalesroomGoods); |
| | | |
| | | } |
| | |
| | | List<AuctionSalesroomGoods> auctionSalesroomGoods=this.list(wrapper2); |
| | | if (auctionSalesroomGoods.size()>0){ |
| | | for (AuctionSalesroomGoods salesroomGoods:auctionSalesroomGoods){ |
| | | salesroomGoods.setStatus(AuctionStartStatusEnum.ENDED); |
| | | iAuctionSalesroomGoodsService.updateById(salesroomGoods); |
| | | salesroomGoods.setStatus(AuctionGoodsStatusEnum.ENDED); |
| | | this.updateById(salesroomGoods); |
| | | |
| | | GoodsStockUpdDTO goodsStockUpdDTO = new GoodsStockUpdDTO(); |
| | | goodsStockUpdDTO.setGoodsSkuId(salesroomGoods.getGoodsSkuId()); |
| | |
| | | wrapper2.eq(AuctionSalesroomGoods::getDelFlag,0); |
| | | wrapper2.eq(AuctionSalesroomGoods::getGoodsSkuId,auctionSalesroomGoodsDTO.getGoodsSkuId()); |
| | | AuctionSalesroomGoods auctionSalesroomGoods=this.getOne(wrapper2); |
| | | auctionSalesroomGoods.setStatus(AuctionStartStatusEnum.IN_AUCTION); |
| | | auctionSalesroomGoods.setStatus(AuctionGoodsStatusEnum.IN_PROGRESS); |
| | | this.updateById(auctionSalesroomGoods); |
| | | |
| | | |
| | |
| | | wrapper2.eq(AuctionSalesroomGoods::getDelFlag,0); |
| | | wrapper2.eq(AuctionSalesroomGoods::getGoodsSkuId,auctionSalesroomGoodsDTO.getGoodsSkuId()); |
| | | AuctionSalesroomGoods auctionSalesroomGood=this.getOne(wrapper2); |
| | | AuctionSalesroom auctionSalesroom=this.getById(auctionSalesroomGood.getAuctionSalesroomId()); |
| | | AuctionSalesroom auctionSalesroom=iAuctionSalesroomService.getById(auctionSalesroomGood.getAuctionSalesroomId()); |
| | | |
| | | AuctionSalesroomGoods auctionSalesroomGoods=this.getById(auctionSalesroomGoodsDTO.getGoodsSkuId()); |
| | | List<AuctionBidRecord> auctionBidRecordList=new ArrayList<>(); |
| | | |
| | | if (auctionSalesroomGoods.getStatus().getCode()==1) { |
| | | LambdaQueryWrapper<AuctionBidRecord> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.eq(AuctionBidRecord::getAuctionSalesroomId,auctionSalesroomGoodsDTO.getAuctionSalesroomId()); |
| | | wrapper.eq(AuctionBidRecord::getTargetId, auctionSalesroomGoodsDTO.getGoodsSkuId()); |
| | | wrapper.eq(AuctionBidRecord::getDelFlag, 0); |
| | | wrapper.orderByDesc(AuctionBidRecord::getLastBidAmount); |
| | |
| | | } |
| | | } |
| | | |
| | | auctionSalesroomGood.setStatus(AuctionStartStatusEnum.ENDED); |
| | | auctionSalesroomGood.setStatus(AuctionGoodsStatusEnum.ENDED); |
| | | this.updateById(auctionSalesroomGood); |
| | | |
| | | } |
| | |
| | | AuctionSalesroomGoodsInfoVO.setStartTime(byId1.getStartTime()); |
| | | AuctionSalesroomGoodsInfoVO.setUnit(goodsSku.getUnit()); |
| | | AuctionSalesroomGoodsInfoVO.setDescription(goodsSku.getDescription()); |
| | | AuctionSalesroomGoodsInfoVO.setYears(goodsSku.getYears()); |
| | | AuctionSalesroomGoodsInfoVO.setDetail(goodsSku.getDetail()); |
| | | AuctionSalesroomGoodsInfoVO.setYears(String.valueOf(goodsSku.getYears().getYear())); |
| | | GoodsBrand data = goodsSkuClient.getBrandOne(goodsSku.getBrandId(), SecurityConstants.INNER).getData(); |
| | | GoodsCategory data1 = goodsSkuClient.getCategoryOne(goodsSku.getCategoryId(), SecurityConstants.INNER).getData(); |
| | | GoodsSeries data2 = goodsSkuClient.getSeriesOne(goodsSku.getSeriesId(), SecurityConstants.INNER).getData(); |