rentaiming
2024-05-17 15bd9f9a91ea66ff8a9677454d67bf6dc708a967
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/AuctionSalesroomGoodsController.java
@@ -65,14 +65,14 @@
            wrapper1.eq(AuctionSalesroomGoods::getDelFlag,0);
            wrapper1.orderByDesc(AuctionSalesroomGoods::getSortNum);
            wrapper.last("limit 1");
            auctionSalesroomGoods=auctionSalesroomGoods=iAuctionSalesroomGoodsService.getOne(wrapper1);
            auctionSalesroomGoods=iAuctionSalesroomGoodsService.getOne(wrapper1);
            if (auctionSalesroomGoods==null){
                LambdaQueryWrapper<AuctionSalesroomGoods> wrapper2=Wrappers.lambdaQuery();
                wrapper2.eq(AuctionSalesroomGoods::getStatus,1);
                wrapper2.eq(AuctionSalesroomGoods::getDelFlag,0);
                wrapper2.orderByAsc(AuctionSalesroomGoods::getSortNum);
                wrapper2.last("limit 1");
                auctionSalesroomGoods=auctionSalesroomGoods=iAuctionSalesroomGoodsService.getOne(wrapper2);
                auctionSalesroomGoods=iAuctionSalesroomGoodsService.getOne(wrapper2);
            }
        }
@@ -88,6 +88,14 @@
        auctionSalesroomGoodsVO.setCoverPic(goodsSku.getCoverPic());
        auctionSalesroomGoodsVO.setDescription(goodsSku.getDescription());
        auctionSalesroomGoodsVO.setUnit(goodsSku.getUnit());
        if (auctionSalesroomGoods.getStatus().getCode()==0){
            auctionSalesroomGoodsVO.setNextGoodsSkuName(auctionSalesroomGoods.getGoodsSkuName());
        }if (auctionSalesroomGoods.getStatus().getCode()==2){
            AuctionSalesroomGoods auctionSalesroomGoodsOne= iAuctionSalesroomGoodsService.getById(auctionSalesroomGoods.getGoodsSkuId()+1);
            if (auctionSalesroomGoodsOne!=null){
                auctionSalesroomGoodsVO.setNextGoodsSkuName(auctionSalesroomGoods.getGoodsSkuName());
            }
        }
        return auctionSalesroomGoodsVO;
    }