Package com.alibaba.cloud.ai.mapper
Interface SemanticModelMapper
- All Superinterfaces:
com.baomidou.mybatisplus.core.mapper.BaseMapper<SemanticModel>,com.baomidou.mybatisplus.core.mapper.Mapper<SemanticModel>
@Mapper
public interface SemanticModelMapper
extends com.baomidou.mybatisplus.core.mapper.BaseMapper<SemanticModel>
语义模型 Mapper 接口
- Author:
- Alibaba Cloud AI
-
Method Summary
Modifier and TypeMethodDescriptionintdisableById(Long id) 批量禁用字段intenableById(Long id) 批量启用字段searchByKeyword(String keyword) 根据关键词搜索语义模型selectByAgentId(Long agentId) 根据智能体ID查询语义模型列表selectByAgentIdAndEnabled(Long agentId, Boolean enabled) 根据智能体ID和启用状态查询语义模型Methods inherited from interface com.baomidou.mybatisplus.core.mapper.BaseMapper
delete, deleteBatchIds, deleteById, deleteById, deleteById, deleteByIds, deleteByIds, deleteByMap, exists, insert, insert, insert, insertOrUpdate, insertOrUpdate, insertOrUpdate, insertOrUpdate, insertOrUpdate, selectBatchIds, selectBatchIds, selectById, selectByIds, selectByIds, selectByMap, selectByMap, selectCount, selectList, selectList, selectList, selectList, selectMaps, selectMaps, selectMaps, selectMaps, selectMapsPage, selectObjs, selectObjs, selectOne, selectOne, selectPage, update, update, updateById, updateById, updateById
-
Method Details
-
selectByAgentId
@Select("SELECT * FROM semantic_model WHERE agent_id = #{agentId} ORDER BY created_time DESC") List<SemanticModel> selectByAgentId(@Param("agentId") Long agentId) 根据智能体ID查询语义模型列表 -
searchByKeyword
@Select("SELECT * FROM semantic_model WHERE agent_field_name LIKE CONCAT(\'%\', #{keyword}, \'%\') OR field_description LIKE CONCAT(\'%\', #{keyword}, \'%\') OR field_synonyms LIKE CONCAT(\'%\', #{keyword}, \'%\') ORDER BY created_time DESC") List<SemanticModel> searchByKeyword(@Param("keyword") String keyword) 根据关键词搜索语义模型 -
enableById
@Update("UPDATE semantic_model SET enabled = 1 WHERE id = #{id}") int enableById(@Param("id") Long id) 批量启用字段 -
disableById
@Update("UPDATE semantic_model SET enabled = 0 WHERE id = #{id}") int disableById(@Param("id") Long id) 批量禁用字段 -
selectByAgentIdAndEnabled
@Select("SELECT * FROM semantic_model WHERE agent_id = #{agentId} AND enabled = #{enabled} ORDER BY created_time DESC") List<SemanticModel> selectByAgentIdAndEnabled(@Param("agentId") Long agentId, @Param("enabled") Boolean enabled) 根据智能体ID和启用状态查询语义模型
-