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
ba384dc0
Commit
ba384dc0
authored
Dec 15, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
210c56d9
76e5c9d1
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
613 additions
and
225 deletions
+613
-225
BikefirmController.java
.../office/modules/manage/controller/BikefirmController.java
+1
-3
CasesController.java
.../io/office/modules/manage/controller/CasesController.java
+5
-3
LogLoginController.java
.../office/modules/manage/controller/LogLoginController.java
+2
-4
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+102
-31
PartnersController.java
.../office/modules/manage/controller/PartnersController.java
+5
-3
TycpdmFirmChangeController.java
...modules/manage/controller/TycpdmFirmChangeController.java
+19
-5
TycpdmFirmController.java
...ffice/modules/manage/controller/TycpdmFirmController.java
+13
-1
CasesDao.java
src/main/java/io/office/modules/manage/dao/CasesDao.java
+3
-1
NewsDao.java
src/main/java/io/office/modules/manage/dao/NewsDao.java
+3
-0
TycpdmFirmChangeDao.java
...ava/io/office/modules/manage/dao/TycpdmFirmChangeDao.java
+14
-0
TycpdmFirmDao.java
...main/java/io/office/modules/manage/dao/TycpdmFirmDao.java
+3
-0
CasesService.java
...n/java/io/office/modules/manage/service/CasesService.java
+4
-1
NewsService.java
...in/java/io/office/modules/manage/service/NewsService.java
+3
-0
PartnersService.java
...ava/io/office/modules/manage/service/PartnersService.java
+1
-1
TycpdmFirmChangeService.java
...ffice/modules/manage/service/TycpdmFirmChangeService.java
+6
-0
CasesServiceImpl.java
.../office/modules/manage/service/impl/CasesServiceImpl.java
+26
-5
NewsServiceImpl.java
...o/office/modules/manage/service/impl/NewsServiceImpl.java
+197
-163
PartnersServiceImpl.java
...fice/modules/manage/service/impl/PartnersServiceImpl.java
+25
-4
TycpdmFirmChangeServiceImpl.java
...ules/manage/service/impl/TycpdmFirmChangeServiceImpl.java
+16
-0
TycpdmFirmServiceImpl.java
...ce/modules/manage/service/impl/TycpdmFirmServiceImpl.java
+10
-0
LogUtils.java
src/main/java/io/office/modules/manage/utils/LogUtils.java
+73
-0
DomesticCodeVo.java
...a/io/office/modules/manage/vo/request/DomesticCodeVo.java
+5
-0
SearchVo.java
...n/java/io/office/modules/manage/vo/response/SearchVo.java
+27
-0
NewsDao.xml
src/main/resources/mapper/manage/NewsDao.xml
+21
-0
TycpdmFirmChangeDao.xml
src/main/resources/mapper/manage/TycpdmFirmChangeDao.xml
+29
-0
No files found.
src/main/java/io/office/modules/manage/controller/BikefirmController.java
View file @
ba384dc0
...
@@ -128,9 +128,7 @@ public class BikefirmController {
...
@@ -128,9 +128,7 @@ public class BikefirmController {
//新增查询日志
//新增查询日志
searchgtinlogService
.
save
(
searchgtinlogEntity
);
searchgtinlogService
.
save
(
searchgtinlogEntity
);
return
R
.
ok
().
return
R
.
ok
().
put
(
"data"
,
bikefirmService
.
getBikeFirm
(
bikeFirmVo
));
put
(
"data"
,
bikefirmService
.
getBikeFirm
(
bikeFirmVo
));
}
}
...
...
src/main/java/io/office/modules/manage/controller/CasesController.java
View file @
ba384dc0
...
@@ -41,9 +41,11 @@ public class CasesController {
...
@@ -41,9 +41,11 @@ public class CasesController {
@RequestMapping
(
"/api/frontList"
)
@RequestMapping
(
"/api/frontList"
)
@Login
@Login
// @RequiresPermissions("manage:partners:list")
// @RequiresPermissions("manage:partners:list")
public
R
frontList
(){
public
R
frontList
(
@RequestBody
Map
<
String
,
Object
>
params
){
List
<
CasesEntity
>
casesList
=
this
.
casesService
.
frontList
();
return
R
.
ok
().
put
(
"casesList"
,
casesList
);
PageUtils
pageUtils
=
new
PageUtils
(
this
.
casesService
.
getPageList
(
params
));
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
...
...
src/main/java/io/office/modules/manage/controller/LogLoginController.java
View file @
ba384dc0
...
@@ -42,8 +42,6 @@ public class LogLoginController {
...
@@ -42,8 +42,6 @@ public class LogLoginController {
private
SysCaptchaService
sysCaptchaService
;
private
SysCaptchaService
sysCaptchaService
;
/**
/**
* 用户登录
* 用户登录
*/
*/
...
@@ -51,11 +49,11 @@ public class LogLoginController {
...
@@ -51,11 +49,11 @@ public class LogLoginController {
@Login
@Login
// @RequiresPermissions("manage:member:list")
// @RequiresPermissions("manage:member:list")
public
R
login
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
public
R
login
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
/*DomesticCodeVo domesticCodeVo = new DomesticCodeVo(
);
DomesticCodeVo
domesticCodeVo
=
new
DomesticCodeVo
(
params
.
get
(
"uuid"
).
toString
(),
params
.
get
(
"captcha"
).
toString
()
);
boolean
captcha
=
sysCaptchaService
.
validate
(
domesticCodeVo
.
getUuid
(),
domesticCodeVo
.
getCaptcha
());
boolean
captcha
=
sysCaptchaService
.
validate
(
domesticCodeVo
.
getUuid
(),
domesticCodeVo
.
getCaptcha
());
if
(!
captcha
){
if
(!
captcha
){
return
R
.
error
(
"验证码不正确"
);
return
R
.
error
(
"验证码不正确"
);
}
*/
}
return
R
.
ok
().
put
(
"data"
,
logLoginService
.
login
(
params
,
request
,
response
));
return
R
.
ok
().
put
(
"data"
,
logLoginService
.
login
(
params
,
request
,
response
));
}
}
...
...
src/main/java/io/office/modules/manage/controller/NewsController.java
View file @
ba384dc0
package
io
.
office
.
modules
.
manage
.
controller
;
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.security.Policy
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.*
;
import
io.office.modules.manage.service.*
;
import
io.office.modules.manage.vo.response.SearchVo
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.swagger.models.auth.In
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
oracle.jdbc.proxy.annotation.Post
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.*
;
...
@@ -181,6 +179,7 @@ public class NewsController extends AbstractController {
...
@@ -181,6 +179,7 @@ public class NewsController extends AbstractController {
PageUtils
pageUtils
=
new
PageUtils
(
page
);
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
/**
/**
* 医疗卫生
* 医疗卫生
*/
*/
...
@@ -200,6 +199,7 @@ public class NewsController extends AbstractController {
...
@@ -200,6 +199,7 @@ public class NewsController extends AbstractController {
@Lazy
@Lazy
@Autowired
@Autowired
MedicalService
medicalService
;
MedicalService
medicalService
;
@Login
@Login
@GetMapping
(
"/api/medicalInfo/{id}"
)
@GetMapping
(
"/api/medicalInfo/{id}"
)
public
R
medicalInfo
(
@PathVariable
(
"id"
)
String
id
)
{
public
R
medicalInfo
(
@PathVariable
(
"id"
)
String
id
)
{
...
@@ -219,6 +219,7 @@ public class NewsController extends AbstractController {
...
@@ -219,6 +219,7 @@ public class NewsController extends AbstractController {
PageUtils
pageUtils
=
new
PageUtils
(
page
);
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
/**
/**
* 其他
* 其他
*/
*/
...
@@ -231,6 +232,7 @@ public class NewsController extends AbstractController {
...
@@ -231,6 +232,7 @@ public class NewsController extends AbstractController {
PageUtils
pageUtils
=
new
PageUtils
(
page
);
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
/**
/**
* 食品安全追溯
* 食品安全追溯
*/
*/
...
@@ -263,6 +265,7 @@ public class NewsController extends AbstractController {
...
@@ -263,6 +265,7 @@ public class NewsController extends AbstractController {
@Lazy
@Lazy
@Autowired
@Autowired
LogisticsService
logisticsService
;
LogisticsService
logisticsService
;
@Login
@Login
@GetMapping
(
"/api/logostocsList/{id}"
)
@GetMapping
(
"/api/logostocsList/{id}"
)
public
R
logostocsList
(
@PathVariable
(
"id"
)
String
id
)
{
public
R
logostocsList
(
@PathVariable
(
"id"
)
String
id
)
{
...
@@ -270,7 +273,9 @@ public class NewsController extends AbstractController {
...
@@ -270,7 +273,9 @@ public class NewsController extends AbstractController {
return
R
.
ok
().
put
(
"data"
,
logisticsEntity
);
return
R
.
ok
().
put
(
"data"
,
logisticsEntity
);
}
}
/**应用动态*/
/**
* 应用动态
*/
@Login
@Login
@PostMapping
(
"/api/yydtList"
)
@PostMapping
(
"/api/yydtList"
)
public
R
yydtList
(
@RequestBody
NewsParams
newsParams
)
{
public
R
yydtList
(
@RequestBody
NewsParams
newsParams
)
{
...
@@ -279,7 +284,10 @@ public class NewsController extends AbstractController {
...
@@ -279,7 +284,10 @@ public class NewsController extends AbstractController {
PageUtils
pageUtils
=
new
PageUtils
(
page
);
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
/**视频在线*/
/**
* 视频在线
*/
@Login
@Login
@PostMapping
(
"/api/spList"
)
@PostMapping
(
"/api/spList"
)
public
R
spList
(
@RequestBody
NewsParams
newsParams
)
{
public
R
spList
(
@RequestBody
NewsParams
newsParams
)
{
...
@@ -289,7 +297,9 @@ public class NewsController extends AbstractController {
...
@@ -289,7 +297,9 @@ public class NewsController extends AbstractController {
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
/**公共通知*/
/**
* 公共通知
*/
@Login
@Login
@PostMapping
(
"/api/announceList"
)
@PostMapping
(
"/api/announceList"
)
public
R
announceList
(
@RequestBody
NewsParams
newsParams
)
{
public
R
announceList
(
@RequestBody
NewsParams
newsParams
)
{
...
@@ -298,7 +308,10 @@ public class NewsController extends AbstractController {
...
@@ -298,7 +308,10 @@ public class NewsController extends AbstractController {
PageUtils
pageUtils
=
new
PageUtils
(
page
);
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
/**公共通知详情*/
/**
* 公共通知详情
*/
@Autowired
@Autowired
AnnounceService
announceService
;
AnnounceService
announceService
;
...
@@ -309,7 +322,9 @@ public class NewsController extends AbstractController {
...
@@ -309,7 +322,9 @@ public class NewsController extends AbstractController {
return
R
.
ok
().
put
(
"data"
,
announceEntity
);
return
R
.
ok
().
put
(
"data"
,
announceEntity
);
}
}
/**左侧标准文档*/
/**
* 左侧标准文档
*/
@Login
@Login
@PostMapping
(
"/api/xgbzList"
)
@PostMapping
(
"/api/xgbzList"
)
public
R
xgbzList
(
@RequestBody
NewsParams
newsParams
)
{
public
R
xgbzList
(
@RequestBody
NewsParams
newsParams
)
{
...
@@ -319,7 +334,9 @@ public class NewsController extends AbstractController {
...
@@ -319,7 +334,9 @@ public class NewsController extends AbstractController {
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
/**右侧标准文档*/
/**
* 右侧标准文档
*/
@Login
@Login
@PostMapping
(
"/api/ycxgbzList"
)
@PostMapping
(
"/api/ycxgbzList"
)
public
R
ycxgbzList
(
@RequestBody
NewsParams
newsParams
)
{
public
R
ycxgbzList
(
@RequestBody
NewsParams
newsParams
)
{
...
@@ -327,7 +344,9 @@ public class NewsController extends AbstractController {
...
@@ -327,7 +344,9 @@ public class NewsController extends AbstractController {
return
R
.
ok
().
put
(
"data"
,
list
);
return
R
.
ok
().
put
(
"data"
,
list
);
}
}
/**政策法规*/
/**
* 政策法规
*/
@Login
@Login
@PostMapping
(
"/api/zcfgList"
)
@PostMapping
(
"/api/zcfgList"
)
public
R
zcfgList
(
@RequestBody
NewsParams
newsParams
)
{
public
R
zcfgList
(
@RequestBody
NewsParams
newsParams
)
{
...
@@ -336,14 +355,20 @@ public class NewsController extends AbstractController {
...
@@ -336,14 +355,20 @@ public class NewsController extends AbstractController {
PageUtils
pageUtils
=
new
PageUtils
(
page
);
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
/**专业术语*/
/**
* 专业术语
*/
@Login
@Login
@PostMapping
(
"/api/glossaryList"
)
@PostMapping
(
"/api/glossaryList"
)
public
R
glossaryList
(
@RequestBody
NewsParams
newsParams
)
{
public
R
glossaryList
(
@RequestBody
NewsParams
newsParams
)
{
List
<
GlossaryEntity
>
list
=
this
.
newsService
.
glossaryList
(
newsParams
);
List
<
GlossaryEntity
>
list
=
this
.
newsService
.
glossaryList
(
newsParams
);
return
R
.
ok
().
put
(
"data"
,
list
);
return
R
.
ok
().
put
(
"data"
,
list
);
}
}
/**小贴士*/
/**
* 小贴士
*/
@Login
@Login
@PostMapping
(
"/api/tips"
)
@PostMapping
(
"/api/tips"
)
public
R
tips
(
NewsParams
newsParams
)
{
public
R
tips
(
NewsParams
newsParams
)
{
...
@@ -351,39 +376,53 @@ public class NewsController extends AbstractController {
...
@@ -351,39 +376,53 @@ public class NewsController extends AbstractController {
return
R
.
ok
().
put
(
"data"
,
list
);
return
R
.
ok
().
put
(
"data"
,
list
);
}
}
/**知识检索*/
/**
* 知识检索
*/
@Login
@Login
@PostMapping
(
"/api/searchKnowledgeInfo"
)
@PostMapping
(
"/api/searchKnowledgeInfo"
)
public
R
searchKnowledgeInfo
(
@RequestBody
NewsParams
newsParams
)
{
public
R
searchKnowledgeInfo
(
@RequestBody
NewsParams
newsParams
)
{
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
@Login
@PostMapping
(
"/api/searchKnowledgeInfoList"
)
@PostMapping
(
"/api/searchKnowledgeInfoList"
)
public
R
searchKnowledgeInfoList
()
{
public
R
searchKnowledgeInfoList
()
{
List
<
Map
<
String
,
Object
>>
retMap
=
this
.
newsService
.
searchKnowledgeInfoList
();
List
<
Map
<
String
,
Object
>>
retMap
=
this
.
newsService
.
searchKnowledgeInfoList
();
return
R
.
ok
().
put
(
"data"
,
retMap
);
return
R
.
ok
().
put
(
"data"
,
retMap
);
}
}
/**热点点击*/
/**
* 热点点击
*/
@Login
@Login
@GetMapping
(
"/api/hotList"
)
@GetMapping
(
"/api/hotList"
)
public
R
hotList
()
{
public
R
hotList
()
{
List
<
Map
<
String
,
Object
>>
retMap
=
this
.
newsService
.
hotList
();
List
<
Map
<
String
,
Object
>>
retMap
=
this
.
newsService
.
hotList
();
return
R
.
ok
().
put
(
"data"
,
retMap
);
return
R
.
ok
().
put
(
"data"
,
retMap
);
}
}
@Autowired
@Autowired
@Lazy
@Lazy
KnowledgeinfoService
knowledgeinfoService
;
KnowledgeinfoService
knowledgeinfoService
;
/**查看*/
/**
* 查看
*/
@Login
@Login
@GetMapping
(
"/api/knowledgeinfo/{id}"
)
@GetMapping
(
"/api/knowledgeinfo/{id}"
)
public
R
getInfo
(
@PathVariable
(
"id"
)
Integer
id
)
{
public
R
getInfo
(
@PathVariable
(
"id"
)
Integer
id
)
{
KnowledgeinfoEntity
retMap
=
this
.
knowledgeinfoService
.
getById
(
id
);
KnowledgeinfoEntity
retMap
=
this
.
knowledgeinfoService
.
getById
(
id
);
return
R
.
ok
().
put
(
"data"
,
retMap
);
return
R
.
ok
().
put
(
"data"
,
retMap
);
}
}
/**资讯排行TOP10*/
/**
* 资讯排行TOP10
*/
@Login
@Login
@GetMapping
(
"/api/newsTop10"
)
@GetMapping
(
"/api/newsTop10"
)
public
R
newsTop10
()
{
public
R
newsTop10
()
{
...
@@ -391,7 +430,9 @@ public class NewsController extends AbstractController {
...
@@ -391,7 +430,9 @@ public class NewsController extends AbstractController {
return
R
.
ok
().
put
(
"data"
,
list
);
return
R
.
ok
().
put
(
"data"
,
list
);
}
}
/**知识检索分页列表*/
/**
* 知识检索分页列表
*/
@Login
@Login
@PostMapping
(
"/api/searchKnowledgePageList"
)
@PostMapping
(
"/api/searchKnowledgePageList"
)
public
R
searchKnowledgePageList
(
@RequestBody
NewsParams
params
)
{
public
R
searchKnowledgePageList
(
@RequestBody
NewsParams
params
)
{
...
@@ -402,7 +443,9 @@ public class NewsController extends AbstractController {
...
@@ -402,7 +443,9 @@ public class NewsController extends AbstractController {
}
}
/**党史学习教育专栏*/
/**
* 党史学习教育专栏
*/
@Login
@Login
@GetMapping
(
"/api/dsxxjyTop8"
)
@GetMapping
(
"/api/dsxxjyTop8"
)
public
R
dsxxjyTop8
()
{
public
R
dsxxjyTop8
()
{
...
@@ -411,7 +454,9 @@ public class NewsController extends AbstractController {
...
@@ -411,7 +454,9 @@ public class NewsController extends AbstractController {
}
}
/**中央和总局精神*/
/**
* 中央和总局精神
*/
@Login
@Login
@GetMapping
(
"/api/centerTop6"
)
@GetMapping
(
"/api/centerTop6"
)
public
R
centerTop6
()
{
public
R
centerTop6
()
{
...
@@ -420,7 +465,9 @@ public class NewsController extends AbstractController {
...
@@ -420,7 +465,9 @@ public class NewsController extends AbstractController {
}
}
/**规章制度top7*/
/**
* 规章制度top7
*/
@Login
@Login
@GetMapping
(
"/api/gzzdTop7"
)
@GetMapping
(
"/api/gzzdTop7"
)
public
R
gzzdTop7
()
{
public
R
gzzdTop7
()
{
...
@@ -429,7 +476,9 @@ public class NewsController extends AbstractController {
...
@@ -429,7 +476,9 @@ public class NewsController extends AbstractController {
}
}
/**图片资讯上方*/
/**
* 图片资讯上方
*/
@Login
@Login
@GetMapping
(
"/api/pictureTop4"
)
@GetMapping
(
"/api/pictureTop4"
)
public
R
pictureTop4
()
{
public
R
pictureTop4
()
{
...
@@ -438,7 +487,9 @@ public class NewsController extends AbstractController {
...
@@ -438,7 +487,9 @@ public class NewsController extends AbstractController {
}
}
/**上月资讯排行*/
/**
* 上月资讯排行
*/
@Login
@Login
@GetMapping
(
"/api/syzxphList"
)
@GetMapping
(
"/api/syzxphList"
)
public
R
syzxphList
()
{
public
R
syzxphList
()
{
...
@@ -446,30 +497,50 @@ public class NewsController extends AbstractController {
...
@@ -446,30 +497,50 @@ public class NewsController extends AbstractController {
return
R
.
ok
().
put
(
"data"
,
list
);
return
R
.
ok
().
put
(
"data"
,
list
);
}
}
/**专题推荐*/
/**
* 专题推荐
*/
@Login
@Login
@GetMapping
(
"/api/zttjList"
)
@GetMapping
(
"/api/zttjList"
)
public
R
zttjList
()
{
public
R
zttjList
()
{
List
<
NewtopicEntity
>
list
=
this
.
newsService
.
zttjList
();
List
<
NewtopicEntity
>
list
=
this
.
newsService
.
zttjList
();
return
R
.
ok
().
put
(
"data"
,
list
);
return
R
.
ok
().
put
(
"data"
,
list
);
}
}
@Autowired
@Autowired
@Lazy
@Lazy
NewtopicService
newtopicService
;
NewtopicService
newtopicService
;
/**专题推荐*/
/**
* 专题推荐
*/
@Login
@Login
@GetMapping
(
"/api/newsTopicInfo/{id}"
)
@GetMapping
(
"/api/newsTopicInfo/{id}"
)
public
R
newsTopicInfo
(
@PathVariable
(
"id"
)
String
id
)
{
public
R
newsTopicInfo
(
@PathVariable
(
"id"
)
String
id
)
{
NewtopicEntity
newtopic
=
newtopicService
.
getById
(
id
);
NewtopicEntity
newtopic
=
newtopicService
.
getById
(
id
);
return
R
.
ok
().
put
(
"data"
,
newtopic
);
return
R
.
ok
().
put
(
"data"
,
newtopic
);
}
}
/**相关链接*/
/**
* 相关链接
*/
@Login
@Login
@GetMapping
(
"/api/relatedLinks"
)
@GetMapping
(
"/api/relatedLinks"
)
public
R
relatedLinks
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
public
R
relatedLinks
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
List
<
NewsEntity
>
list
=
this
.
newsService
.
relatedLinks
(
params
);
List
<
NewsEntity
>
list
=
this
.
newsService
.
relatedLinks
(
params
);
return
R
.
ok
().
put
(
"data"
,
list
);
return
R
.
ok
().
put
(
"data"
,
list
);
}
}
@Login
@RequestMapping
(
"/api/getSearchInfo"
)
// @RequiresPermissions("manage:product:findPage")
public
R
getSearchInfo
(
@RequestBody
Map
<
String
,
String
>
param
)
{
Page
<
SearchVo
>
pag
=
this
.
newsService
.
getSearchInfo
(
param
.
get
(
"name"
)
==
null
?
null
:
param
.
get
(
"name"
),
param
.
get
(
"type"
)
==
null
?
null
:
param
.
get
(
"type"
),
new
Page
(
Integer
.
valueOf
(
param
.
get
(
"page"
)),
Integer
.
valueOf
(
param
.
get
(
"size"
))));
PageUtils
pageUtils
=
new
PageUtils
(
pag
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
}
}
src/main/java/io/office/modules/manage/controller/PartnersController.java
View file @
ba384dc0
...
@@ -54,9 +54,11 @@ public class PartnersController extends AbstractController {
...
@@ -54,9 +54,11 @@ public class PartnersController extends AbstractController {
@RequestMapping
(
"/api/frontList"
)
@RequestMapping
(
"/api/frontList"
)
@Login
@Login
// @RequiresPermissions("manage:partners:list")
// @RequiresPermissions("manage:partners:list")
public
R
frontList
(
/*@RequestBody Map<String, Object> params*/
){
public
R
frontList
(
@RequestBody
Map
<
String
,
Object
>
params
){
List
<
PartnersEntity
>
partnersList
=
this
.
partnersService
.
frontList
(
null
);
return
R
.
ok
().
put
(
"partnersList"
,
partnersList
);
PageUtils
pageUtils
=
new
PageUtils
(
this
.
partnersService
.
frontList
(
params
));
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
...
...
src/main/java/io/office/modules/manage/controller/TycpdmFirmChangeController.java
View file @
ba384dc0
...
@@ -3,7 +3,9 @@ package io.office.modules.manage.controller;
...
@@ -3,7 +3,9 @@ package io.office.modules.manage.controller;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Map
;
import
java.util.Map
;
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.TycpdmFirmEntity
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
@@ -35,14 +37,26 @@ public class TycpdmFirmChangeController {
...
@@ -35,14 +37,26 @@ public class TycpdmFirmChangeController {
/**
/**
* 列表
* 列表
*/
*/
@RequestMapping
(
"/list"
)
@RequestMapping
(
"/
authApi/find
list"
)
// @RequiresPermissions("manage:tycpdmfirmchange:list")
// @RequiresPermissions("manage:tycpdmfirmchange:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
public
R
list
(
@RequestBody
Map
<
String
,
Object
>
params
){
PageUtils
page
=
tycpdmFirmChangeService
.
queryPage
(
params
);
Page
<
TycpdmFirmChangeEntity
>
findlist
=
tycpdmFirmChangeService
.
findlist
(
params
,
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
).
toString
()),
return
R
.
ok
().
put
(
"page"
,
page
);
Integer
.
valueOf
(
params
.
get
(
"limit"
).
toString
())));
PageUtils
pageUtils
=
new
PageUtils
(
findlist
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
/**
* 根据用户名获取企业认证信息
*/
@RequestMapping
(
"/authApi/findUserName"
)
// @RequiresPermissions("manage:tycpdmfirm:save")
public
R
findUserName
(
@RequestParam
(
"userName"
)
String
userName
){
TycpdmFirmChangeEntity
userName1
=
tycpdmFirmChangeService
.
findUserName
(
userName
);
return
R
.
ok
().
put
(
"data"
,
userName1
);
}
/**
/**
* 信息
* 信息
...
...
src/main/java/io/office/modules/manage/controller/TycpdmFirmController.java
View file @
ba384dc0
...
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
io.office.common.exception.RRException
;
import
io.office.common.exception.RRException
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.dao.MemberDao
;
import
io.office.modules.manage.dao.MemberDao
;
import
io.office.modules.manage.dao.TycpdmFirmDao
;
import
io.office.modules.manage.entity.MemberEntity
;
import
io.office.modules.manage.entity.MemberEntity
;
import
io.office.modules.manage.entity.ProductEntity
;
import
io.office.modules.manage.entity.ProductEntity
;
import
io.office.modules.manage.entity.TycpdmFirmChangeEntity
;
import
io.office.modules.manage.entity.TycpdmFirmChangeEntity
;
...
@@ -50,6 +51,8 @@ public class TycpdmFirmController extends AbstractController {
...
@@ -50,6 +51,8 @@ public class TycpdmFirmController extends AbstractController {
private
TycpdmFirmService
tycpdmFirmService
;
private
TycpdmFirmService
tycpdmFirmService
;
@Autowired
@Autowired
private
TycpdmFirmDao
tycpdmFirmDao
;
@Autowired
private
TycpdmFirmChangeService
tycpdmFirmChangeService
;
private
TycpdmFirmChangeService
tycpdmFirmChangeService
;
@Autowired
@Autowired
private
MemberDao
memberDao
;
private
MemberDao
memberDao
;
...
@@ -103,9 +106,10 @@ public class TycpdmFirmController extends AbstractController {
...
@@ -103,9 +106,10 @@ public class TycpdmFirmController extends AbstractController {
*/
*/
@RequestMapping
(
"/authApi/save"
)
@RequestMapping
(
"/authApi/save"
)
// @RequiresPermissions("manage:tycpdmfirm:save")
// @RequiresPermissions("manage:tycpdmfirm:save")
public
R
save
(
@RequestBody
Map
body
,
@RequestParam
(
"status"
)
int
status
)
throws
InvocationTargetException
,
IllegalAccessException
{
public
R
save
(
@RequestBody
Map
body
)
throws
InvocationTargetException
,
IllegalAccessException
{
TycpdmFirmEntity
tycpdmFirm
=
new
TycpdmFirmEntity
();
TycpdmFirmEntity
tycpdmFirm
=
new
TycpdmFirmEntity
();
TycpdmFirmChangeEntity
tycpdmFirmChangeEntity
=
new
TycpdmFirmChangeEntity
();
TycpdmFirmChangeEntity
tycpdmFirmChangeEntity
=
new
TycpdmFirmChangeEntity
();
Integer
status
=
body
.
get
(
"status"
)==
null
?
0
:
Integer
.
valueOf
(
String
.
valueOf
(
body
.
get
(
"status"
)));
Integer
id
=
0
;
Integer
id
=
0
;
if
(
status
==
1
){
if
(
status
==
1
){
...
@@ -114,6 +118,14 @@ public class TycpdmFirmController extends AbstractController {
...
@@ -114,6 +118,14 @@ public class TycpdmFirmController extends AbstractController {
if
(
baseUser
==
null
){
if
(
baseUser
==
null
){
throw
new
RRException
(
"用户名不能为空"
);
throw
new
RRException
(
"用户名不能为空"
);
}
}
String
firmname
=
tycpdmFirm
.
getFirmname
();
if
(
firmname
==
null
||
""
.
equals
(
tycpdmFirm
)){
throw
new
RRException
(
"企业名称不能为空"
);
}
int
count
=
tycpdmFirmDao
.
selectByIdFirmName
(
firmname
,
1
);
if
(
count
>
0
){
throw
new
RRException
(
"企业名称已经存在"
);
}
//第一步不存储状态 第二部存储
//第一步不存储状态 第二部存储
//tycpdmFirm.setLogoutFlag(0); //审核状态 0待审核 1审核成功 2审核失败
//tycpdmFirm.setLogoutFlag(0); //审核状态 0待审核 1审核成功 2审核失败
tycpdmFirmService
.
save
(
tycpdmFirm
);
tycpdmFirmService
.
save
(
tycpdmFirm
);
...
...
src/main/java/io/office/modules/manage/dao/CasesDao.java
View file @
ba384dc0
package
io
.
office
.
modules
.
manage
.
dao
;
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.CasesEntity
;
import
io.office.modules.manage.entity.CasesEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
import
java.util.List
;
...
@@ -17,5 +19,5 @@ import java.util.List;
...
@@ -17,5 +19,5 @@ import java.util.List;
@Mapper
@Mapper
public
interface
CasesDao
extends
BaseMapper
<
CasesEntity
>
{
public
interface
CasesDao
extends
BaseMapper
<
CasesEntity
>
{
@Select
(
"select * from Cases where status=#{status} and levels>#{levels} order by id desc"
)
@Select
(
"select * from Cases where status=#{status} and levels>#{levels} order by id desc"
)
List
<
CasesEntity
>
selectByStatusAndLevels
(
String
status
,
String
levels
);
List
<
CasesEntity
>
selectByStatusAndLevels
(
@Param
(
"status"
)
String
status
,
@Param
(
"levels"
)
String
levels
,
Page
page
);
}
}
src/main/java/io/office/modules/manage/dao/NewsDao.java
View file @
ba384dc0
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
io.office.modules.manage.entity.*
;
import
io.office.modules.manage.entity.*
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.vo.response.SearchVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -92,4 +93,6 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
...
@@ -92,4 +93,6 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List
<
NewtopicEntity
>
zttjList
();
List
<
NewtopicEntity
>
zttjList
();
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
);
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
);
List
<
SearchVo
>
getSearchInfo
(
@Param
(
"name"
)
String
name
,
@Param
(
"type"
)
String
type
,
Page
page
);
}
}
src/main/java/io/office/modules/manage/dao/TycpdmFirmChangeDao.java
View file @
ba384dc0
package
io
.
office
.
modules
.
manage
.
dao
;
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.TycpdmFirmChangeEntity
;
import
io.office.modules.manage.entity.TycpdmFirmChangeEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.entity.TycpdmFirmEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Update
;
import
org.apache.ibatis.annotations.Update
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.data.repository.query.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* ${comments}
* ${comments}
*
*
...
@@ -20,4 +26,12 @@ public interface TycpdmFirmChangeDao extends BaseMapper<TycpdmFirmChangeEntity>
...
@@ -20,4 +26,12 @@ public interface TycpdmFirmChangeDao extends BaseMapper<TycpdmFirmChangeEntity>
@Update
(
"UPDATE tycpdm_firm_change SET logout_flag = #{logout_flag} WHERE id = #{id}"
)
@Update
(
"UPDATE tycpdm_firm_change SET logout_flag = #{logout_flag} WHERE id = #{id}"
)
void
updateBYIdLogoutFlag
(
@Param
(
"logout_flag"
)
String
logout_flag
,
@Param
(
"id"
)
String
id
);
void
updateBYIdLogoutFlag
(
@Param
(
"logout_flag"
)
String
logout_flag
,
@Param
(
"id"
)
String
id
);
Integer
findTycpdmFirmLogoutFlagCountALL
(
@Param
(
"levels"
)
Integer
levels
,
@Param
(
"logout_flag"
)
Integer
logout_flag
);
List
<
TycpdmFirmChangeEntity
>
selectTycpdmFirmList
(
Map
<
String
,
Object
>
params
,
Page
page
);
@Select
(
"select * from tycpdm_firm_change where base_user=#{userName}"
)
TycpdmFirmChangeEntity
findUserName
(
@Param
(
"userName"
)
String
userName
);
}
}
src/main/java/io/office/modules/manage/dao/TycpdmFirmDao.java
View file @
ba384dc0
...
@@ -35,4 +35,7 @@ public interface TycpdmFirmDao extends BaseMapper<TycpdmFirmEntity> {
...
@@ -35,4 +35,7 @@ public interface TycpdmFirmDao extends BaseMapper<TycpdmFirmEntity> {
@Update
(
"UPDATE tycpdm_firm SET logout_flag = #{logout_flag} WHERE f_id = #{id}"
)
@Update
(
"UPDATE tycpdm_firm SET logout_flag = #{logout_flag} WHERE f_id = #{id}"
)
void
updateBYIdLogoutFlag
(
@Param
(
"logout_flag"
)
String
logout_flag
,
@Param
(
"id"
)
String
id
);
void
updateBYIdLogoutFlag
(
@Param
(
"logout_flag"
)
String
logout_flag
,
@Param
(
"id"
)
String
id
);
@Select
(
"select count(1) from tycpdm_firm where firmName=#{firmname} and logout_flag=#{logout_flag}"
)
int
selectByIdFirmName
(
@Param
(
"firmname"
)
String
firmname
,
@Param
(
"logout_flag"
)
int
logout_flag
);
}
}
src/main/java/io/office/modules/manage/service/CasesService.java
View file @
ba384dc0
package
io
.
office
.
modules
.
manage
.
service
;
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.CasesEntity
;
import
io.office.modules.manage.entity.CasesEntity
;
...
@@ -18,7 +19,9 @@ public interface CasesService extends IService<CasesEntity> {
...
@@ -18,7 +19,9 @@ public interface CasesService extends IService<CasesEntity> {
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
List
<
CasesEntity
>
frontList
();
Page
<
CasesEntity
>
getPageList
(
Map
<
String
,
Object
>
params
);
}
}
src/main/java/io/office/modules/manage/service/NewsService.java
View file @
ba384dc0
...
@@ -6,6 +6,7 @@ import io.office.common.utils.PageUtils;
...
@@ -6,6 +6,7 @@ import io.office.common.utils.PageUtils;
import
io.office.common.utils.R
;
import
io.office.common.utils.R
;
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.vo.response.SearchVo
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
java.util.*
;
import
java.util.*
;
...
@@ -90,5 +91,7 @@ public interface NewsService extends IService<NewsEntity> {
...
@@ -90,5 +91,7 @@ public interface NewsService extends IService<NewsEntity> {
List
<
NewtopicEntity
>
zttjList
();
List
<
NewtopicEntity
>
zttjList
();
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
);
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
);
Page
<
SearchVo
>
getSearchInfo
(
String
name
,
String
type
,
Page
page
);
}
}
src/main/java/io/office/modules/manage/service/PartnersService.java
View file @
ba384dc0
...
@@ -27,6 +27,6 @@ public interface PartnersService extends IService<PartnersEntity> {
...
@@ -27,6 +27,6 @@ public interface PartnersService extends IService<PartnersEntity> {
R
verifyPartners
(
PartnersEntity
partnersEntity
,
SysUserEntity
user
);
R
verifyPartners
(
PartnersEntity
partnersEntity
,
SysUserEntity
user
);
List
<
PartnersEntity
>
frontList
(
Map
<
String
,
Object
>
params
);
Page
<
PartnersEntity
>
frontList
(
Map
<
String
,
Object
>
params
);
}
}
src/main/java/io/office/modules/manage/service/TycpdmFirmChangeService.java
View file @
ba384dc0
package
io
.
office
.
modules
.
manage
.
service
;
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.TycpdmFirmChangeEntity
;
import
io.office.modules.manage.entity.TycpdmFirmChangeEntity
;
import
io.office.modules.manage.entity.TycpdmFirmEntity
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -19,5 +21,9 @@ public interface TycpdmFirmChangeService extends IService<TycpdmFirmChangeEntity
...
@@ -19,5 +21,9 @@ public interface TycpdmFirmChangeService extends IService<TycpdmFirmChangeEntity
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
void
uploadFile
(
MultipartFile
file
,
Integer
id
);
void
uploadFile
(
MultipartFile
file
,
Integer
id
);
Page
<
TycpdmFirmChangeEntity
>
findlist
(
Map
<
String
,
Object
>
params
,
Page
page
);
TycpdmFirmChangeEntity
findUserName
(
String
userName
);
}
}
src/main/java/io/office/modules/manage/service/impl/CasesServiceImpl.java
View file @
ba384dc0
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
@@ -21,6 +23,7 @@ public class CasesServiceImpl extends ServiceImpl<CasesDao, CasesEntity> impleme
...
@@ -21,6 +23,7 @@ public class CasesServiceImpl extends ServiceImpl<CasesDao, CasesEntity> impleme
@Autowired
@Autowired
private
CasesDao
casesDao
;
private
CasesDao
casesDao
;
@Override
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
CasesEntity
>
page
=
this
.
page
(
IPage
<
CasesEntity
>
page
=
this
.
page
(
...
@@ -32,10 +35,27 @@ public class CasesServiceImpl extends ServiceImpl<CasesDao, CasesEntity> impleme
...
@@ -32,10 +35,27 @@ public class CasesServiceImpl extends ServiceImpl<CasesDao, CasesEntity> impleme
}
}
@Override
@Override
public
List
<
CasesEntity
>
frontList
()
{
public
Page
<
CasesEntity
>
getPageList
(
Map
<
String
,
Object
>
params
)
{
//E page, @Param("ew") Wrapper<T> queryWrapper
Page
page
=
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
).
toString
()),
Integer
.
valueOf
(
params
.
get
(
"size"
).
toString
()));
QueryWrapper
<
CasesEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"status"
,
"1"
);
queryWrapper
.
gt
(
"levels"
,
"0"
);
if
(
params
.
get
(
"title"
)
!=
null
&&
StringUtils
.
isNotBlank
(
params
.
get
(
"title"
).
toString
()))
{
queryWrapper
.
like
(
"title"
,
params
.
get
(
"title"
).
toString
());
}
if
(
params
.
get
(
"service"
)
!=
null
&&
StringUtils
.
isNotBlank
(
params
.
get
(
"service"
).
toString
()))
{
queryWrapper
.
like
(
"service"
,
params
.
get
(
"service"
).
toString
());
}
return
casesDao
.
selectPage
(
page
,
queryWrapper
);
}
/* public List<CasesEntity> frontList() {
String status="1";//代表审核状态,编辑从后台提交专题后,默认初始状态为status=0,审核成功status=1,审核失败status=-1
String status="1";//代表审核状态,编辑从后台提交专题后,默认初始状态为status=0,审核成功status=1,审核失败status=-1
String levels="0";//levels代表级别,取值从0到9。其中,0代表隐藏,1级以上可以显示,9级为最高级
String levels="0";//levels代表级别,取值从0到9。其中,0代表隐藏,1级以上可以显示,9级为最高级
return
casesDao
.
selectByStatusAndLevels
(
status
,
levels
);
return casesDao.selectByStatusAndLevels(status,levels
,page
);
}
}
*/
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/NewsServiceImpl.java
View file @
ba384dc0
...
@@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
io.office.common.utils.R
;
import
io.office.common.utils.R
;
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.vo.response.SearchVo
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -46,30 +49,30 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -46,30 +49,30 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
news
.
setStartdate
(
new
Date
());
news
.
setStartdate
(
new
Date
());
news
.
setPublicdate
(
new
Date
());
news
.
setPublicdate
(
new
Date
());
//二级栏目不为空时 classid取值二级栏目id值
//二级栏目不为空时 classid取值二级栏目id值
if
(
news
.
getCclassid
()
!=
null
)
{
if
(
news
.
getCclassid
()
!=
null
)
{
news
.
setClassid
(
news
.
getCclassid
());
news
.
setClassid
(
news
.
getCclassid
());
}
}
int
insert
=
baseMapper
.
insert
(
news
);
int
insert
=
baseMapper
.
insert
(
news
);
if
(
insert
>
0
)
{
if
(
insert
>
0
)
{
return
R
.
ok
(
"新增成功!"
);
return
R
.
ok
(
"新增成功!"
);
}
else
{
}
else
{
return
R
.
error
(
"新增失败!"
);
return
R
.
error
(
"新增失败!"
);
}
}
}
}
@Override
@Override
public
R
updateNews
(
NewsEntity
news
,
SysUserEntity
user
)
{
public
R
updateNews
(
NewsEntity
news
,
SysUserEntity
user
)
{
if
(
news
.
getId
()
==
null
)
{
if
(
news
.
getId
()
==
null
)
{
return
R
.
error
(
"id不能为空!"
);
return
R
.
error
(
"id不能为空!"
);
}
}
QueryWrapper
<
NewsEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
NewsEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
newsEntityQueryWrapper
.
eq
(
"id"
,
news
.
getId
());
newsEntityQueryWrapper
.
eq
(
"id"
,
news
.
getId
());
news
.
setEditor
(
user
.
getUsername
());
news
.
setEditor
(
user
.
getUsername
());
news
.
setLasteditor
(
user
.
getUsername
());
news
.
setLasteditor
(
user
.
getUsername
());
int
update
=
baseMapper
.
update
(
news
,
newsEntityQueryWrapper
);
int
update
=
baseMapper
.
update
(
news
,
newsEntityQueryWrapper
);
if
(
update
>
0
)
{
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功!"
);
return
R
.
ok
(
"修改成功!"
);
}
else
{
}
else
{
return
R
.
error
(
"修改失败!"
);
return
R
.
error
(
"修改失败!"
);
}
}
}
}
...
@@ -79,11 +82,11 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -79,11 +82,11 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
NewsEntity
news
=
new
NewsEntity
();
NewsEntity
news
=
new
NewsEntity
();
news
.
setLevels
(
0
);
news
.
setLevels
(
0
);
QueryWrapper
<
NewsEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
NewsEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
newsEntityQueryWrapper
.
in
(
"id"
,
ids
);
newsEntityQueryWrapper
.
in
(
"id"
,
ids
);
int
delete
=
baseMapper
.
update
(
news
,
newsEntityQueryWrapper
);
int
delete
=
baseMapper
.
update
(
news
,
newsEntityQueryWrapper
);
if
(
delete
>
0
)
{
if
(
delete
>
0
)
{
return
R
.
ok
(
"删除成功!"
);
return
R
.
ok
(
"删除成功!"
);
}
else
{
}
else
{
return
R
.
error
(
"删除失败!"
);
return
R
.
error
(
"删除失败!"
);
}
}
}
}
...
@@ -94,11 +97,11 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -94,11 +97,11 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
news
.
setCheckdate
(
new
Date
());
news
.
setCheckdate
(
new
Date
());
news
.
setLasteditor
(
user
.
getUsername
());
news
.
setLasteditor
(
user
.
getUsername
());
QueryWrapper
<
NewsEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
NewsEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
newsEntityQueryWrapper
.
eq
(
"id"
,
news
.
getId
());
newsEntityQueryWrapper
.
eq
(
"id"
,
news
.
getId
());
int
verify
=
baseMapper
.
update
(
news
,
newsEntityQueryWrapper
);
int
verify
=
baseMapper
.
update
(
news
,
newsEntityQueryWrapper
);
if
(
verify
>
0
)
{
if
(
verify
>
0
)
{
return
R
.
ok
(
"审核成功!"
);
return
R
.
ok
(
"审核成功!"
);
}
else
{
}
else
{
return
R
.
error
(
"审核失败!"
);
return
R
.
error
(
"审核失败!"
);
}
}
}
}
...
@@ -127,77 +130,76 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -127,77 +130,76 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
String
name
=
this
.
newsDao
.
selectClassName
(
classid
);
String
name
=
this
.
newsDao
.
selectClassName
(
classid
);
return
name
;
return
name
;
}
}
/**
/**
*
* 行业应用
* 行业应用
*
*/
* */
@Override
@Override
public
Page
<
NewsEntity
>
industryApplication
(
NewsParams
newsParams
,
Page
page
)
{
public
Page
<
NewsEntity
>
industryApplication
(
NewsParams
newsParams
,
Page
page
)
{
List
<
NewsEntity
>
list
=
this
.
newsDao
.
industryApplication
(
newsParams
,
page
);
List
<
NewsEntity
>
list
=
this
.
newsDao
.
industryApplication
(
newsParams
,
page
);
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
}
@Override
@Override
public
Page
<
MedicalEntity
>
medicalList
(
NewsParams
newsParams
,
Page
page
)
{
public
Page
<
MedicalEntity
>
medicalList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
MedicalEntity
>
list
=
this
.
newsDao
.
medicalList
(
newsParams
,
page
);
List
<
MedicalEntity
>
list
=
this
.
newsDao
.
medicalList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
}
@Override
@Override
public
Page
<
NewsEntity
>
iotList
(
NewsParams
newsParams
,
Page
page
)
{
public
Page
<
NewsEntity
>
iotList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
NewsEntity
>
list
=
this
.
newsDao
.
iotList
(
newsParams
,
page
);
List
<
NewsEntity
>
list
=
this
.
newsDao
.
iotList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
}
@Override
@Override
public
Page
<
NewsEntity
>
otherList
(
NewsParams
newsParams
,
Page
page
)
{
public
Page
<
NewsEntity
>
otherList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
NewsEntity
>
list
=
this
.
newsDao
.
otherList
(
newsParams
,
page
);
List
<
NewsEntity
>
list
=
this
.
newsDao
.
otherList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
}
@Override
@Override
public
Page
<
NewsEntity
>
foodSafetyList
(
NewsParams
newsParams
,
Page
page
)
{
public
Page
<
NewsEntity
>
foodSafetyList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
NewsEntity
>
list
=
this
.
newsDao
.
foodSafetyList
(
newsParams
,
page
);
List
<
NewsEntity
>
list
=
this
.
newsDao
.
foodSafetyList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
}
@Override
@Override
public
Page
<
LogisticsEntity
>
logostocsList
(
NewsParams
newsParams
,
Page
page
)
{
public
Page
<
LogisticsEntity
>
logostocsList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
LogisticsEntity
>
list
=
this
.
newsDao
.
logostocsList
(
newsParams
,
page
);
List
<
LogisticsEntity
>
list
=
this
.
newsDao
.
logostocsList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
}
@Override
@Override
public
Page
<
NewsEntity
>
yydtList
(
NewsParams
newsParams
,
Page
page
)
{
public
Page
<
NewsEntity
>
yydtList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
NewsEntity
>
list
=
this
.
newsDao
.
yydtList
(
newsParams
,
page
);
List
<
NewsEntity
>
list
=
this
.
newsDao
.
yydtList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
}
@Override
@Override
public
Page
<
NewsEntity
>
spList
(
NewsParams
newsParams
,
Page
page
)
{
public
Page
<
NewsEntity
>
spList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
NewsEntity
>
list
=
this
.
newsDao
.
spList
(
newsParams
,
page
);
List
<
NewsEntity
>
list
=
this
.
newsDao
.
spList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
}
@Override
@Override
public
Page
<
AnnounceEntity
>
announceList
(
NewsParams
newsParams
,
Page
page
)
{
public
Page
<
AnnounceEntity
>
announceList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
AnnounceEntity
>
list
=
this
.
newsDao
.
announceList
(
newsParams
,
page
);
List
<
AnnounceEntity
>
list
=
this
.
newsDao
.
announceList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
}
@Override
@Override
public
Page
<
PolicyEntity
>
xgbzList
(
NewsParams
newsParams
,
Page
page
)
{
public
Page
<
PolicyEntity
>
xgbzList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
PolicyEntity
>
list
=
this
.
newsDao
.
xgbzList
(
newsParams
,
page
);
List
<
PolicyEntity
>
list
=
this
.
newsDao
.
xgbzList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
}
...
@@ -210,7 +212,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -210,7 +212,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
@Override
public
Page
<
PolicyEntity
>
zcfgList
(
NewsParams
newsParams
,
Page
page
)
{
public
Page
<
PolicyEntity
>
zcfgList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
PolicyEntity
>
list
=
this
.
newsDao
.
zcfgList
(
newsParams
,
page
);
List
<
PolicyEntity
>
list
=
this
.
newsDao
.
zcfgList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
}
...
@@ -218,8 +220,8 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -218,8 +220,8 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
@Override
public
List
<
GlossaryEntity
>
glossaryList
(
NewsParams
newsParams
)
{
public
List
<
GlossaryEntity
>
glossaryList
(
NewsParams
newsParams
)
{
List
<
GlossaryEntity
>
list
=
this
.
newsDao
.
glossaryList
(
newsParams
);
List
<
GlossaryEntity
>
list
=
this
.
newsDao
.
glossaryList
(
newsParams
);
if
(
"4"
.
equals
(
newsParams
.
getType
()))
{
if
(
"4"
.
equals
(
newsParams
.
getType
()))
{
list
=
list
.
stream
().
filter
(
item
->
item
.
getTitleEn
().
substring
(
0
,
1
).
equals
(
newsParams
.
getTitle
())).
collect
(
Collectors
.
toList
());
list
=
list
.
stream
().
filter
(
item
->
item
.
getTitleEn
().
substring
(
0
,
1
).
equals
(
newsParams
.
getTitle
())).
collect
(
Collectors
.
toList
());
}
}
return
list
;
return
list
;
}
}
...
@@ -233,9 +235,9 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -233,9 +235,9 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
@Override
public
Map
<
String
,
Object
>
searchKnowledgeInfo
(
NewsParams
newsParams
)
{
public
Map
<
String
,
Object
>
searchKnowledgeInfo
(
NewsParams
newsParams
)
{
final
Map
<
String
,
Object
>[]
map
=
new
Map
[]{
new
HashMap
<>()};
final
Map
<
String
,
Object
>[]
map
=
new
Map
[]{
new
HashMap
<>()};
Map
<
String
,
Object
>
retMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
retMap
=
new
HashMap
<>();
List
<
String
>
list
=
new
ArrayList
<>();
List
<
String
>
list
=
new
ArrayList
<>();
if
(
"all"
.
equals
(
newsParams
.
getType
()))
{
if
(
"all"
.
equals
(
newsParams
.
getType
()))
{
list
.
add
(
"sptm"
);
list
.
add
(
"sptm"
);
list
.
add
(
"ewtm"
);
list
.
add
(
"ewtm"
);
list
.
add
(
"zxcbm"
);
list
.
add
(
"zxcbm"
);
...
@@ -246,101 +248,101 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -246,101 +248,101 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
list
.
add
(
"gds"
);
list
.
add
(
"gds"
);
list
.
add
(
"ecr"
);
list
.
add
(
"ecr"
);
list
.
add
(
"ebXML"
);
list
.
add
(
"ebXML"
);
}
else
{
}
else
{
list
.
add
(
newsParams
.
getType
());
list
.
add
(
newsParams
.
getType
());
}
}
list
.
stream
().
forEach
(
item
->
{
list
.
stream
().
forEach
(
item
->
{
//判断是否是全部分类
//判断是否是全部分类
if
(
"sptm"
.
equals
(
item
))
{
if
(
"sptm"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"40"
);
map
[
0
].
put
(
"name"
,
"40"
);
List
<
String
>
child
=
getChild
(
map
[
0
]);
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"sptm"
);
map
[
0
].
put
(
"typeName"
,
"sptm"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"sptm"
,
dataList
);
retMap
.
put
(
"sptm"
,
dataList
);
}
else
if
(
"ewtm"
.
equals
(
item
))
{
}
else
if
(
"ewtm"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"45"
);
map
[
0
].
put
(
"name"
,
"45"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"ewtm"
);
map
[
0
].
put
(
"typeName"
,
"ewtm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"ewtm"
,
dataList
);
retMap
.
put
(
"ewtm"
,
dataList
);
}
else
if
(
"zxcbm"
.
equals
(
item
))
{
}
else
if
(
"zxcbm"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"93"
);
map
[
0
].
put
(
"name"
,
"93"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"zxcbm"
);
map
[
0
].
put
(
"typeName"
,
"zxcbm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"zxcbm"
,
dataList
);
retMap
.
put
(
"zxcbm"
,
dataList
);
}
else
if
(
"dwbm"
.
equals
(
item
))
{
}
else
if
(
"dwbm"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"94"
);
map
[
0
].
put
(
"name"
,
"94"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"dwbm"
);
map
[
0
].
put
(
"typeName"
,
"dwbm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"dwbm"
,
dataList
);
retMap
.
put
(
"dwbm"
,
dataList
);
}
else
if
(
"gln"
.
equals
(
item
))
{
}
else
if
(
"gln"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"95"
);
map
[
0
].
put
(
"name"
,
"95"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"gln"
);
map
[
0
].
put
(
"typeName"
,
"gln"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"gln"
,
dataList
);
retMap
.
put
(
"gln"
,
dataList
);
}
else
if
(
"epc"
.
equals
(
item
))
{
}
else
if
(
"epc"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"83"
);
map
[
0
].
put
(
"name"
,
"83"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"epc"
);
map
[
0
].
put
(
"typeName"
,
"epc"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"epc"
,
dataList
);
retMap
.
put
(
"epc"
,
dataList
);
}
else
if
(
"rfid"
.
equals
(
item
))
{
}
else
if
(
"rfid"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"77"
);
map
[
0
].
put
(
"name"
,
"77"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"rfid"
);
map
[
0
].
put
(
"typeName"
,
"rfid"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"rfid"
,
dataList
);
retMap
.
put
(
"rfid"
,
dataList
);
}
else
if
(
"gds"
.
equals
(
item
))
{
}
else
if
(
"gds"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"85"
);
map
[
0
].
put
(
"name"
,
"85"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"gds"
);
map
[
0
].
put
(
"typeName"
,
"gds"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"gds"
,
dataList
);
retMap
.
put
(
"gds"
,
dataList
);
}
else
if
(
"ecr"
.
equals
(
item
))
{
}
else
if
(
"ecr"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"81"
);
map
[
0
].
put
(
"name"
,
"81"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"ecr"
);
map
[
0
].
put
(
"typeName"
,
"ecr"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"ecr"
,
dataList
);
retMap
.
put
(
"ecr"
,
dataList
);
}
else
if
(
"ebXML"
.
equals
(
item
))
{
}
else
if
(
"ebXML"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"79"
);
map
[
0
].
put
(
"name"
,
"79"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"ebXML"
);
map
[
0
].
put
(
"typeName"
,
"ebXML"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"ebXML"
,
dataList
);
retMap
.
put
(
"ebXML"
,
dataList
);
}
}
});
});
return
retMap
;
return
retMap
;
...
@@ -348,13 +350,13 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -348,13 +350,13 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
searchKnowledgeInfoList
()
{
public
List
<
Map
<
String
,
Object
>>
searchKnowledgeInfoList
()
{
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
searchKnowledgeInfoList
();
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
searchKnowledgeInfoList
();
return
list
;
return
list
;
}
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
hotList
()
{
public
List
<
Map
<
String
,
Object
>>
hotList
()
{
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
hotList
();
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
hotList
();
return
list
;
return
list
;
}
}
...
@@ -366,94 +368,94 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -366,94 +368,94 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
@Override
public
Page
<
List
<
Map
<
String
,
Object
>>>
searchKnowledgePageList
(
NewsParams
newsParams
,
Page
page
)
{
public
Page
<
List
<
Map
<
String
,
Object
>>>
searchKnowledgePageList
(
NewsParams
newsParams
,
Page
page
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
"sptm"
.
equals
(
newsParams
.
getType
()))
{
if
(
"sptm"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"40"
);
map
.
put
(
"name"
,
"40"
);
List
<
String
>
child
=
getChild
(
map
);
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"sptm"
);
map
.
put
(
"typeName"
,
"sptm"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
page
.
setRecords
(
dataList
);
}
else
if
(
"ewtm"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"ewtm"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"45"
);
map
.
put
(
"name"
,
"45"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"ewtm"
);
map
.
put
(
"typeName"
,
"ewtm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
page
.
setRecords
(
dataList
);
}
else
if
(
"zxcbm"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"zxcbm"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"93"
);
map
.
put
(
"name"
,
"93"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"zxcbm"
);
map
.
put
(
"typeName"
,
"zxcbm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
page
.
setRecords
(
dataList
);
}
else
if
(
"dwbm"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"dwbm"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"94"
);
map
.
put
(
"name"
,
"94"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"dwbm"
);
map
.
put
(
"typeName"
,
"dwbm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
page
.
setRecords
(
dataList
);
}
else
if
(
"gln"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"gln"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"95"
);
map
.
put
(
"name"
,
"95"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"gln"
);
map
.
put
(
"typeName"
,
"gln"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
page
.
setRecords
(
dataList
);
}
else
if
(
"epc"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"epc"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"83"
);
map
.
put
(
"name"
,
"83"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"list"
,
child
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
page
.
setRecords
(
dataList
);
}
else
if
(
"rfid"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"rfid"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"77"
);
map
.
put
(
"name"
,
"77"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"list"
,
child
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
page
.
setRecords
(
dataList
);
}
else
if
(
"gds"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"gds"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"85"
);
map
.
put
(
"name"
,
"85"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"gds"
);
map
.
put
(
"typeName"
,
"gds"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
page
.
setRecords
(
dataList
);
}
else
if
(
"ecr"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"ecr"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"81"
);
map
.
put
(
"name"
,
"81"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"ecr"
);
map
.
put
(
"typeName"
,
"ecr"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
page
.
setRecords
(
dataList
);
}
else
if
(
"ebXML"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"ebXML"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"79"
);
map
.
put
(
"name"
,
"79"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"ebXML"
);
map
.
put
(
"typeName"
,
"ebXML"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
page
.
setRecords
(
dataList
);
}
}
return
page
;
return
page
;
...
@@ -504,19 +506,19 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -504,19 +506,19 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
@Override
public
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
)
{
public
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
)
{
StringBuffer
stringBuffer
=
new
StringBuffer
();
StringBuffer
stringBuffer
=
new
StringBuffer
();
if
(
params
.
containsKey
(
"keyword"
))
{
if
(
params
.
containsKey
(
"keyword"
))
{
if
(
StringUtils
.
isNotBlank
(
String
.
valueOf
(
params
.
get
(
"keyword"
)))){
if
(
StringUtils
.
isNotBlank
(
String
.
valueOf
(
params
.
get
(
"keyword"
))))
{
String
[]
keywords
=
params
.
get
(
"keyword"
).
toString
().
split
(
","
).
length
==
0
?
params
.
get
(
"keyword"
).
toString
().
split
(
","
)
:
params
.
get
(
"keyword"
).
toString
().
split
(
","
);
String
[]
keywords
=
params
.
get
(
"keyword"
).
toString
().
split
(
","
).
length
==
0
?
params
.
get
(
"keyword"
).
toString
().
split
(
","
)
:
params
.
get
(
"keyword"
).
toString
().
split
(
","
);
int
length
=
keywords
.
length
;
int
length
=
keywords
.
length
;
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
stringBuffer
.
append
(
"keyword LIKE concat ('%','"
)
stringBuffer
.
append
(
"keyword LIKE concat ('%','"
)
.
append
(
keywords
[
i
]).
append
(
"', '%')"
);
.
append
(
keywords
[
i
]).
append
(
"', '%')"
);
if
(
i
!=
length
-
1
)
{
if
(
i
!=
length
-
1
)
{
stringBuffer
.
append
(
" or "
);
stringBuffer
.
append
(
" or "
);
}
}
}
}
params
.
put
(
"sql"
,
stringBuffer
.
toString
());
params
.
put
(
"sql"
,
stringBuffer
.
toString
());
}
}
}
}
List
<
NewsEntity
>
list
=
this
.
newsDao
.
relatedLinks
(
params
);
List
<
NewsEntity
>
list
=
this
.
newsDao
.
relatedLinks
(
params
);
...
@@ -524,12 +526,12 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -524,12 +526,12 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
}
}
private
List
<
Map
<
String
,
Object
>>
getDataListNew
(
Map
<
String
,
Object
>
map
,
Page
page
)
{
private
List
<
Map
<
String
,
Object
>>
getDataListNew
(
Map
<
String
,
Object
>
map
,
Page
page
)
{
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
searchKnowledgeInfoNewList
(
map
,
page
);
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
searchKnowledgeInfoNewList
(
map
,
page
);
return
list
;
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
;
}
}
...
@@ -539,4 +541,35 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -539,4 +541,35 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
}
}
@Override
public
Page
<
SearchVo
>
getSearchInfo
(
String
name
,
String
type
,
Page
page
)
{
if
(
StringUtils
.
isNotBlank
(
type
)&&
type
.
indexOf
(
","
)>-
1
)
{
String
[]
splitStr
=
type
.
split
(
","
);
String
finalStr
=
""
;
for
(
String
s
:
splitStr
)
{
finalStr
=
s
+
","
;
}
type
=
finalStr
.
substring
(
0
,
finalStr
.
length
()-
1
);
}
List
<
SearchVo
>
list
=
this
.
newsDao
.
getSearchInfo
(
name
,
type
,
page
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
SearchVo
searchVo
:
list
)
{
if
(
StringUtils
.
isNotBlank
(
searchVo
.
getContent
())&&
StringUtils
.
isNotBlank
(
name
))
{
searchVo
.
setContent
(
searchVo
.
getContent
().
replaceAll
(
name
,
"<font color='red'>"
+
name
+
"</font>"
));
}
if
(
StringUtils
.
isNotBlank
(
searchVo
.
getTitle
())&&
StringUtils
.
isNotBlank
(
name
))
{
searchVo
.
setTitle
(
searchVo
.
getTitle
().
replaceAll
(
name
,
"<font color='red'>"
+
name
+
"</font>"
));
}
if
(
StringUtils
.
isNotBlank
(
searchVo
.
getKeyword
())&&
StringUtils
.
isNotBlank
(
name
))
{
searchVo
.
setKeyword
(
searchVo
.
getKeyword
().
replaceAll
(
name
,
"<font color='red'>"
+
name
+
"</font>"
));
}
}
}
page
.
setRecords
(
list
);
return
page
;
}
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/PartnersServiceImpl.java
View file @
ba384dc0
...
@@ -2,7 +2,9 @@ package io.office.modules.manage.service.impl;
...
@@ -2,7 +2,9 @@ package io.office.modules.manage.service.impl;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.utils.R
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.CasesEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -75,10 +77,28 @@ public class PartnersServiceImpl extends ServiceImpl<PartnersDao, PartnersEntity
...
@@ -75,10 +77,28 @@ public class PartnersServiceImpl extends ServiceImpl<PartnersDao, PartnersEntity
}
}
@Override
@Override
public
List
<
PartnersEntity
>
frontList
(
Map
<
String
,
Object
>
params
)
{
public
Page
<
PartnersEntity
>
frontList
(
Map
<
String
,
Object
>
params
)
{
String
status
=
"1"
;
//代表审核状态,编辑从后台提交专题后,默认初始状态为status=0,审核成功status=1,审核失败status=-1
/* String status="1";//代表审核状态,编辑从后台提交专题后,默认初始状态为status=0,审核成功status=1,审核失败status=-1
String
levels
=
"0"
;
//levels代表级别,取值从0到9。其中,0代表隐藏,1级以上可以显示,9级为最高级
String levels="0";//levels代表级别,取值从0到9。其中,0代表隐藏,1级以上可以显示,9级为最高级*/
return
partnersDao
.
selectByStatusAndLevels
(
status
,
levels
);
Page
page
=
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
).
toString
()),
Integer
.
valueOf
(
params
.
get
(
"size"
).
toString
()));
QueryWrapper
<
PartnersEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"status"
,
"1"
);
queryWrapper
.
gt
(
"levels"
,
"0"
);
if
(
params
.
get
(
"firmname"
)
!=
null
&&
StringUtils
.
isNotBlank
(
params
.
get
(
"firmname"
).
toString
()))
{
queryWrapper
.
like
(
"firmname"
,
params
.
get
(
"firmname"
).
toString
());
}
if
(
params
.
get
(
"service"
)
!=
null
&&
StringUtils
.
isNotBlank
(
params
.
get
(
"service"
).
toString
()))
{
queryWrapper
.
like
(
"service"
,
params
.
get
(
"service"
).
toString
());
}
if
(
params
.
get
(
"technology"
)
!=
null
&&
StringUtils
.
isNotBlank
(
params
.
get
(
"technology"
).
toString
()))
{
queryWrapper
.
like
(
"technology"
,
params
.
get
(
"technology"
).
toString
());
}
return
baseMapper
.
selectPage
(
page
,
queryWrapper
);
//return partnersDao.selectByStatusAndLevels(status,levels);
}
}
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/TycpdmFirmChangeServiceImpl.java
View file @
ba384dc0
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.exception.RRException
;
import
io.office.common.exception.RRException
;
import
io.office.modules.manage.entity.TycpdmFirmEntity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.UUID
;
import
java.util.UUID
;
...
@@ -84,4 +87,16 @@ public class TycpdmFirmChangeServiceImpl extends ServiceImpl<TycpdmFirmChangeDao
...
@@ -84,4 +87,16 @@ public class TycpdmFirmChangeServiceImpl extends ServiceImpl<TycpdmFirmChangeDao
}
}
}
}
@Override
public
Page
<
TycpdmFirmChangeEntity
>
findlist
(
Map
<
String
,
Object
>
params
,
Page
page
)
{
List
<
TycpdmFirmChangeEntity
>
list
=
tycpdmFirmChangeDao
.
selectTycpdmFirmList
(
params
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
@Override
public
TycpdmFirmChangeEntity
findUserName
(
String
userName
)
{
return
tycpdmFirmChangeDao
.
findUserName
(
userName
);
}
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/TycpdmFirmServiceImpl.java
View file @
ba384dc0
...
@@ -89,6 +89,7 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
...
@@ -89,6 +89,7 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
throw
new
RRException
(
"无权访问"
);
throw
new
RRException
(
"无权访问"
);
}
}
//审核状态 0待审核 1审核成功 2审核失败
//审核状态 0待审核 1审核成功 2审核失败
//查询审核数据
Integer
countAll
=
tycpdmFirmDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
null
);
//查询 申请总数
Integer
countAll
=
tycpdmFirmDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
null
);
//查询 申请总数
Integer
auditCount
=
tycpdmFirmDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
0
);
//查询 等待审核 0
Integer
auditCount
=
tycpdmFirmDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
0
);
//查询 等待审核 0
Integer
throughCount
=
tycpdmFirmDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
1
);
//查询 通过审核 1
Integer
throughCount
=
tycpdmFirmDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
1
);
//查询 通过审核 1
...
@@ -97,6 +98,15 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
...
@@ -97,6 +98,15 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
map
.
put
(
"auditCount"
,
auditCount
);
map
.
put
(
"auditCount"
,
auditCount
);
map
.
put
(
"throughCount"
,
throughCount
);
map
.
put
(
"throughCount"
,
throughCount
);
map
.
put
(
"notThroughCount"
,
notThroughCount
);
map
.
put
(
"notThroughCount"
,
notThroughCount
);
//查询变更数据
Integer
countChangeAll
=
tycpdmFirmChangeDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
null
);
//查询 申请总数
Integer
auditChangeCount
=
tycpdmFirmChangeDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
0
);
//查询 等待审核 0
Integer
throughChangeCount
=
tycpdmFirmChangeDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
1
);
//查询 通过审核 1
Integer
notThroughChangeCount
=
tycpdmFirmChangeDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
2
);
//查询 未通过审核 2
map
.
put
(
"countChangeAll"
,
countChangeAll
);
map
.
put
(
"auditChangeCount"
,
auditChangeCount
);
map
.
put
(
"throughChangeCount"
,
throughChangeCount
);
map
.
put
(
"notThroughChangeCount"
,
notThroughChangeCount
);
return
map
;
return
map
;
}
}
...
...
src/main/java/io/office/modules/manage/utils/LogUtils.java
0 → 100644
View file @
ba384dc0
package
io
.
office
.
modules
.
manage
.
utils
;
import
com.qiniu.util.Md5
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Component
;
/**
* @description:
*
* @author wudi
* @date 10:47 2021/12/13
*/
@Component
public
class
LogUtils
{
private
static
LogUtils
logUtils
;
private
static
Logger
logger
=
null
;
private
static
String
switchStr
=
"Y"
;
private
static
boolean
switchBoolean
=
false
;
private
LogUtils
()
{
logger
=
LoggerFactory
.
getLogger
(
LogUtils
.
class
);
if
(
StringUtils
.
isNotBlank
(
switchStr
)
&&
switchStr
.
equalsIgnoreCase
(
"Y"
))
{
switchBoolean
=
true
;
}
}
// 使用 synchronized 修饰,临界资源的同步互斥访问
public
static
synchronized
LogUtils
getLogUtils
()
{
if
(
logUtils
==
null
)
{
logUtils
=
new
LogUtils
();
}
return
logUtils
;
}
public
void
printTime
(
Class
clzss
,
String
message
,
Long
time
)
{
if
(
switchBoolean
)
{
logger
.
info
(
"kafka >> [{}] [{}] 耗时:{} ms"
,
clzss
,
message
,
System
.
currentTimeMillis
()
-
time
);
Runnable
task
=
()
->
{
System
.
out
.
println
(
"记录日志......."
);
};
Thread
thread
=
new
Thread
(
task
);
thread
.
start
();
}
}
public
Long
printCurrentTime
(
Class
clzss
)
{
Long
currentTime
=
System
.
currentTimeMillis
();
if
(
switchBoolean
)
{
logger
.
info
(
"kafka >> [{}] 当前时间:{}"
,
clzss
,
currentTime
);
}
return
currentTime
;
}
public
void
printMessage
(
String
var1
,
Object
...
var2
)
{
logger
.
info
(
var1
,
var2
);
}
public
static
void
main
(
String
[]
args
)
{
//Long currentTime = LogUtils.getLogUtils().printCurrentTime();
// LogUtils.getLogUtils().printTime(Md5.class,"测试的方法", currentTime);
LogUtils
.
getLogUtils
().
printMessage
(
"测试方法 {} {}"
,
"3"
,
"2"
);
System
.
out
.
println
(
LogUtils
.
getLogUtils
()
==
LogUtils
.
getLogUtils
());
}
}
src/main/java/io/office/modules/manage/vo/request/DomesticCodeVo.java
View file @
ba384dc0
...
@@ -17,6 +17,11 @@ public class DomesticCodeVo implements Serializable {
...
@@ -17,6 +17,11 @@ public class DomesticCodeVo implements Serializable {
private
String
captcha
;
private
String
captcha
;
private
String
uuid
;
private
String
uuid
;
public
DomesticCodeVo
(
String
uuid
,
String
captcha
)
{
this
.
captcha
=
captcha
;
this
.
uuid
=
uuid
;
}
private
String
type
;
private
String
type
;
private
String
code
;
private
String
code
;
...
...
src/main/java/io/office/modules/manage/vo/response/SearchVo.java
0 → 100644
View file @
ba384dc0
package
io
.
office
.
modules
.
manage
.
vo
.
response
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
*
* @description:
*
* @author wudi
* @date 15:08 2021/12/14
*/
@Data
public
class
SearchVo
implements
Serializable
{
private
int
id
;
private
String
title
;
private
String
keyword
;
private
String
content
;
private
String
type
;
private
String
urlid
;
private
Date
date
;
private
String
source
;
}
src/main/resources/mapper/manage/NewsDao.xml
View file @
ba384dc0
...
@@ -607,4 +607,24 @@ AND Id != #{id}
...
@@ -607,4 +607,24 @@ AND Id != #{id}
</if>
</if>
order by releasedate desc
order by releasedate desc
</select>
</select>
<select
id=
"getSearchInfo"
parameterType=
"string"
resultType=
"io.office.modules.manage.vo.response.SearchVo"
>
select * from NewsSearch
<where>
<if
test=
"name!=null and name!=''"
>
(title like concat('%',#{name},'%') or keyword like concat('%',#{name},'%') or content like concat('%',#{name},'%'))
</if>
<if
test=
"type!=null and type!=''"
>
and type in (${type})
</if>
</where>
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapper/manage/TycpdmFirmChangeDao.xml
View file @
ba384dc0
...
@@ -55,4 +55,32 @@
...
@@ -55,4 +55,32 @@
</resultMap>
</resultMap>
<select
id=
"findTycpdmFirmLogoutFlagCountALL"
parameterType=
"java.lang.Integer"
resultType=
"java.lang.Integer"
>
select count(*) from tycpdm_firm_change a left join tycpdm_user_service b on a.f_id=b.f_id
where 1=1
<if
test=
"levels ==-99"
>
and branchcode=#{levels}
</if>
<if
test=
"logout_flag !=null"
>
and logout_flag=#{logout_flag}
</if>
and logout_flag
<>
-1;
</select>
<select
id=
"selectTycpdmFirmList"
resultMap=
"tycpdmFirmChangeMap"
parameterType=
"java.util.Map"
>
select * from tycpdm_firm_change where 1=1
<if
test=
"params.firmName !='' and params.firmName !=null"
>
and firmName like concat('%',#{params.firmName},'%')
</if>
<if
test=
"params.logout_flag !='' and params.logout_flag !=null"
>
and logout_flag =#{params.logout_flag}
</if>
<if
test=
"params.branchCode !='' and params.branchCode !=null"
>
and branchCode =#{params.branchCode}
</if>
</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