| | |
| | | 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); |
| | | |
| | |
| | | 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); |
| | | } |
| | |
| | | if (StoreStatusEnum.OPEN.equals(businessStatus) && !AuditStatusEnum.APPROVED.equals(existingStatus)) { |
| | | throw new BadRequestException("店铺未审核"); |
| | | } |
| | | storeService.updateStatus(existingStore.getStoreId(), businessStatus.getValue(), existingStore.getVersion()); |
| | | existingStore.setStatus(businessStatus.getValue()); |
| | | existingStore.setBusinessStatus(businessStatus.getValue()); |
| | | storeService.update(existingStore, true); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | <!-- 店铺名称模糊查询 AND s.name LIKE CONCAT('%', #{criteria.blurry}, '%') --> |
| | | <if test="criteria.blurry != null and criteria.blurry != ''"> |
| | | AND MATCH(s.store_name) AGAINST(#{criteria.blurry} IN NATURAL LANGUAGE MODE) |
| | | AND s.store_name like concat('%', #{criteria.blurry}, '%') |
| | | </if> |
| | | |
| | | <!-- 营业状态 --> |