| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.modules.pc.product.domain.Product; |
| | | import com.oying.modules.pc.product.domain.dto.ProductQueryCriteria; |
| | | import com.oying.modules.pc.product.domain.enums.ProductStatusEnum; |
| | | import com.oying.modules.pc.product.service.ProductImageService; |
| | | import com.oying.modules.pc.product.service.ProductLabelService; |
| | | import com.oying.modules.pc.product.service.ProductService; |
| | |
| | | criteria.setCategoryId(categoryId); |
| | | criteria.setSecondCategoryId(secondCategoryId); |
| | | criteria.setBlurry(blurry); |
| | | criteria.setShelfStatus(ProductStatusEnum.AVAILABLE.getValue()); |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | PageResult<Product> productPageResult = productService.queryAll(criteria, page); |
| | | |
| | |
| | | @ApiModelProperty(value = "商品标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "一级分类ID") |
| | | private Long categoryId; |
| | | |
| | | @ApiModelProperty(value = "二级分类ID") |
| | | private Long secondCategoryId; |
| | | |
| | | @ApiModelProperty(value = "状态") |
| | | private Integer status; |
| | | |
| | |
| | | private List<Product> getProductsByStoreId(Long storeId) { |
| | | ProductQueryCriteria criteria = new ProductQueryCriteria(); |
| | | criteria.setStoreId(storeId); |
| | | criteria.setStatus(ProductStatusEnum.AVAILABLE.getValue()); |
| | | criteria.setShelfStatus(ProductStatusEnum.AVAILABLE.getValue()); |
| | | criteria.setLimit(3); |
| | | return productService.queryAll(criteria); |
| | | } |