Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
998478ee
Commit
998478ee
authored
Sep 30, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
ea55e926
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+5
-1
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
998478ee
...
@@ -292,7 +292,9 @@ public class AppPermissionService {
...
@@ -292,7 +292,9 @@ public class AppPermissionService {
rsUserDetail
.
setUpdatetime
(
now
);
rsUserDetail
.
setUpdatetime
(
now
);
rsUserDetail
.
setIsdel
(
0
);
rsUserDetail
.
setIsdel
(
0
);
rsUserDetail
.
setCrtHost
(
getIp
());
rsUserDetail
.
setCrtHost
(
getIp
());
setCreateIPInfo
(
rsUserDetail
);
setCreateIPInfo
(
rsUserDetail
);
log
.
info
(
"注册:解析地址后: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
//邀请人id关系绑定
//邀请人id关系绑定
Integer
parentId
=
0
;
Integer
parentId
=
0
;
if
(
StringUtils
.
isNotBlank
(
code
)){
if
(
StringUtils
.
isNotBlank
(
code
)){
...
@@ -1091,7 +1093,7 @@ public class AppPermissionService {
...
@@ -1091,7 +1093,7 @@ public class AppPermissionService {
public
void
setCreateIPInfo
(
AppUserDetail
appUserDetail
)
{
public
void
setCreateIPInfo
(
AppUserDetail
appUserDetail
)
{
String
crtHost
=
appUserDetail
.
getCrtHost
();
String
crtHost
=
appUserDetail
.
getCrtHost
();
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"解析的地址:【{}】"
,
crtHost
);
log
.
debug
(
"解析的地址:【{}】"
,
crtHost
+
"---time==="
+
System
.
currentTimeMillis
()/
1000L
);
}
}
try
{
try
{
analyticalIPByWebSiteAndIPAddress
(
IPAddress
.
BASE_IP_PARSING_URL2
,
crtHost
,
appUserDetail
);
analyticalIPByWebSiteAndIPAddress
(
IPAddress
.
BASE_IP_PARSING_URL2
,
crtHost
,
appUserDetail
);
...
@@ -1108,10 +1110,12 @@ public class AppPermissionService {
...
@@ -1108,10 +1110,12 @@ public class AppPermissionService {
private
void
analyticalIPByWebSiteAndIPAddress
(
String
url
,
String
crtHost
,
AppUserDetail
appUserDetail
)
{
private
void
analyticalIPByWebSiteAndIPAddress
(
String
url
,
String
crtHost
,
AppUserDetail
appUserDetail
)
{
String
ipAddress
=
restTemplate
.
getForObject
(
String
.
format
(
"%s%s"
,
url
,
crtHost
),
String
.
class
);
String
ipAddress
=
restTemplate
.
getForObject
(
String
.
format
(
"%s%s"
,
url
,
crtHost
),
String
.
class
);
log
.
debug
(
"解析的调用网站后:【{}】"
,
crtHost
+
"---time==="
+
System
.
currentTimeMillis
()/
1000L
);
String
data
=
JSONObject
.
parseObject
(
ipAddress
).
getString
(
IPAddress
.
BASE_DATA
);
String
data
=
JSONObject
.
parseObject
(
ipAddress
).
getString
(
IPAddress
.
BASE_DATA
);
JSONObject
ipJsonObject
=
JSONObject
.
parseObject
(
data
);
JSONObject
ipJsonObject
=
JSONObject
.
parseObject
(
data
);
String
cityName
=
ipJsonObject
.
getString
(
IPAddress
.
CITY_NAME
);
String
cityName
=
ipJsonObject
.
getString
(
IPAddress
.
CITY_NAME
);
RegionDTO
regionDTO
=
regionFeign
.
getRegionByCityName
(
StringUtils
.
isEmpty
(
cityName
)
?
"东莞"
:
cityName
);
RegionDTO
regionDTO
=
regionFeign
.
getRegionByCityName
(
StringUtils
.
isEmpty
(
cityName
)
?
"东莞"
:
cityName
);
log
.
debug
(
"解析的调用服务后:【{}】"
,
crtHost
+
"---time==="
+
System
.
currentTimeMillis
()/
1000L
);
if
(
null
!=
regionDTO
)
{
if
(
null
!=
regionDTO
)
{
appUserDetail
.
setProvinceCode
(
Integer
.
valueOf
(
String
.
valueOf
(
regionDTO
.
getParentId
())));
appUserDetail
.
setProvinceCode
(
Integer
.
valueOf
(
String
.
valueOf
(
regionDTO
.
getParentId
())));
appUserDetail
.
setCityCode
(
Integer
.
valueOf
(
String
.
valueOf
(
regionDTO
.
getId
())));
appUserDetail
.
setCityCode
(
Integer
.
valueOf
(
String
.
valueOf
(
regionDTO
.
getId
())));
...
...
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