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
fc81388b
Commit
fc81388b
authored
Feb 13, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
今日登党务直通收藏量(人)
parent
8a9a4955
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64 additions
and
8 deletions
+64
-8
cloud-site-api/src/main/java/com/yizhi/site/application/feign/api/EventTrackApiClients.java
+2
-1
cloud-site-service/src/main/java/com/yizhi/site/application/controller/api/EventTrackController.java
+3
-2
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/EventTrackMapper.java
+1
-1
cloud-site-service/src/main/java/com/yizhi/site/application/service/EventTrackService.java
+1
-1
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
+41
-3
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/PublicationServiceImpl.java
+9
-0
cloud-site-service/src/main/resources/mapper/DataClassificationMapper.xml
+1
-0
cloud-site-service/src/main/resources/mapper/EventTrackMapper.xml
+6
-0
No files found.
cloud-site-api/src/main/java/com/yizhi/site/application/feign/api/EventTrackApiClients.java
View file @
fc81388b
...
...
@@ -28,7 +28,8 @@ public interface EventTrackApiClients {
DayNumVo
getNumByType
(
@RequestParam
(
value
=
"date"
,
required
=
false
)
String
date
,
@RequestParam
(
"types"
)
List
<
Integer
>
types
);
@GetMapping
(
"/api/eventTrack/queryNumByType"
)
List
<
EventTrackTypeNumVo
>
queryNumByType
(
@RequestParam
(
value
=
"date"
,
required
=
false
)
String
date
,
@RequestParam
(
"types"
)
List
<
Integer
>
types
);
List
<
EventTrackTypeNumVo
>
queryNumByType
(
@RequestParam
(
value
=
"date"
,
required
=
false
)
String
date
,
@RequestParam
(
"types"
)
List
<
Integer
>
types
,
@RequestParam
(
value
=
"subName"
,
required
=
false
)
String
subName
);
@GetMapping
(
"/api/eventTrack/queryDeptByType"
)
List
<
EventTrackDeptNumVo
>
queryDeptByType
(
@RequestParam
(
value
=
"date"
,
required
=
false
)
String
date
,
@RequestParam
(
"types"
)
List
<
Integer
>
types
);
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/controller/api/EventTrackController.java
View file @
fc81388b
...
...
@@ -43,8 +43,9 @@ public class EventTrackController {
}
@GetMapping
(
"/api/eventTrack/queryNumByType"
)
public
List
<
EventTrackTypeNumVo
>
queryNumByType
(
@RequestParam
(
value
=
"date"
,
required
=
false
)
String
date
,
@RequestParam
(
"types"
)
List
<
Integer
>
types
){
return
eventTrackService
.
queryNumByType
(
date
,
types
);
public
List
<
EventTrackTypeNumVo
>
queryNumByType
(
@RequestParam
(
value
=
"date"
,
required
=
false
)
String
date
,
@RequestParam
(
"types"
)
List
<
Integer
>
types
,
@RequestParam
(
value
=
"subName"
,
required
=
false
)
String
subName
){
return
eventTrackService
.
queryNumByType
(
date
,
types
,
subName
);
}
@GetMapping
(
"/api/eventTrack/queryDeptByType"
)
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/EventTrackMapper.java
View file @
fc81388b
...
...
@@ -23,7 +23,7 @@ public interface EventTrackMapper extends BaseMapper<EventTrack> {
DayNumVo
getNumByType
(
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
);
List
<
EventTrackTypeNumVo
>
queryNumByType
(
@Param
(
"deptId"
)
Long
deptId
,
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
);
List
<
EventTrackTypeNumVo
>
queryNumByType
(
@Param
(
"deptId"
)
Long
deptId
,
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
,
@Param
(
"subNameList"
)
List
<
String
>
subNameList
);
List
<
EventTrackDeptNumVo
>
queryDeptByType
(
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
);
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/EventTrackService.java
View file @
fc81388b
...
...
@@ -25,7 +25,7 @@ public interface EventTrackService extends IService<EventTrack> {
DayNumVo
getNumByType
(
String
date
,
List
<
Integer
>
types
);
List
<
EventTrackTypeNumVo
>
queryNumByType
(
String
date
,
List
<
Integer
>
types
);
List
<
EventTrackTypeNumVo
>
queryNumByType
(
String
date
,
List
<
Integer
>
types
,
String
subName
);
List
<
EventTrackDeptNumVo
>
queryDeptByType
(
String
date
,
List
<
Integer
>
types
);
}
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
View file @
fc81388b
package
com
.
yizhi
.
site
.
application
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.yizhi.application.orm.id.IdGenerator
;
...
...
@@ -27,6 +28,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.ObjectUtils
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* com.yizhi.site.application.service.impl
...
...
@@ -141,12 +143,48 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
}
@Override
public
List
<
EventTrackTypeNumVo
>
queryNumByType
(
String
date
,
List
<
Integer
>
types
)
{
public
List
<
EventTrackTypeNumVo
>
queryNumByType
(
String
date
,
List
<
Integer
>
types
,
String
subName
)
{
if
(
ObjectUtils
.
isEmpty
(
date
)){
date
=
"3"
;
}
String
dateString
=
getDateString
(
date
);
return
this
.
baseMapper
.
queryNumByType
(
null
,
date
,
dateString
,
types
);
Long
id
=
null
;
if
(!
ObjectUtils
.
isEmpty
(
subName
))
{
String
key
=
"event_track_type"
;
List
<
Dictionary
>
dictionaryList
=
dictionaryFeignClients
.
listChildDictionary
(
key
,
false
,
1
);
if
(
CollUtil
.
isNotEmpty
(
dictionaryList
))
{
Optional
<
Dictionary
>
optional
=
dictionaryList
.
stream
().
filter
(
d
->
Objects
.
equals
(
d
.
getValue
(),
"6"
)&&
Objects
.
equals
(
d
.
getCnName
(),
subName
)).
findFirst
();
if
(
optional
!=
null
&&
optional
.
isPresent
())
{
Dictionary
dictionary
=
optional
.
get
();
id
=
Long
.
valueOf
(
dictionary
.
getCode
());
}
}
}
List
<
String
>
subNameList
=
null
;
if
(
id
!=
null
)
{
List
<
DataClassification
>
classificationList
=
dataClassificationService
.
getSon
(
id
);
if
(
CollectionUtil
.
isNotEmpty
(
classificationList
)){
subNameList
=
classificationList
.
stream
().
map
(
DataClassification:
:
getName
).
collect
(
Collectors
.
toList
());
}
}
List
<
EventTrackTypeNumVo
>
eventTrackTypeNumVoList
=
this
.
baseMapper
.
queryNumByType
(
null
,
date
,
dateString
,
types
,
subNameList
);
if
(
CollectionUtil
.
isNotEmpty
(
subNameList
)){
subNameList
.
stream
().
forEach
(
name
->{
EventTrackTypeNumVo
eventTrackTypeNumVo
=
new
EventTrackTypeNumVo
();
eventTrackTypeNumVo
.
setNum
(
0
);
eventTrackTypeNumVo
.
setSubType
(
name
);
if
(
CollectionUtil
.
isNotEmpty
(
eventTrackTypeNumVoList
)){
Optional
optional
=
eventTrackTypeNumVoList
.
stream
().
filter
(
e
->
Objects
.
equals
(
e
.
getSubType
(),
name
)).
findFirst
();
if
(
optional
==
null
||!
optional
.
isPresent
()){
eventTrackTypeNumVoList
.
add
(
eventTrackTypeNumVo
);
}
}
else
{
eventTrackTypeNumVoList
.
add
(
eventTrackTypeNumVo
);
}
});
}
return
eventTrackTypeNumVoList
;
}
@Override
...
...
@@ -160,7 +198,7 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
if
(
CollUtil
.
isNotEmpty
(
eventTrackDeptNumVoList
)){
String
finalDate
=
date
;
eventTrackDeptNumVoList
.
stream
().
forEach
(
eventTrackDeptNumVo
->
{
eventTrackDeptNumVo
.
setEventTrackTypeNumVoList
(
this
.
baseMapper
.
queryNumByType
(
eventTrackDeptNumVo
.
getDeptId
(),
finalDate
,
dateString
,
types
));
eventTrackDeptNumVo
.
setEventTrackTypeNumVoList
(
this
.
baseMapper
.
queryNumByType
(
eventTrackDeptNumVo
.
getDeptId
(),
finalDate
,
dateString
,
types
,
null
));
});
}
return
eventTrackDeptNumVoList
;
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/PublicationServiceImpl.java
View file @
fc81388b
...
...
@@ -178,6 +178,15 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi
if
(
jsonArray
.
size
()>
0
){
information
.
setLogoPath
(
jsonArray
.
getString
(
0
));
information
.
setPdfOssUrl
(
selectById
.
getOssUrl
());
String
imgDiv
=
"<p></p><div class=\"media-wrap image-wrap\"><img id=\"%s\" title=\"%s\" alt=\"image\" src=\"%s\"/></div><p></p>\n"
;
String
content
=
selectById
.
getContent
();
if
(
content
==
null
){
content
=
""
;
}
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++){
content
+=
String
.
format
(
imgDiv
,
i
,
i
,
jsonArray
.
getString
(
i
));
}
information
.
setContent
(
content
);
}
}
catch
(
Exception
e
){
}
...
...
cloud-site-service/src/main/resources/mapper/DataClassificationMapper.xml
View file @
fc81388b
...
...
@@ -70,6 +70,7 @@
AND b.state = 2
GROUP BY
a.id
order by sort
</select>
<select
id=
"selectClassification"
resultType=
"com.yizhi.site.application.vo.domain.DataClassificationVo"
>
...
...
cloud-site-service/src/main/resources/mapper/EventTrackMapper.xml
View file @
fc81388b
...
...
@@ -37,6 +37,12 @@
#{item}
</foreach>
</if>
<if
test=
"subNameList!=null and subNameList.size()>0"
>
AND e.sub_type IN
<foreach
collection=
"subNameList"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"deptId!=null"
>
and e.dept_id = #{deptId}
</if>
...
...
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