| | |
| | | package cc.mrbird.febs.ai.service; |
| | | |
| | | import cc.mrbird.febs.ai.entity.AiProductCategory; |
| | | import cc.mrbird.febs.ai.req.productCategory.ApiProductCategoryAllDto; |
| | | import cc.mrbird.febs.ai.req.productCategory.ApiProductCategoryHotDto; |
| | | import cc.mrbird.febs.ai.req.productCategory.ApiProductCategoryPageDto; |
| | | import cc.mrbird.febs.ai.res.productCategory.ApiProductCategoryVo; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public interface AiProductCategoryService extends IService<AiProductCategory> { |
| | | |
| | | /** |
| | | * 根据ID查询AI产品类别 |
| | | * @param id 类别ID |
| | | * @return AI产品类别信息 |
| | | */ |
| | | AiProductCategory getById(String id); |
| | | |
| | | /** |
| | | * 根据公司ID查询AI产品类别列表 |
| | | * @param companyId 公司ID |
| | | * @return AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getByCompanyId(String companyId); |
| | | List<AiProductCategory> getListByQuery(LambdaQueryWrapper<AiProductCategory> query); |
| | | |
| | | /** |
| | | * 根据编码查询AI产品类别 |
| | | * @param code 类别编码 |
| | | * @return AI产品类别信息 |
| | | */ |
| | | AiProductCategory getByCode(String code); |
| | | Page<ApiProductCategoryVo> getPageListByQuery(Page<ApiProductCategoryVo> page , ApiProductCategoryPageDto dto); |
| | | |
| | | /** |
| | | * 根据名称查询AI产品类别列表 |
| | | * @param name 类别名称 |
| | | * @return AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getByName(String name); |
| | | FebsResponse hot(); |
| | | |
| | | /** |
| | | * 根据状态查询AI产品类别列表 |
| | | * @param state 状态 0-禁用 1-启用 2-已删除 |
| | | * @return AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getByState(Integer state); |
| | | FebsResponse hotV1(ApiProductCategoryHotDto dto); |
| | | |
| | | /** |
| | | * 根据是否推荐查询AI产品类别列表 |
| | | * @param hotState 是否推荐到首页 1-推荐 0-不推荐 |
| | | * @return AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getByHotState(Integer hotState); |
| | | FebsResponse hotV2(ApiProductCategoryHotDto dto); |
| | | |
| | | /** |
| | | * 根据公司ID和状态查询AI产品类别列表 |
| | | * @param companyId 公司ID |
| | | * @param state 状态 0-禁用 1-启用 2-已删除 |
| | | * @return AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getByCompanyIdAndState(String companyId, Integer state); |
| | | FebsResponse categoryChildList(ApiProductCategoryPageDto dto); |
| | | |
| | | /** |
| | | * 根据公司ID和推荐状态查询AI产品类别列表 |
| | | * @param companyId 公司ID |
| | | * @param hotState 是否推荐到首页 1-推荐 0-不推荐 |
| | | * @return AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getByCompanyIdAndHotState(String companyId, Integer hotState); |
| | | String getDefaultProductCategoryId(); |
| | | |
| | | /** |
| | | * 获取启用状态下的所有AI产品类别,按排序字段升序排列 |
| | | * @return 启用的AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getEnabledCategories(); |
| | | |
| | | /** |
| | | * 保存AI产品类别 |
| | | * @param aiProductCategory AI产品类别实体 |
| | | * @return 是否保存成功 |
| | | */ |
| | | boolean saveProductCategory(AiProductCategory aiProductCategory); |
| | | |
| | | /** |
| | | * 批量保存AI产品类别 |
| | | * @param productCategories AI产品类别列表 |
| | | * @return 是否保存成功 |
| | | */ |
| | | boolean saveBatchProductCategories(List<AiProductCategory> productCategories); |
| | | |
| | | /** |
| | | * 更新AI产品类别 |
| | | * @param aiProductCategory AI产品类别实体 |
| | | * @return 是否更新成功 |
| | | */ |
| | | boolean updateProductCategory(AiProductCategory aiProductCategory); |
| | | |
| | | /** |
| | | * 根据ID删除AI产品类别 |
| | | * @param id 类别ID |
| | | * @return 是否删除成功 |
| | | */ |
| | | boolean deleteById(String id); |
| | | |
| | | /** |
| | | * 根据公司ID删除AI产品类别 |
| | | * @param companyId 公司ID |
| | | * @return 是否删除成功 |
| | | */ |
| | | boolean deleteByCompanyId(String companyId); |
| | | FebsResponse allList(ApiProductCategoryAllDto dto); |
| | | } |