Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-web
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
cloud-web
Commits
be6e000a
Commit
be6e000a
authored
Jan 17, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
埋点优化
parent
6b1c78f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
cloud-web-student/src/main/java/com/yizhi/application/protal/controller/InformationStudentController.java
+1
-1
cloud-web-student/src/main/java/com/yizhi/application/research/controller/ResearchController.java
+18
-5
No files found.
cloud-web-student/src/main/java/com/yizhi/application/protal/controller/InformationStudentController.java
View file @
be6e000a
...
@@ -137,7 +137,7 @@ public class InformationStudentController {
...
@@ -137,7 +137,7 @@ public class InformationStudentController {
InformationListPcVo
vo
=
informationStudentFeignClients
.
informationPcPageListV2
(
infoVO
);
InformationListPcVo
vo
=
informationStudentFeignClients
.
informationPcPageListV2
(
infoVO
);
// 添加阅读文章埋点
// 添加阅读文章埋点
if
(
request
.
getHeader
(
"Cookie"
)!=
null
&&
Objects
.
equals
(
redisCache
.
get
(
request
.
getHeader
(
"Cookie"
).
replace
(
"JSESSIONID="
,
""
)),
"2"
)){
if
(
request
.
getHeader
(
"Cookie"
)!=
null
&&
Objects
.
equals
(
redisCache
.
get
(
request
.
getHeader
(
"Cookie"
).
replace
(
"JSESSIONID="
,
""
)),
"2"
)){
eventTrackApiClients
.
addEvent
(
"info_"
+
String
.
valueOf
(
infoVO
.
getRelationId
()),
infoVO
.
getTypeTwo
());
eventTrackApiClients
.
addEvent
(
String
.
valueOf
(
infoVO
.
getRelationId
()),
infoVO
.
getTypeTwo
()!=
null
?
infoVO
.
getTypeTwo
():
infoVO
.
getRelationId
());
}
}
pageMap
.
put
(
"pageNo"
,
pageNo
);
pageMap
.
put
(
"pageNo"
,
pageNo
);
pageMap
.
put
(
"pageSize"
,
pageSize
);
pageMap
.
put
(
"pageSize"
,
pageSize
);
...
...
cloud-web-student/src/main/java/com/yizhi/application/research/controller/ResearchController.java
View file @
be6e000a
package
com
.
yizhi
.
application
.
research
.
controller
;
package
com
.
yizhi
.
application
.
research
.
controller
;
import
com.yizhi.core.application.cache.RedisCache
;
import
com.yizhi.core.application.context.ContextHolder
;
import
com.yizhi.core.application.context.ContextHolder
;
import
com.yizhi.core.application.context.RequestContext
;
import
com.yizhi.core.application.context.RequestContext
;
import
com.yizhi.research.application.feign.ResearchClient
;
import
com.yizhi.research.application.feign.ResearchClient
;
...
@@ -8,6 +9,7 @@ import com.yizhi.research.application.vo.api.PageVo;
...
@@ -8,6 +9,7 @@ import com.yizhi.research.application.vo.api.PageVo;
import
com.yizhi.research.application.vo.api.SearchVo
;
import
com.yizhi.research.application.vo.api.SearchVo
;
import
com.yizhi.research.application.vo.domain.ResearchVo
;
import
com.yizhi.research.application.vo.domain.ResearchVo
;
import
com.yizhi.research.application.vo.domain.TrResearchQuestionVo
;
import
com.yizhi.research.application.vo.domain.TrResearchQuestionVo
;
import
com.yizhi.site.application.feign.api.EventTrackApiClients
;
import
com.yizhi.util.application.constant.ReturnCode
;
import
com.yizhi.util.application.constant.ReturnCode
;
import
com.yizhi.util.application.domain.Response
;
import
com.yizhi.util.application.domain.Response
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -18,8 +20,10 @@ import org.slf4j.LoggerFactory;
...
@@ -18,8 +20,10 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
/**
/**
...
@@ -36,13 +40,18 @@ public class ResearchController {
...
@@ -36,13 +40,18 @@ public class ResearchController {
@Autowired
@Autowired
private
ResearchClient
researchClient
;
private
ResearchClient
researchClient
;
@Autowired
private
EventTrackApiClients
eventTrackApiClients
;
@Autowired
private
RedisCache
redisCache
;
@GetMapping
(
"/page/list"
)
@GetMapping
(
"/page/list"
)
@ApiOperation
(
value
=
"分页查询学员能看到的调研"
,
notes
=
"分两种状态"
,
response
=
ResearchVo
.
class
)
@ApiOperation
(
value
=
"分页查询学员能看到的调研"
,
notes
=
"分两种状态"
,
response
=
ResearchVo
.
class
)
public
Response
<
ResearchVo
>
listPage
(
public
Response
<
ResearchVo
>
listPage
(
HttpServletRequest
request
,
@ApiParam
(
name
=
"state"
,
value
=
"状态:1已完成,2进行中"
,
required
=
false
)
@RequestParam
(
name
=
"state"
,
required
=
false
)
Integer
state
,
@ApiParam
(
name
=
"state"
,
value
=
"状态:1已完成,2进行中"
,
required
=
false
)
@RequestParam
(
name
=
"state"
,
required
=
false
)
Integer
state
,
@ApiParam
(
name
=
"bizType"
,
value
=
"业务类型:1调研;2投票,为空查询所有"
,
required
=
false
)
@RequestParam
(
name
=
"bizType"
,
required
=
false
)
Integer
bizType
,
@ApiParam
(
name
=
"bizType"
,
value
=
"业务类型:1调研;2投票,为空查询所有"
,
required
=
false
)
@RequestParam
(
name
=
"bizType"
,
required
=
false
)
Integer
bizType
,
@ApiParam
(
name
=
"pageNo"
,
value
=
"跳转页数,默认第一页"
,
required
=
true
)
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@ApiParam
(
name
=
"pageNo"
,
value
=
"跳转页数,默认第一页"
,
required
=
true
)
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@ApiParam
(
name
=
"pageSize"
,
value
=
"每页条数,默认20条"
,
required
=
true
)
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"20"
)
Integer
pageSize
@ApiParam
(
name
=
"pageSize"
,
value
=
"每页条数,默认20条"
,
required
=
true
)
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"20"
)
Integer
pageSize
)
{
)
{
try
{
try
{
PageVo
pageVo
=
new
PageVo
();
PageVo
pageVo
=
new
PageVo
();
...
@@ -58,6 +67,10 @@ public class ResearchController {
...
@@ -58,6 +67,10 @@ public class ResearchController {
model
.
setDate
(
new
Date
());
model
.
setDate
(
new
Date
());
model
.
setObj
(
pageVo
);
model
.
setObj
(
pageVo
);
model
.
setContext
(
ContextHolder
.
get
());
model
.
setContext
(
ContextHolder
.
get
());
// 添加调研埋点
if
(
request
.
getHeader
(
"Cookie"
)!=
null
&&
Objects
.
equals
(
redisCache
.
get
(
request
.
getHeader
(
"Cookie"
).
replace
(
"JSESSIONID="
,
""
)),
"2"
)){
eventTrackApiClients
.
addEvent
(
"event_research"
,
ContextHolder
.
get
().
getAccountId
());
}
return
Response
.
ok
(
researchClient
.
apiListPage
(
model
));
return
Response
.
ok
(
researchClient
.
apiListPage
(
model
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
""
,
e
);
LOGGER
.
error
(
""
,
e
);
...
...
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