Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
3f25378f
Commit
3f25378f
authored
Dec 11, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】知识检索分类列表、知识检索详情、知识检索热点点击
parent
07c037e3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
9 deletions
+76
-9
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+25
-5
NewsDao.java
src/main/java/io/office/modules/manage/dao/NewsDao.java
+4
-0
NewsService.java
...in/java/io/office/modules/manage/service/NewsService.java
+4
-0
NewsServiceImpl.java
...o/office/modules/manage/service/impl/NewsServiceImpl.java
+12
-0
NewsDao.xml
src/main/resources/mapper/manage/NewsDao.xml
+31
-4
No files found.
src/main/java/io/office/modules/manage/controller/NewsController.java
View file @
3f25378f
...
@@ -11,9 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -11,9 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.*
;
import
io.office.modules.manage.entity.*
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.service.AnnounceService
;
import
io.office.modules.manage.service.*
;
import
io.office.modules.manage.service.LogisticsService
;
import
io.office.modules.manage.service.MedicalService
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.swagger.models.auth.In
;
import
io.swagger.models.auth.In
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -22,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -22,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
io.office.modules.manage.service.NewsService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.common.utils.R
;
...
@@ -361,6 +358,29 @@ public class NewsController extends AbstractController {
...
@@ -361,6 +358,29 @@ public class NewsController extends AbstractController {
Map
<
String
,
Object
>
retMap
=
this
.
newsService
.
searchKnowledgeInfo
(
newsParams
);
Map
<
String
,
Object
>
retMap
=
this
.
newsService
.
searchKnowledgeInfo
(
newsParams
);
return
R
.
ok
().
put
(
"data"
,
retMap
);
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
);
}
}
}
src/main/java/io/office/modules/manage/dao/NewsDao.java
View file @
3f25378f
...
@@ -67,4 +67,8 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
...
@@ -67,4 +67,8 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List
<
String
>
selectChild
(
Map
<
String
,
Object
>
params
);
List
<
String
>
selectChild
(
Map
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
searchKnowledgeInfo
(
Map
<
String
,
Object
>
map
);
List
<
Map
<
String
,
Object
>>
searchKnowledgeInfo
(
Map
<
String
,
Object
>
map
);
List
<
Map
<
String
,
Object
>>
searchKnowledgeInfoList
();
List
<
Map
<
String
,
Object
>>
hotList
();
}
}
src/main/java/io/office/modules/manage/service/NewsService.java
View file @
3f25378f
...
@@ -66,5 +66,9 @@ public interface NewsService extends IService<NewsEntity> {
...
@@ -66,5 +66,9 @@ public interface NewsService extends IService<NewsEntity> {
List
<
KnowledgeinfoEntity
>
selectTips
(
NewsParams
newsParams
);
List
<
KnowledgeinfoEntity
>
selectTips
(
NewsParams
newsParams
);
Map
<
String
,
Object
>
searchKnowledgeInfo
(
NewsParams
newsParams
);
Map
<
String
,
Object
>
searchKnowledgeInfo
(
NewsParams
newsParams
);
List
<
Map
<
String
,
Object
>>
searchKnowledgeInfoList
();
List
<
Map
<
String
,
Object
>>
hotList
();
}
}
src/main/java/io/office/modules/manage/service/impl/NewsServiceImpl.java
View file @
3f25378f
...
@@ -341,6 +341,18 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -341,6 +341,18 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
return
retMap
;
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
)
{
private
List
<
Map
<
String
,
Object
>>
getDataList
(
Map
<
String
,
Object
>
map
)
{
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
searchKnowledgeInfo
(
map
);
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
searchKnowledgeInfo
(
map
);
return
list
;
return
list
;
...
...
src/main/resources/mapper/manage/NewsDao.xml
View file @
3f25378f
...
@@ -429,10 +429,7 @@
...
@@ -429,10 +429,7 @@
</select>
</select>
<select
id=
"searchKnowledgeInfo"
resultType=
"java.util.Map"
>
<select
id=
"searchKnowledgeInfo"
resultType=
"java.util.Map"
>
SELECT
SELECT
t.Title,
top 6 Title,knowledgeInfoID,#{typeName} as type
t.knowledgeInfoID,
tt.description,
#{typeName} as type
FROM
FROM
knowledgeInfo t
knowledgeInfo t
LEFT JOIN knowledgeCategory tt ON t.knowledgeCategoryID = tt.knowledgeCategoryID
LEFT JOIN knowledgeCategory tt ON t.knowledgeCategoryID = tt.knowledgeCategoryID
...
@@ -446,4 +443,33 @@
...
@@ -446,4 +443,33 @@
</foreach>
</foreach>
</select>
</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>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment