Commit 69ee1a6c by 吴迪

【修改】知识管理

parent 85bae1c9
......@@ -58,7 +58,7 @@ public class KnowledgeinfoController extends AbstractController {
@RequestMapping("/info/{knowledgeinfoid}")
// @RequiresPermissions("manage:knowledgeinfo:info")
public R info(@PathVariable("knowledgeinfoid") Integer knowledgeinfoid){
KnowledgeinfoEntity knowledgeinfo = knowledgeinfoService.getById(knowledgeinfoid);
KnowledgeinfoEntity knowledgeinfo = knowledgeinfoService.knowledgeinfoById(knowledgeinfoid);
return R.ok().put("data", knowledgeinfo);
}
......
......@@ -10,6 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* ${comments}
......@@ -22,4 +23,7 @@ import java.util.List;
public interface KnowledgeinfoDao extends BaseMapper<KnowledgeinfoEntity> {
List<KnowledgeinfoEntity> knowledgeinfoList(@Param("newsParams") KnowledgeCategoryVo params, Page page);
KnowledgeinfoEntity knowledgeinfoById(@Param("id") Integer id);
}
......@@ -7,6 +7,7 @@ import io.office.modules.manage.entity.KnowledgeinfoEntity;
import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.dto.KnowledgeCategoryVo;
import io.office.modules.manage.entity.dto.NewsParams;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
......@@ -22,5 +23,8 @@ public interface KnowledgeinfoService extends IService<KnowledgeinfoEntity> {
PageUtils queryPage(Map<String, Object> params);
Page<KnowledgeinfoEntity> knowledgeinfoList(KnowledgeCategoryVo params, Page page);
KnowledgeinfoEntity knowledgeinfoById(Integer id);
}
......@@ -44,4 +44,10 @@ public class KnowledgeinfoServiceImpl extends ServiceImpl<KnowledgeinfoDao, Know
return page;
}
@Override
public KnowledgeinfoEntity knowledgeinfoById(Integer id) {
return knowledgeinfoDao.knowledgeinfoById(id);
}
}
\ No newline at end of file
......@@ -56,4 +56,21 @@
ORDER BY
inputdate DESC
</select>
<select id="knowledgeinfoById" resultMap="knowledgeinfoMap">
SELECT
c.knowledgeCategoryID class1id,
c.description parentCategoryName,
b.knowledgeCategoryID class2id,
b.description CategoryName,
a.*
FROM
knowledgeInfo a
LEFT JOIN knowledgeCategory b ON a.knowledgeCategoryID = b.knowledgeCategoryID
LEFT JOIN knowledgeCategory c ON b.parentCategoryID = c.knowledgeCategoryID
WHERE knowledgeinfoid = #{id}
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment