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
8a9a4955
Commit
8a9a4955
authored
Feb 12, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
咨询管理优化
parent
5f971663
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
1 deletions
+78
-1
cloud-site-api/src/main/java/com/yizhi/site/application/vo/domain/InformationVo.java
+18
-0
cloud-site-service/src/main/java/com/yizhi/site/application/domain/Information.java
+24
-0
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/EventTrackMapper.java
+2
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/EventTrackService.java
+2
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
+21
-1
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/InformationServiceImpl.java
+6
-0
cloud-site-service/src/main/resources/mapper/EventTrackMapper.xml
+5
-0
No files found.
cloud-site-api/src/main/java/com/yizhi/site/application/vo/domain/InformationVo.java
View file @
8a9a4955
...
...
@@ -103,11 +103,29 @@ public class InformationVo{
@ApiModelProperty
(
value
=
"图片来源"
)
private
String
imgSource
;
@ApiModelProperty
(
value
=
"信息来源"
)
private
String
source
;
private
String
typeThreeName
;
@ApiModelProperty
(
value
=
"资讯分类"
)
private
List
<
InformationClassify
>
informationClassify
;
@ApiModelProperty
(
value
=
"阅读数量"
)
private
Integer
readNum
=
0
;
@ApiModelProperty
(
value
=
"点赞数量"
)
private
Integer
admireNum
=
0
;
@ApiModelProperty
(
value
=
"收藏数量"
)
private
Integer
favoriteNum
=
0
;
@ApiModelProperty
(
value
=
"转发数量"
)
private
Integer
relayNum
=
0
;
@ApiModelProperty
(
value
=
"专题"
)
private
String
topic
;
protected
Serializable
pkVal
()
{
return
this
.
id
;
}
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/domain/Information.java
View file @
8a9a4955
...
...
@@ -137,6 +137,30 @@ public class Information extends Model<Information> {
@TableField
(
exist
=
false
)
private
List
<
InformationClassify
>
informationClassify
;
@ApiModelProperty
(
value
=
"阅读数量"
)
@TableField
(
exist
=
false
)
private
Integer
readNum
=
0
;
@ApiModelProperty
(
value
=
"点赞数量"
)
@TableField
(
exist
=
false
)
private
Integer
admireNum
=
0
;
@ApiModelProperty
(
value
=
"收藏数量"
)
@TableField
(
exist
=
false
)
private
Integer
favoriteNum
=
0
;
@ApiModelProperty
(
value
=
"转发数量"
)
@TableField
(
exist
=
false
)
private
Integer
relayNum
=
0
;
@ApiModelProperty
(
value
=
"信息来源"
)
@TableField
(
"source"
)
private
String
source
;
@ApiModelProperty
(
value
=
"专题"
)
@TableField
(
"topic"
)
private
String
topic
;
@Override
protected
Serializable
pkVal
()
{
return
this
.
id
;
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/EventTrackMapper.java
View file @
8a9a4955
...
...
@@ -26,4 +26,6 @@ public interface EventTrackMapper extends BaseMapper<EventTrack> {
List
<
EventTrackTypeNumVo
>
queryNumByType
(
@Param
(
"deptId"
)
Long
deptId
,
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
);
List
<
EventTrackDeptNumVo
>
queryDeptByType
(
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
);
Integer
getNum
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"businessId"
)
Long
businessId
);
}
cloud-site-service/src/main/java/com/yizhi/site/application/service/EventTrackService.java
View file @
8a9a4955
...
...
@@ -21,6 +21,8 @@ public interface EventTrackService extends IService<EventTrack> {
EventTrackDayNumVo
getTodayNum
(
String
date
);
Integer
getNum
(
String
typeStr
,
Long
businessId
);
DayNumVo
getNumByType
(
String
date
,
List
<
Integer
>
types
);
List
<
EventTrackTypeNumVo
>
queryNumByType
(
String
date
,
List
<
Integer
>
types
);
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
View file @
8a9a4955
...
...
@@ -86,7 +86,7 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
if
(
optional
!=
null
&&
optional
.
isPresent
()){
Dictionary
dictionary
=
optional
.
get
();
eventTrack
.
setSubType
(
dictionary
.
getCnName
());
eventTrack
.
setType
(
Integer
.
valueOf
(
dictionary
.
get
Description
()));
eventTrack
.
setType
(
Integer
.
valueOf
(
dictionary
.
get
Value
()));
}
}
if
(
Objects
.
equals
(
type
,
"event_login"
)){
...
...
@@ -111,6 +111,26 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
return
this
.
baseMapper
.
getTodayNum
(
date
);
}
@Override
public
Integer
getNum
(
String
typeStr
,
Long
businessId
){
String
key
=
"event_track_type"
;
Integer
type
=
0
;
List
<
Dictionary
>
dictionaryList
=
dictionaryFeignClients
.
listChildDictionary
(
key
,
false
,
1
);
if
(
CollUtil
.
isNotEmpty
(
dictionaryList
)){
Optional
<
Dictionary
>
optional
=
dictionaryList
.
stream
().
filter
(
d
->
Objects
.
equals
(
d
.
getCode
(),
typeStr
)).
findFirst
();
if
(
optional
!=
null
&&
optional
.
isPresent
()){
Dictionary
dictionary
=
optional
.
get
();
type
=
Integer
.
valueOf
(
dictionary
.
getValue
());
}
}
if
(
type
==
0
){
return
0
;
}
return
this
.
baseMapper
.
getNum
(
type
,
businessId
);
}
@Override
public
DayNumVo
getNumByType
(
String
date
,
List
<
Integer
>
types
)
{
if
(
ObjectUtils
.
isEmpty
(
date
)){
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/InformationServiceImpl.java
View file @
8a9a4955
...
...
@@ -61,6 +61,8 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
@Autowired
private
InformationMapper
informationMapper
;
@Autowired
private
EventTrackService
eventTrackService
;
@Autowired
private
PortalBannerService
portalBannerService
;
@Autowired
private
DataClassificationService
dataClassificationService
;
...
...
@@ -1020,6 +1022,10 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
if
(
info
.
getTypeThree
()
!=
null
&&
info
.
getTypeThree
()
!=
0
)
{
info
.
setTypeThreeName
(
findNameById
(
info
.
getTypeThree
()));
}
info
.
setAdmireNum
(
eventTrackService
.
getNum
(
"event_admire_"
+
info
.
getTypeOne
(),
info
.
getId
()));
info
.
setFavoriteNum
(
eventTrackService
.
getNum
(
"event_favorite_"
+
info
.
getTypeOne
(),
info
.
getId
()));
info
.
setRelayNum
(
eventTrackService
.
getNum
(
"event_relay_"
+
info
.
getTypeOne
(),
info
.
getId
()));
info
.
setReadNum
(
eventTrackService
.
getNum
(
String
.
valueOf
(
info
.
getTypeOne
()),
info
.
getId
()));
}
}
page
.
setRecords
(
list
);
...
...
cloud-site-service/src/main/resources/mapper/EventTrackMapper.xml
View file @
8a9a4955
...
...
@@ -107,4 +107,8 @@
</if>
) a
</select>
<select
id=
"getNum"
resultType=
"java.lang.Integer"
>
select count(1) from event_track e where e.deleted =0
and e.type=#{type} and e.business_id = #{businessId}
</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