Merge pull request #198 from wenxwang/fix/admin-knowledge-remove-error

fix(Knowledge): 知识库删除失败
This commit is contained in:
evo
2025-09-27 19:08:17 +08:00
committed by GitHub
5 changed files with 24 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ package org.ruoyi.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.ruoyi.core.mapper.BaseMapperPlus;
import org.ruoyi.domain.KnowledgeInfo;
import org.ruoyi.domain.vo.KnowledgeInfoVo;
@@ -15,4 +16,10 @@ import org.ruoyi.domain.vo.KnowledgeInfoVo;
@Mapper
public interface KnowledgeInfoMapper extends BaseMapperPlus<KnowledgeInfo, KnowledgeInfoVo> {
/**
* 根据kid查询知识库
* @param kid 知识库id
* @return KnowledgeInfo
*/
KnowledgeInfo selectByKid(@Param("kid") String kid);
}

View File

@@ -61,7 +61,7 @@ public interface IKnowledgeInfoService {
/**
* 删除知识库
*/
void removeKnowledge(String id);
void removeKnowledge(String kid);
/**
* 上传附件

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.ruoyi.mapper.KnowledgeInfoMapper">
<select id="selectByKid" resultType="org.ruoyi.domain.KnowledgeInfo">
SELECT * FROM knowledge_info WHERE kid = #{kid}
</select>
</mapper>