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
9b5b8ba9
Commit
9b5b8ba9
authored
Aug 06, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
3cb4d93c
65dff1ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
AppUserRelationBiz.java
...github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
+22
-19
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
View file @
9b5b8ba9
...
@@ -74,25 +74,28 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
...
@@ -74,25 +74,28 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
relation
.
setBindType
(
type
);
relation
.
setBindType
(
type
);
insertSelective
(
relation
);
insertSelective
(
relation
);
}
}
relation
=
getMyBiz
().
getRelationByUserId
(
userId
);
Long
bindTime
=
time
-
validTime
;
if
(
relation
==
null
){
//判断用户是否有有效的下线
relation
=
new
AppUserRelation
();
if
(
getCountByParentId
(
userId
,
bindTime
)==
0L
){
relation
.
setUserId
(
userId
);
relation
=
getMyBiz
().
getRelationByUserId
(
userId
);
relation
.
setParentId
(
parentId
);
if
(
relation
==
null
){
relation
.
setBindType
(
type
);
relation
=
new
AppUserRelation
();
relation
.
setBindTime
(
time
);
relation
.
setUserId
(
userId
);
insertSelective
(
relation
);
relation
.
setParentId
(
parentId
);
}
else
{
relation
.
setBindType
(
type
);
//(B无有效上线+无有效下线)
relation
.
setBindTime
(
time
);
Long
bindTime
=
time
-
validTime
;
insertSelective
(
relation
);
log
.
info
(
"----userId==="
+
userId
+
"----bindTime===="
+
bindTime
+
"----relation.getBindTime()==="
+
relation
.
getBindTime
());
}
else
{
if
((
relation
.
getParentId
()==
null
||
relation
.
getParentId
()==
0
||(
relation
.
getIsForever
()!=
1
&&
relation
.
getBindTime
()<
bindTime
))&&
getCountByParentId
(
userId
,
bindTime
)==
0L
){
//判断用户是否有有效的上线
relation
.
setParentId
(
parentId
);
log
.
info
(
"----userId==="
+
userId
+
"----bindTime===="
+
bindTime
+
"----relation.getBindTime()==="
+
relation
.
getBindTime
());
relation
.
setBindType
(
type
);
if
(
relation
.
getParentId
()==
null
||
relation
.
getParentId
()==
0
||(
relation
.
getIsForever
()!=
1
&&
relation
.
getBindTime
()<
bindTime
)){
relation
.
setBindTime
(
time
);
relation
.
setParentId
(
parentId
);
getMyBiz
().
updRelation
(
relation
);
relation
.
setBindType
(
type
);
}
relation
.
setBindTime
(
time
);
}
getMyBiz
().
updRelation
(
relation
);
}
}
}
}
}
//首页关系绑定
//首页关系绑定
public
ObjectRestResponse
appBindRelation
(
Integer
userId
,
String
code
){
public
ObjectRestResponse
appBindRelation
(
Integer
userId
,
String
code
){
...
...
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