| | |
| | | package cc.mrbird.febs.ai.service; |
| | | |
| | | import cc.mrbird.febs.ai.entity.AiMemberRole; |
| | | import cc.mrbird.febs.ai.entity.AiProductCategory; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * AI产品类别 Service接口 |
| | |
| | | */ |
| | | AiProductCategory getById(String id); |
| | | |
| | | /** |
| | | * 根据公司ID查询AI产品类别列表 |
| | | * @param companyId 公司ID |
| | | * @return AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getByCompanyId(String companyId); |
| | | List<AiProductCategory> getList(); |
| | | |
| | | /** |
| | | * 根据编码查询AI产品类别 |
| | | * @param code 类别编码 |
| | | * @return AI产品类别信息 |
| | | */ |
| | | AiProductCategory getByCode(String code); |
| | | Map<String, AiProductCategory> selectMapByIds(Set<String> collect); |
| | | |
| | | /** |
| | | * 根据名称查询AI产品类别列表 |
| | | * @param name 类别名称 |
| | | * @return AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getByName(String name); |
| | | IPage<AiProductCategory> listInPage(AiProductCategory dto, QueryRequest request); |
| | | |
| | | /** |
| | | * 根据状态查询AI产品类别列表 |
| | | * @param state 状态 0-禁用 1-启用 2-已删除 |
| | | * @return AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getByState(Integer state); |
| | | FebsResponse changeState(String id, Integer type, Integer state); |
| | | |
| | | /** |
| | | * 根据是否推荐查询AI产品类别列表 |
| | | * @param hotState 是否推荐到首页 1-推荐 0-不推荐 |
| | | * @return AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getByHotState(Integer hotState); |
| | | FebsResponse add(AiProductCategory dto); |
| | | |
| | | /** |
| | | * 根据公司ID和状态查询AI产品类别列表 |
| | | * @param companyId 公司ID |
| | | * @param state 状态 0-禁用 1-启用 2-已删除 |
| | | * @return AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getByCompanyIdAndState(String companyId, Integer state); |
| | | FebsResponse update(AiProductCategory dto); |
| | | |
| | | /** |
| | | * 根据公司ID和推荐状态查询AI产品类别列表 |
| | | * @param companyId 公司ID |
| | | * @param hotState 是否推荐到首页 1-推荐 0-不推荐 |
| | | * @return AI产品类别列表 |
| | | */ |
| | | List<AiProductCategory> getByCompanyIdAndHotState(String companyId, Integer hotState); |
| | | FebsResponse delete(String id); |
| | | |
| | | /** |
| | | * 获取启用状态下的所有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); |
| | | List<AiProductCategory> categoryTree(); |
| | | } |