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
03fee680
Commit
03fee680
authored
Dec 19, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://113.105.137.151:22280/youjj/cloud-platform
into dev
parents
4d0f80a0
1ccd7073
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
74 deletions
+79
-74
ActivityPopularizeBiz.java
...com/xxfc/platform/activity/biz/ActivityPopularizeBiz.java
+79
-74
No files found.
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityPopularizeBiz.java
View file @
03fee680
...
@@ -86,11 +86,14 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper, Act
...
@@ -86,11 +86,14 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper, Act
}});
}});
log
.
info
(
"活动邀请注册:activityPopularize = {}"
,
activityPopularize
.
toString
());
log
.
info
(
"活动邀请注册:activityPopularize = {}"
,
activityPopularize
.
toString
());
if
(
activityPopularize
!=
null
)
{
if
(
activityPopularize
!=
null
)
{
String
lockKey
=
String
.
format
(
"%s%d:%s:%d"
,
registerQueueDTO
.
getInParamDTO
().
getActivityCode
(),
registerQueueDTO
.
getAppUserId
(),
registerQueueDTO
.
getInParamDTO
().
getUsername
(),
activityPopularize
.
getId
());
String
lockKey
=
String
.
format
(
"%s%d%d"
,
registerQueueDTO
.
getInParamDTO
().
getActivityCode
(),
appUserDTO
.
getInviterAccount
(),
activityPopularize
.
getId
());
RLock
rLock
=
redissonLock
.
getRLock
(
lockKey
);
RLock
rLock
=
redissonLock
.
getRLock
(
lockKey
);
try
{
try
{
boolean
isSuccess
=
rLock
.
tryLock
(
5
,
5
,
TimeUnit
.
SECONDS
);
boolean
isSuccess
=
rLock
.
tryLock
(
5
,
5
,
TimeUnit
.
SECONDS
);
if
(
isSuccess
)
{
if
(
isSuccess
)
{
log
.
info
(
"1, {}"
,
System
.
currentTimeMillis
());
Thread
.
sleep
(
1000
);
log
.
info
(
"2, {}"
,
System
.
currentTimeMillis
());
List
<
ActivityPopularizeItem
>
activityPopularizeItems
=
activityPopularizeItemBiz
.
selectByPopularizeId
(
activityPopularize
.
getId
());
List
<
ActivityPopularizeItem
>
activityPopularizeItems
=
activityPopularizeItemBiz
.
selectByPopularizeId
(
activityPopularize
.
getId
());
ActivityPopularizeItem
activityPopularizeItem
=
activityPopularizeItems
.
get
(
activityPopularizeItems
.
size
()
-
1
);
ActivityPopularizeItem
activityPopularizeItem
=
activityPopularizeItems
.
get
(
activityPopularizeItems
.
size
()
-
1
);
Date
now
=
DateUtil
.
date
();
Date
now
=
DateUtil
.
date
();
...
@@ -196,6 +199,8 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper, Act
...
@@ -196,6 +199,8 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper, Act
}
}
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
log
.
error
(
"tryLock fail, key = [{}]"
,
lockKey
);
log
.
error
(
"tryLock fail, key = [{}]"
,
lockKey
);
}
finally
{
log
.
info
(
"执行结束, {}"
,
System
.
currentTimeMillis
());
}
}
}
}
}
}
...
...
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