rentaiming
2024-06-12 7613f6b73a96039ea400aeba3d63c15ffaf04795
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java
@@ -249,12 +249,21 @@
        LambdaQueryWrapper<GoodsSku> wrapper3= Wrappers.lambdaQuery();
        wrapper3.eq(GoodsSku::getDelFlag,0);
        wrapper3.eq(GoodsSku::getListingStatus,0);
        wrapper3.like(GoodsSku::getSkuName,homeGoodsSkuDTO.getSkuName());
        wrapper3.eq(GoodsSku::getSkuName,homeGoodsSkuDTO.getSkuName());
        wrapper3.eq(GoodsSku::getBrandId,homeGoodsSkuDTO.getBrandId());
        wrapper3.eq(GoodsSku::getCategoryId,homeGoodsSkuDTO.getCategoryId());
        wrapper3.eq(GoodsSku::getSeriesId,homeGoodsSkuDTO.getSeriesId());
        wrapper3.eq(GoodsSku::getFlavorTypeId,homeGoodsSkuDTO.getFlavorTypeId());
        if (homeGoodsSkuDTO.getSkuName()!=null){
            wrapper3.like(GoodsSku::getSkuName,homeGoodsSkuDTO.getSkuName());
        }
        if (homeGoodsSkuDTO.getBrandId()!=null){
            wrapper3.eq(GoodsSku::getBrandId,homeGoodsSkuDTO.getBrandId());
        }
        if (homeGoodsSkuDTO.getCategoryId()!=null){
            wrapper3.eq(GoodsSku::getCategoryId,homeGoodsSkuDTO.getCategoryId());
        }
        if (homeGoodsSkuDTO.getSeriesId()!=null){
            wrapper3.eq(GoodsSku::getSeriesId,homeGoodsSkuDTO.getSeriesId());
        }
        if (homeGoodsSkuDTO.getFlavorTypeId()!=null){
            wrapper3.eq(GoodsSku::getFlavorTypeId,homeGoodsSkuDTO.getFlavorTypeId());
        }
        if (homeGoodsSkuDTO.getSort()==2){
            wrapper3.orderByAsc(GoodsSku::getPrice);
        }