Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
elearn
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
elearn
Commits
d56fab04
Commit
d56fab04
authored
Jan 14, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
埋点
parent
467ea762
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
cloud-system-api/src/main/java/com/yizhi/system/application/feign/DictionaryFeignClients.java
+9
-0
cloud-system/src/main/java/com/yizhi/system/application/controller/api/AuthController.java
+12
-7
cloud-system/src/main/java/com/yizhi/system/application/controller/remote/DictionaryController.java
+0
-1
No files found.
cloud-system-api/src/main/java/com/yizhi/system/application/feign/DictionaryFeignClients.java
View file @
d56fab04
package
com
.
yizhi
.
system
.
application
.
feign
;
import
com.yizhi.system.application.vo.domain.Dictionary
;
import
com.yizhi.util.application.domain.Response
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
/**
* com.yizhi.application.feign
*
...
...
@@ -15,4 +19,9 @@ public interface DictionaryFeignClients {
@GetMapping
(
value
=
"/dictionary/insertBySearchName"
)
boolean
insertBySearchName
(
@RequestParam
(
"searchName"
)
String
searchName
);
@GetMapping
(
value
=
"/dictionary/child/listByCode"
)
Response
<
List
<
Dictionary
>>
listChildDictionary
(
@RequestParam
(
name
=
"code"
,
defaultValue
=
"0"
)
String
code
,
@RequestParam
(
name
=
"includeParent"
,
defaultValue
=
"false"
)
Boolean
includeParent
,
@RequestParam
(
name
=
"layer"
,
defaultValue
=
"1"
)
Integer
layer
);
}
cloud-system/src/main/java/com/yizhi/system/application/controller/api/AuthController.java
View file @
d56fab04
...
...
@@ -22,6 +22,7 @@ import com.yizhi.core.application.task.TaskExecutor;
import
com.yizhi.core.application.token.TokenHelper
;
import
com.yizhi.point.application.feign.PointListenerClients
;
import
com.yizhi.site.application.enums.FunctionTypeCode
;
import
com.yizhi.site.application.feign.api.EventTrackApiClients
;
import
com.yizhi.site.application.feign.api.FunctionDisplayConfigApiClients
;
import
com.yizhi.site.application.feign.api.MyItemConfigApiClients
;
import
com.yizhi.site.application.feign.api.MyItemConfigDefaultApiClients
;
...
...
@@ -116,6 +117,9 @@ public class AuthController {
@Autowired
private
PointListenerClients
pointListenerClients
;
@Autowired
private
EventTrackApiClients
eventTrackApiClients
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AuthController
.
class
);
private
static
final
String
LOGIN_PASSWORD_ERROR_RECORD
=
"login:password:err:times:"
;
...
...
@@ -288,7 +292,6 @@ public class AuthController {
}
context
.
setAccountId
(
user
.
getId
());
context
.
setOrgId
(
user
.
getOrgId
());
String
token
=
createToken
(
user
,
context
);
// 生成token(不是首次登陆)
if
(!
firstLoginFlg
)
{
...
...
@@ -310,10 +313,6 @@ public class AuthController {
//登录成功,设置用户选择的语言
languageUtil
.
setStudentSelectLanguage
(
context
,
languageCode
);
// 新增登录积分
String
shortDay
=
DateUtil
.
toShortDay
(
new
Date
());
pointListenerClients
.
addPoint
(
"point_login"
,
Long
.
valueOf
(
shortDay
));
logger
.
info
(
"登陆处理结束"
);
return
Response
.
ok
(
retMap
);
...
...
@@ -473,9 +472,15 @@ public class AuthController {
if
(
"true"
.
equals
(
user
.
getIsChecked
()))
{
return
ret
;
}
Integer
terminalType
=
user
.
getTerminalType
();
Integer
terminalType
=
user
.
getTerminalType
()
==
null
?
APP
:
user
.
getTerminalType
();
context
.
setSiteType
(
terminalType
);
// 新增登录积分
String
shortDay
=
DateUtil
.
toShortDay
(
new
Date
());
pointListenerClients
.
addPoint
(
"point_login"
,
Long
.
valueOf
(
shortDay
));
// 添加登录埋点
eventTrackApiClients
.
addEvent
(
"event_login"
,
context
.
getAccountId
());
//添加登录日志
addLoginRecord
(
context
.
getAccountId
(),
context
.
getCompanyId
(),
context
.
getSiteId
(),
context
.
getOrgId
(),
terminalType
==
null
?
APP
:
terminalType
);
addLoginRecord
(
context
.
getAccountId
(),
context
.
getCompanyId
(),
context
.
getSiteId
(),
context
.
getOrgId
(),
terminalType
);
}
return
ret
;
}
...
...
cloud-system/src/main/java/com/yizhi/system/application/controller/remote/DictionaryController.java
View file @
d56fab04
...
...
@@ -366,7 +366,6 @@ public class DictionaryController {
}
/**
* 检查该字典下是否有子数据
*
...
...
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