Commit 3f25378f by rongkailun

【新增】知识检索分类列表、知识检索详情、知识检索热点点击

parent 07c037e3
......@@ -11,9 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.*;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.service.AnnounceService;
import io.office.modules.manage.service.LogisticsService;
import io.office.modules.manage.service.MedicalService;
import io.office.modules.manage.service.*;
import io.office.modules.sys.controller.AbstractController;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
......@@ -22,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.*;
import io.office.modules.manage.service.NewsService;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
......@@ -361,6 +358,29 @@ public class NewsController extends AbstractController {
Map<String,Object> retMap = this.newsService.searchKnowledgeInfo(newsParams);
return R.ok().put("data", retMap);
}
/**知识检索下来分类*/
@Login
@PostMapping("/api/searchKnowledgeInfoList")
public R searchKnowledgeInfoList() {
List<Map<String,Object>> retMap = this.newsService.searchKnowledgeInfoList();
return R.ok().put("data", retMap);
}
/**热点点击*/
@Login
@GetMapping("/api/hotList")
public R hotList() {
List<Map<String,Object>> retMap = this.newsService.hotList();
return R.ok().put("data", retMap);
}
@Autowired
@Lazy
KnowledgeinfoService knowledgeinfoService;
/**查看*/
@Login
@GetMapping("/api/knowledgeinfo/{id}")
public R getInfo(@PathVariable("id") Integer id) {
KnowledgeinfoEntity retMap = this.knowledgeinfoService.getById(id);
return R.ok().put("data", retMap);
}
}
......@@ -67,4 +67,8 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List<String> selectChild(Map<String,Object> params);
List<Map<String, Object>> searchKnowledgeInfo(Map<String, Object> map);
List<Map<String, Object>> searchKnowledgeInfoList();
List<Map<String, Object>> hotList();
}
......@@ -66,5 +66,9 @@ public interface NewsService extends IService<NewsEntity> {
List<KnowledgeinfoEntity> selectTips(NewsParams newsParams);
Map<String, Object> searchKnowledgeInfo(NewsParams newsParams);
List<Map<String, Object>> searchKnowledgeInfoList();
List<Map<String, Object>> hotList();
}
......@@ -341,6 +341,18 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
return retMap;
}
@Override
public List<Map<String, Object>> searchKnowledgeInfoList() {
List<Map<String,Object>> list = this.newsDao.searchKnowledgeInfoList();
return list;
}
@Override
public List<Map<String, Object>> hotList() {
List<Map<String,Object>> list = this.newsDao.hotList();
return list;
}
private List<Map<String,Object>> getDataList(Map<String, Object> map) {
List<Map<String,Object>> list = this.newsDao.searchKnowledgeInfo(map);
return list;
......
......@@ -429,10 +429,7 @@
</select>
<select id="searchKnowledgeInfo" resultType="java.util.Map">
SELECT
t.Title,
t.knowledgeInfoID,
tt.description,
#{typeName} as type
top 6 Title,knowledgeInfoID,#{typeName} as type
FROM
knowledgeInfo t
LEFT JOIN knowledgeCategory tt ON t.knowledgeCategoryID = tt.knowledgeCategoryID
......@@ -446,4 +443,33 @@
</foreach>
</select>
<select id="searchKnowledgeInfoList" resultType="java.util.Map">
SELECT
t.knowledgeCategoryID,
case knowledgeCategoryID
when 40 then 'sptm'
when 45 then 'ewtm'
when 77 then 'rfid'
when 79 then 'ebXML'
when 81 then 'ecr'
when 83 then 'ecp'
when 85 then 'gds'
when 93 then 'zxcbm'
when 94 then 'dwbm'
when 95 then 'gln'
else 'else' end type,
t.description
FROM
knowledgeCategory t
WHERE
t.knowledgeCategoryID in('40','45','93','94','95','83','77','85','81','79')
</select>
<select id="hotList" resultType="java.util.Map">
SELECT
top 5 title,knowledgeInfoID
FROM
knowledgeInfo
ORDER BY
hits DESC
</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