Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
site-project
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
site-project
Commits
11ba99cc
Commit
11ba99cc
authored
Jan 13, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
咨询查询所有
parent
80bc6e75
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
4 deletions
+33
-4
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/InformationMapper.java
+2
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/InformationServiceImpl.java
+12
-4
cloud-site-service/src/main/resources/mapper/InformationMapper.xml
+19
-0
No files found.
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/InformationMapper.java
View file @
11ba99cc
...
@@ -25,6 +25,8 @@ public interface InformationMapper extends BaseMapper<Information> {
...
@@ -25,6 +25,8 @@ public interface InformationMapper extends BaseMapper<Information> {
List
<
Information
>
informationTwoList
(
InfomationParamVO
vo
,
Page
<
Information
>
page
);
List
<
Information
>
informationTwoList
(
InfomationParamVO
vo
,
Page
<
Information
>
page
);
List
<
Information
>
informationAllList
(
InfomationParamVO
vo
,
Page
<
Information
>
page
);
List
<
Information
>
informationThreeList
(
InfomationParamVO
vo
,
Page
<
Information
>
page
);
List
<
Information
>
informationThreeList
(
InfomationParamVO
vo
,
Page
<
Information
>
page
);
List
<
AnnouncementVO
>
selectAnnouncement
(
Page
<
AnnouncementVO
>
page
,
Map
<
String
,
Object
>
map
);
List
<
AnnouncementVO
>
selectAnnouncement
(
Page
<
AnnouncementVO
>
page
,
Map
<
String
,
Object
>
map
);
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/InformationServiceImpl.java
View file @
11ba99cc
...
@@ -921,6 +921,9 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -921,6 +921,9 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
infomationParamVO
.
setState
(
2
);
infomationParamVO
.
setState
(
2
);
Page
<
Information
>
page
=
new
Page
<
Information
>(
vo
.
getPageNo
(),
vo
.
getPageSize
());
Page
<
Information
>
page
=
new
Page
<
Information
>(
vo
.
getPageNo
(),
vo
.
getPageSize
());
List
<
Information
>
list
=
Lists
.
newArrayList
();
List
<
Information
>
list
=
Lists
.
newArrayList
();
if
(
vo
.
getTypeId
()==
null
||
vo
.
getTypeId
()==
0L
){
list
=
informationMapper
.
informationAllList
(
infomationParamVO
,
page
);
}
else
{
if
(
selectById
==
null
)
{
if
(
selectById
==
null
)
{
return
null
;
return
null
;
}
}
...
@@ -930,12 +933,13 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -930,12 +933,13 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
list
=
informationMapper
.
informationFirstList
(
infomationParamVO
,
page
);
list
=
informationMapper
.
informationFirstList
(
infomationParamVO
,
page
);
}
else
{
}
else
{
DataClassification
selectByParentId
=
dataClassificationService
.
selectById
(
selectById
.
getParentId
());
DataClassification
selectByParentId
=
dataClassificationService
.
selectById
(
selectById
.
getParentId
());
if
(
selectByParentId
==
null
||
selectById
.
getParentId
()
==
0
)
{
if
(
selectByParentId
==
null
||
selectById
.
getParentId
()
==
0
)
{
list
=
informationMapper
.
informationTwoList
(
infomationParamVO
,
page
);
//新闻分类列表
list
=
informationMapper
.
informationTwoList
(
infomationParamVO
,
page
);
//新闻分类列表
}
else
{
}
else
{
list
=
informationMapper
.
informationThreeList
(
infomationParamVO
,
page
);
//新闻分类列表
list
=
informationMapper
.
informationThreeList
(
infomationParamVO
,
page
);
//新闻分类列表
}
}
}
}
}
if
(
list
.
size
()
>
0
&&
list
!=
null
)
{
if
(
list
.
size
()
>
0
&&
list
!=
null
)
{
for
(
Information
info
:
list
)
{
for
(
Information
info
:
list
)
{
if
(
info
.
getTypeOne
()
!=
null
&&
info
.
getTypeOne
()
!=
0
)
{
if
(
info
.
getTypeOne
()
!=
null
&&
info
.
getTypeOne
()
!=
0
)
{
...
@@ -985,6 +989,9 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -985,6 +989,9 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
Page
<
Information
>
page
=
new
Page
<
Information
>(
vo
.
getPageNo
(),
vo
.
getPageSize
());
Page
<
Information
>
page
=
new
Page
<
Information
>(
vo
.
getPageNo
(),
vo
.
getPageSize
());
List
<
Information
>
list
=
null
;
List
<
Information
>
list
=
null
;
if
(
vo
.
getTypeId
()==
null
||
vo
.
getTypeId
()==
0L
){
list
=
informationMapper
.
informationAllList
(
vo
,
page
);
}
else
{
DataClassification
selectById
=
dataClassificationService
.
selectById
(
vo
.
getTypeId
());
DataClassification
selectById
=
dataClassificationService
.
selectById
(
vo
.
getTypeId
());
if
(
selectById
==
null
)
{
if
(
selectById
==
null
)
{
return
null
;
return
null
;
...
@@ -995,12 +1002,13 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -995,12 +1002,13 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
list
=
informationMapper
.
informationFirstList
(
vo
,
page
);
list
=
informationMapper
.
informationFirstList
(
vo
,
page
);
}
else
{
}
else
{
DataClassification
selectByParentId
=
dataClassificationService
.
selectById
(
selectById
.
getParentId
());
DataClassification
selectByParentId
=
dataClassificationService
.
selectById
(
selectById
.
getParentId
());
if
(
selectByParentId
==
null
||
selectById
.
getParentId
()
==
0
)
{
if
(
selectByParentId
==
null
||
selectById
.
getParentId
()
==
0
)
{
list
=
informationMapper
.
informationTwoList
(
vo
,
page
);
//新闻分类列表
list
=
informationMapper
.
informationTwoList
(
vo
,
page
);
//新闻分类列表
}
else
{
}
else
{
list
=
informationMapper
.
informationThreeList
(
vo
,
page
);
//新闻分类列表
list
=
informationMapper
.
informationThreeList
(
vo
,
page
);
//新闻分类列表
}
}
}
}
}
if
(
list
.
size
()
>
0
&&
list
!=
null
)
{
if
(
list
.
size
()
>
0
&&
list
!=
null
)
{
for
(
Information
info
:
list
)
{
for
(
Information
info
:
list
)
{
if
(
info
.
getTypeOne
()
!=
null
&&
info
.
getTypeOne
()
!=
0
)
{
if
(
info
.
getTypeOne
()
!=
null
&&
info
.
getTypeOne
()
!=
0
)
{
...
...
cloud-site-service/src/main/resources/mapper/InformationMapper.xml
View file @
11ba99cc
...
@@ -96,6 +96,25 @@
...
@@ -96,6 +96,25 @@
order by a.is_top desc, a.create_time desc
order by a.is_top desc, a.create_time desc
</select>
</select>
<select
id=
"informationAllList"
resultType=
"com.yizhi.site.application.domain.Information"
>
<!-- select a.* from information a left join data_classification b on a.type_two=b.id
where 1=1 and a.site_id=#{siteId} and b.site_id=#{siteId} and b.name=#{name} -->
select a.* from information a where 1=1 and a.site_id=#{siteId}
<if
test=
"fileName != null and fileName != ''"
>
and (a.file_name like CONCAT('%', '${fileName}', '%' ) or a.key_words like CONCAT('%', '${fileName}', '%' ) )
</if>
<!-- <if test="keyWords != null and keyWords != ''">-->
<!-- and a.key_words like CONCAT('%', '${keyWords}', '%' )-->
<!-- </if>-->
<if
test=
"start != null"
>
and a.release_time >= #{start}
</if>
<if
test=
"end != null"
>
and #{end} >= a.release_time
</if>
order by a.is_top desc, a.create_time desc
</select>
<select
id=
"informationPageList"
resultType=
"com.yizhi.site.application.vo.site.InformationStudentVO"
>
<select
id=
"informationPageList"
resultType=
"com.yizhi.site.application.vo.site.InformationStudentVO"
>
SELECT
SELECT
...
...
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