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
8b4fbdc8
Commit
8b4fbdc8
authored
Dec 14, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】
parent
bf5f63c8
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
319 additions
and
188 deletions
+319
-188
BikefirmController.java
.../office/modules/manage/controller/BikefirmController.java
+1
-3
CasesController.java
.../io/office/modules/manage/controller/CasesController.java
+5
-3
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+15
-4
PartnersController.java
.../office/modules/manage/controller/PartnersController.java
+5
-3
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
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
CasesServiceImpl.java
.../office/modules/manage/service/impl/CasesServiceImpl.java
+23
-5
NewsServiceImpl.java
...o/office/modules/manage/service/impl/NewsServiceImpl.java
+173
-163
PartnersServiceImpl.java
...fice/modules/manage/service/impl/PartnersServiceImpl.java
+18
-4
NewsDao.xml
src/main/resources/mapper/manage/NewsDao.xml
+65
-0
No files found.
src/main/java/io/office/modules/manage/controller/BikefirmController.java
View file @
8b4fbdc8
...
...
@@ -128,9 +128,7 @@ public class BikefirmController {
//新增查询日志
searchgtinlogService
.
save
(
searchgtinlogEntity
);
return
R
.
ok
().
put
(
"data"
,
bikefirmService
.
getBikeFirm
(
bikeFirmVo
));
return
R
.
ok
().
put
(
"data"
,
bikefirmService
.
getBikeFirm
(
bikeFirmVo
));
}
...
...
src/main/java/io/office/modules/manage/controller/CasesController.java
View file @
8b4fbdc8
...
...
@@ -41,9 +41,11 @@ public class CasesController {
@RequestMapping
(
"/api/frontList"
)
@Login
// @RequiresPermissions("manage:partners:list")
public
R
frontList
(){
List
<
CasesEntity
>
casesList
=
this
.
casesService
.
frontList
();
return
R
.
ok
().
put
(
"casesList"
,
casesList
);
public
R
frontList
(
@RequestBody
Map
<
String
,
Object
>
params
){
PageUtils
pageUtils
=
new
PageUtils
(
this
.
casesService
.
getPageList
(
params
));
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
...
...
src/main/java/io/office/modules/manage/controller/NewsController.java
View file @
8b4fbdc8
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.security.Policy
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.*
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.service.*
;
import
io.office.modules.manage.vo.response.SearchVo
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.swagger.models.auth.In
;
import
lombok.extern.slf4j.Slf4j
;
import
oracle.jdbc.proxy.annotation.Post
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -471,5 +470,17 @@ public class NewsController extends AbstractController {
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
(
"page"
),
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 @
8b4fbdc8
...
...
@@ -54,9 +54,11 @@ public class PartnersController extends AbstractController {
@RequestMapping
(
"/api/frontList"
)
@Login
// @RequiresPermissions("manage:partners:list")
public
R
frontList
(
/*@RequestBody Map<String, Object> params*/
){
List
<
PartnersEntity
>
partnersList
=
this
.
partnersService
.
frontList
(
null
);
return
R
.
ok
().
put
(
"partnersList"
,
partnersList
);
public
R
frontList
(
@RequestBody
Map
<
String
,
Object
>
params
){
PageUtils
pageUtils
=
new
PageUtils
(
this
.
partnersService
.
frontList
(
params
));
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
...
...
src/main/java/io/office/modules/manage/dao/CasesDao.java
View file @
8b4fbdc8
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.CasesEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
...
...
@@ -17,5 +19,5 @@ import java.util.List;
@Mapper
public
interface
CasesDao
extends
BaseMapper
<
CasesEntity
>
{
@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 @
8b4fbdc8
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
io.office.modules.manage.entity.*
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
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.Param
;
...
...
@@ -92,4 +93,6 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List
<
NewtopicEntity
>
zttjList
();
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
);
List
<
SearchVo
>
getSearchInfo
(
@Param
(
"name"
)
String
name
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/CasesService.java
View file @
8b4fbdc8
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.CasesEntity
;
...
...
@@ -18,7 +19,9 @@ public interface CasesService extends IService<CasesEntity> {
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 @
8b4fbdc8
...
...
@@ -6,6 +6,7 @@ import io.office.common.utils.PageUtils;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.*
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.vo.response.SearchVo
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
java.util.*
;
...
...
@@ -90,5 +91,7 @@ public interface NewsService extends IService<NewsEntity> {
List
<
NewtopicEntity
>
zttjList
();
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
);
Page
<
SearchVo
>
getSearchInfo
(
String
name
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/PartnersService.java
View file @
8b4fbdc8
...
...
@@ -27,6 +27,6 @@ public interface PartnersService extends IService<PartnersEntity> {
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/impl/CasesServiceImpl.java
View file @
8b4fbdc8
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.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -21,6 +23,7 @@ public class CasesServiceImpl extends ServiceImpl<CasesDao, CasesEntity> impleme
@Autowired
private
CasesDao
casesDao
;
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
CasesEntity
>
page
=
this
.
page
(
...
...
@@ -32,10 +35,24 @@ public class CasesServiceImpl extends ServiceImpl<CasesDao, CasesEntity> impleme
}
@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
());
}
return
casesDao
.
selectPage
(
page
,
queryWrapper
);
}
/* public List<CasesEntity> frontList() {
String status="1";//代表审核状态,编辑从后台提交专题后,默认初始状态为status=0,审核成功status=1,审核失败status=-1
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 @
8b4fbdc8
...
...
@@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.*
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.vo.response.SearchVo
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -46,30 +48,30 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
news
.
setStartdate
(
new
Date
());
news
.
setPublicdate
(
new
Date
());
//二级栏目不为空时 classid取值二级栏目id值
if
(
news
.
getCclassid
()
!=
null
)
{
if
(
news
.
getCclassid
()
!=
null
)
{
news
.
setClassid
(
news
.
getCclassid
());
}
int
insert
=
baseMapper
.
insert
(
news
);
if
(
insert
>
0
)
{
if
(
insert
>
0
)
{
return
R
.
ok
(
"新增成功!"
);
}
else
{
}
else
{
return
R
.
error
(
"新增失败!"
);
}
}
@Override
public
R
updateNews
(
NewsEntity
news
,
SysUserEntity
user
)
{
if
(
news
.
getId
()
==
null
)
{
if
(
news
.
getId
()
==
null
)
{
return
R
.
error
(
"id不能为空!"
);
}
QueryWrapper
<
NewsEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
newsEntityQueryWrapper
.
eq
(
"id"
,
news
.
getId
());
newsEntityQueryWrapper
.
eq
(
"id"
,
news
.
getId
());
news
.
setEditor
(
user
.
getUsername
());
news
.
setLasteditor
(
user
.
getUsername
());
int
update
=
baseMapper
.
update
(
news
,
newsEntityQueryWrapper
);
if
(
update
>
0
)
{
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功!"
);
}
else
{
}
else
{
return
R
.
error
(
"修改失败!"
);
}
}
...
...
@@ -79,11 +81,11 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
NewsEntity
news
=
new
NewsEntity
();
news
.
setLevels
(
0
);
QueryWrapper
<
NewsEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
newsEntityQueryWrapper
.
in
(
"id"
,
ids
);
newsEntityQueryWrapper
.
in
(
"id"
,
ids
);
int
delete
=
baseMapper
.
update
(
news
,
newsEntityQueryWrapper
);
if
(
delete
>
0
)
{
if
(
delete
>
0
)
{
return
R
.
ok
(
"删除成功!"
);
}
else
{
}
else
{
return
R
.
error
(
"删除失败!"
);
}
}
...
...
@@ -94,11 +96,11 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
news
.
setCheckdate
(
new
Date
());
news
.
setLasteditor
(
user
.
getUsername
());
QueryWrapper
<
NewsEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
newsEntityQueryWrapper
.
eq
(
"id"
,
news
.
getId
());
newsEntityQueryWrapper
.
eq
(
"id"
,
news
.
getId
());
int
verify
=
baseMapper
.
update
(
news
,
newsEntityQueryWrapper
);
if
(
verify
>
0
)
{
if
(
verify
>
0
)
{
return
R
.
ok
(
"审核成功!"
);
}
else
{
}
else
{
return
R
.
error
(
"审核失败!"
);
}
}
...
...
@@ -127,77 +129,76 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
String
name
=
this
.
newsDao
.
selectClassName
(
classid
);
return
name
;
}
/**
*
* 行业应用
*
* */
*/
@Override
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
);
return
page
;
}
@Override
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
);
return
page
;
}
@Override
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
);
return
page
;
}
@Override
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
);
return
page
;
}
@Override
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
);
return
page
;
}
@Override
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
);
return
page
;
}
@Override
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
);
return
page
;
}
@Override
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
);
return
page
;
}
@Override
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
);
return
page
;
}
@Override
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
);
return
page
;
}
...
...
@@ -210,7 +211,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
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
);
return
page
;
}
...
...
@@ -218,8 +219,8 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
public
List
<
GlossaryEntity
>
glossaryList
(
NewsParams
newsParams
)
{
List
<
GlossaryEntity
>
list
=
this
.
newsDao
.
glossaryList
(
newsParams
);
if
(
"4"
.
equals
(
newsParams
.
getType
()))
{
list
=
list
.
stream
().
filter
(
item
->
item
.
getTitleEn
().
substring
(
0
,
1
).
equals
(
newsParams
.
getTitle
())).
collect
(
Collectors
.
toList
());
if
(
"4"
.
equals
(
newsParams
.
getType
()))
{
list
=
list
.
stream
().
filter
(
item
->
item
.
getTitleEn
().
substring
(
0
,
1
).
equals
(
newsParams
.
getTitle
())).
collect
(
Collectors
.
toList
());
}
return
list
;
}
...
...
@@ -233,9 +234,9 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
public
Map
<
String
,
Object
>
searchKnowledgeInfo
(
NewsParams
newsParams
)
{
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
<>();
if
(
"all"
.
equals
(
newsParams
.
getType
()))
{
if
(
"all"
.
equals
(
newsParams
.
getType
()))
{
list
.
add
(
"sptm"
);
list
.
add
(
"ewtm"
);
list
.
add
(
"zxcbm"
);
...
...
@@ -246,101 +247,101 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
list
.
add
(
"gds"
);
list
.
add
(
"ecr"
);
list
.
add
(
"ebXML"
);
}
else
{
}
else
{
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
].
put
(
"name"
,
"40"
);
map
[
0
].
put
(
"name"
,
"40"
);
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"sptm"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"sptm"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"sptm"
,
dataList
);
}
else
if
(
"ewtm"
.
equals
(
item
))
{
retMap
.
put
(
"sptm"
,
dataList
);
}
else
if
(
"ewtm"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"45"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"name"
,
"45"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"ewtm"
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"ewtm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"ewtm"
,
dataList
);
}
else
if
(
"zxcbm"
.
equals
(
item
))
{
retMap
.
put
(
"ewtm"
,
dataList
);
}
else
if
(
"zxcbm"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"93"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"name"
,
"93"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"zxcbm"
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"zxcbm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"zxcbm"
,
dataList
);
}
else
if
(
"dwbm"
.
equals
(
item
))
{
retMap
.
put
(
"zxcbm"
,
dataList
);
}
else
if
(
"dwbm"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"94"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"name"
,
"94"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"dwbm"
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"dwbm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"dwbm"
,
dataList
);
}
else
if
(
"gln"
.
equals
(
item
))
{
retMap
.
put
(
"dwbm"
,
dataList
);
}
else
if
(
"gln"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"95"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"name"
,
"95"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"gln"
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"gln"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"gln"
,
dataList
);
}
else
if
(
"epc"
.
equals
(
item
))
{
retMap
.
put
(
"gln"
,
dataList
);
}
else
if
(
"epc"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"83"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"name"
,
"83"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"epc"
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"epc"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"epc"
,
dataList
);
}
else
if
(
"rfid"
.
equals
(
item
))
{
retMap
.
put
(
"epc"
,
dataList
);
}
else
if
(
"rfid"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"77"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"name"
,
"77"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"rfid"
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"rfid"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"rfid"
,
dataList
);
}
else
if
(
"gds"
.
equals
(
item
))
{
retMap
.
put
(
"rfid"
,
dataList
);
}
else
if
(
"gds"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"85"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"name"
,
"85"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"gds"
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"gds"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"gds"
,
dataList
);
}
else
if
(
"ecr"
.
equals
(
item
))
{
retMap
.
put
(
"gds"
,
dataList
);
}
else
if
(
"ecr"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"81"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"name"
,
"81"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"ecr"
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"ecr"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"ecr"
,
dataList
);
}
else
if
(
"ebXML"
.
equals
(
item
))
{
retMap
.
put
(
"ecr"
,
dataList
);
}
else
if
(
"ebXML"
.
equals
(
item
))
{
map
[
0
]
=
new
HashMap
<>();
map
[
0
].
put
(
"name"
,
"79"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
map
[
0
].
put
(
"name"
,
"79"
);
map
[
0
].
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
[
0
]);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"ebXML"
);
map
[
0
].
put
(
"list"
,
child
);
map
[
0
].
put
(
"typeName"
,
"ebXML"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataList
(
map
[
0
]);
retMap
.
put
(
"ebXML"
,
dataList
);
retMap
.
put
(
"ebXML"
,
dataList
);
}
});
return
retMap
;
...
...
@@ -348,13 +349,13 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
public
List
<
Map
<
String
,
Object
>>
searchKnowledgeInfoList
()
{
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
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
();
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
hotList
();
return
list
;
}
...
...
@@ -366,94 +367,94 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
public
Page
<
List
<
Map
<
String
,
Object
>>>
searchKnowledgePageList
(
NewsParams
newsParams
,
Page
page
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
"sptm"
.
equals
(
newsParams
.
getType
()))
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
"sptm"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"40"
);
map
.
put
(
"name"
,
"40"
);
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"sptm"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"sptm"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
}
else
if
(
"ewtm"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"ewtm"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"45"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"name"
,
"45"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"ewtm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"ewtm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
}
else
if
(
"zxcbm"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"zxcbm"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"93"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"name"
,
"93"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"zxcbm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"zxcbm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
}
else
if
(
"dwbm"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"dwbm"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"94"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"name"
,
"94"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"dwbm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"dwbm"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
}
else
if
(
"gln"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"gln"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"95"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"name"
,
"95"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"gln"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"gln"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
}
else
if
(
"epc"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"epc"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"83"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"name"
,
"83"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
map
.
put
(
"list"
,
child
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
}
else
if
(
"rfid"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"rfid"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"77"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"name"
,
"77"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
map
.
put
(
"list"
,
child
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
}
else
if
(
"gds"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"gds"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"85"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"name"
,
"85"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"gds"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"gds"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
}
else
if
(
"ecr"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"ecr"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"81"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"name"
,
"81"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"ecr"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"ecr"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
}
else
if
(
"ebXML"
.
equals
(
newsParams
.
getType
()))
{
}
else
if
(
"ebXML"
.
equals
(
newsParams
.
getType
()))
{
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"79"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
map
.
put
(
"name"
,
"79"
);
map
.
put
(
"title"
,
newsParams
.
getTitle
());
List
<
String
>
child
=
getChild
(
map
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"ebXML"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
map
.
put
(
"list"
,
child
);
map
.
put
(
"typeName"
,
"ebXML"
);
List
<
Map
<
String
,
Object
>>
dataList
=
getDataListNew
(
map
,
page
);
page
.
setRecords
(
dataList
);
}
return
page
;
...
...
@@ -504,19 +505,19 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
public
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
)
{
StringBuffer
stringBuffer
=
new
StringBuffer
();
if
(
params
.
containsKey
(
"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
(
","
);
if
(
params
.
containsKey
(
"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
(
","
);
int
length
=
keywords
.
length
;
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
stringBuffer
.
append
(
"keyword LIKE concat ('%','"
)
.
append
(
keywords
[
i
]).
append
(
"', '%')"
);
if
(
i
!=
length
-
1
)
{
if
(
i
!=
length
-
1
)
{
stringBuffer
.
append
(
" or "
);
}
}
params
.
put
(
"sql"
,
stringBuffer
.
toString
());
params
.
put
(
"sql"
,
stringBuffer
.
toString
());
}
}
List
<
NewsEntity
>
list
=
this
.
newsDao
.
relatedLinks
(
params
);
...
...
@@ -524,12 +525,12 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
}
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
;
}
private
List
<
Map
<
String
,
Object
>>
getDataList
(
Map
<
String
,
Object
>
map
)
{
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
searchKnowledgeInfo
(
map
);
private
List
<
Map
<
String
,
Object
>>
getDataList
(
Map
<
String
,
Object
>
map
)
{
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
searchKnowledgeInfo
(
map
);
return
list
;
}
...
...
@@ -539,4 +540,12 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
}
@Override
public
Page
<
SearchVo
>
getSearchInfo
(
String
name
,
Page
page
)
{
List
<
SearchVo
>
list
=
this
.
newsDao
.
getSearchInfo
(
name
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/PartnersServiceImpl.java
View file @
8b4fbdc8
...
...
@@ -2,7 +2,9 @@ package io.office.modules.manage.service.impl;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.CasesEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -75,10 +77,21 @@ public class PartnersServiceImpl extends ServiceImpl<PartnersDao, PartnersEntity
}
@Override
public
List
<
PartnersEntity
>
frontList
(
Map
<
String
,
Object
>
params
)
{
String
status
=
"1"
;
//代表审核状态,编辑从后台提交专题后,默认初始状态为status=0,审核成功status=1,审核失败status=-1
String
levels
=
"0"
;
//levels代表级别,取值从0到9。其中,0代表隐藏,1级以上可以显示,9级为最高级
return
partnersDao
.
selectByStatusAndLevels
(
status
,
levels
);
public
Page
<
PartnersEntity
>
frontList
(
Map
<
String
,
Object
>
params
)
{
/* String status="1";//代表审核状态,编辑从后台提交专题后,默认初始状态为status=0,审核成功status=1,审核失败status=-1
String levels="0";//levels代表级别,取值从0到9。其中,0代表隐藏,1级以上可以显示,9级为最高级*/
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
());
}
return
baseMapper
.
selectPage
(
page
,
queryWrapper
);
//return partnersDao.selectByStatusAndLevels(status,levels);
}
}
\ No newline at end of file
src/main/resources/mapper/manage/NewsDao.xml
View file @
8b4fbdc8
...
...
@@ -607,4 +607,68 @@ AND Id != #{id}
</if>
order by releasedate desc
</select>
<select
id=
"getSearchInfo"
parameterType=
"string"
resultType=
"io.office.modules.manage.vo.response.SearchVo"
>
SELECT id, title, keyword, [content], 1 AS type, id AS urlid, releasedate AS date ,source
FROM dbo.news
WHERE (status = 1) AND (levels > 0) AND (classid IN (32, 33))
<if
test=
"name!=null and name!=''"
>
and title like concat('%',#{name},'%')
</if>
UNION ALL
SELECT id, title, keyword, [content], 1 AS type, id AS urlid, releasedate AS date ,source
FROM dbo.Policy
WHERE (levels > 0) AND (class = '相关标准')
<if
test=
"name!=null and name!=''"
>
and title like concat('%',#{name},'%')
</if>
UNION ALL
SELECT id, title, keyword, [content], 2 AS type, id AS urlid, releasedate AS date ,source
FROM dbo.Policy AS Policy_1
WHERE (levels > 0) AND (class = '法律法规')
<if
test=
"name!=null and name!=''"
>
and title like concat('%',#{name},'%')
</if>
UNION ALL
SELECT id, title, keyword, [content], 3 AS type, id AS urlid, releasedate AS date ,source
FROM dbo.news AS news_2
WHERE (status = 1) AND (levels > 0) AND (classid NOT IN (12, 13, 14, 15, 16, 18, 19, 20, 21, 32, 33))
<if
test=
"name!=null and name!=''"
>
and title like concat('%',#{name},'%')
</if>
UNION ALL
SELECT ClassId, Title, Title AS keyword, '' AS Expr1, 31 AS type, ClassId AS urlid, checktime AS date ,'深度专题' AS source
FROM dbo.NewTopic
WHERE (levels > 0) AND (ParentId = 0) AND (checkflag = 1)
<if
test=
"name!=null and name!=''"
>
and title like concat('%',#{name},'%')
</if>
UNION ALL
SELECT id, title, keyword, brief, 32 AS type, id AS urlid, releasedate AS date ,'精彩视频' AS source
FROM dbo.news_movie
WHERE (status = 1) AND (levels > 0)
<if
test=
"name!=null and name!=''"
>
and title like concat('%',#{name},'%')
</if>
UNION ALL
SELECT id, title, keyword, [content], 5 AS type, id AS urlid, releasedate AS date ,source
FROM dbo.news AS news_1
WHERE (status = 1) AND (levels > 0) AND (classid IN (12, 13, 14, 15, 16, 18, 19, 20, 21))
<if
test=
"name!=null and name!=''"
>
and title like concat('%',#{name},'%')
</if>
UNION ALL
SELECT knowledgeInfoID, Title, Title AS keyword, [Content], 6 AS type, knowledgeInfoID AS urlid, inputDate AS date ,'技术知识' AS source
FROM dbo.knowledgeInfo
WHERE status = 1
<if
test=
"name!=null and name!=''"
>
and title like concat('%',#{name},'%')
</if>
</select>
</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