| | |
| | | * <p> |
| | | * 数据权限枚举 |
| | | * </p> |
| | | * |
| | | * @author Z |
| | | * @date 2020-05-07 |
| | | */ |
| | |
| | | THIS_LEVEL("本级", "自己机构的数据权限"), |
| | | |
| | | /* 自定义的数据权限 */ |
| | | CUSTOMIZE("自定义", "自定义的数据权限"); |
| | | CUSTOMIZE("自定义", "自定义的数据权限"), |
| | | |
| | | /* 消费者的数据权限 */ |
| | | BUYER("消费者", "消费者的数据权限"), |
| | | |
| | | /* 商户的数据权限 */ |
| | | MERCHANT("商户", "商户的数据权限"), |
| | | |
| | | /* 骑手的数据权限 */ |
| | | RIDER("骑手", "骑手的数据权限"), |
| | | |
| | | /* 供应商的数据权限 */ |
| | | SUPPLIER("供应商", "供应商的数据权限"), |
| | | |
| | | /* 代理商的数据权限 */ |
| | | AGENT("代理商", "代理商的数据权限"); |
| | | |
| | | private final String value; |
| | | private final String description; |
| | |
| | | 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> |
| | | |
| | | <!-- 营业状态 --> |