Package com.alibaba.cloud.ai.mapper
Interface UserPromptConfigMapper
- All Superinterfaces:
com.baomidou.mybatisplus.core.mapper.BaseMapper<UserPromptConfig>,com.baomidou.mybatisplus.core.mapper.Mapper<UserPromptConfig>
@Mapper
public interface UserPromptConfigMapper
extends com.baomidou.mybatisplus.core.mapper.BaseMapper<UserPromptConfig>
用户提示词配置 Mapper 接口
- Author:
- Alibaba Cloud AI
-
Method Summary
Modifier and TypeMethodDescriptionintdisableAllByPromptType(String promptType) 禁用指定类型的所有配置intdisableById(String id) 禁用指定配置intenableById(String id) 启用指定配置selectActiveByPromptType(String promptType) 根据提示词类型查询启用的配置selectByPromptType(String promptType) 根据提示词类型查询配置列表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
-
selectByPromptType
@Select("SELECT * FROM user_prompt_config WHERE prompt_type = #{promptType} ORDER BY update_time DESC") List<UserPromptConfig> selectByPromptType(@Param("promptType") String promptType) 根据提示词类型查询配置列表 -
selectActiveByPromptType
@Select("SELECT * FROM user_prompt_config WHERE prompt_type = #{promptType} AND enabled = 1 LIMIT 1") UserPromptConfig selectActiveByPromptType(@Param("promptType") String promptType) 根据提示词类型查询启用的配置 -
disableAllByPromptType
@Update("UPDATE user_prompt_config SET enabled = 0 WHERE prompt_type = #{promptType}") int disableAllByPromptType(@Param("promptType") String promptType) 禁用指定类型的所有配置 -
enableById
@Update("UPDATE user_prompt_config SET enabled = 1 WHERE id = #{id}") int enableById(@Param("id") String id) 启用指定配置 -
disableById
@Update("UPDATE user_prompt_config SET enabled = 0 WHERE id = #{id}") int disableById(@Param("id") String id) 禁用指定配置
-