Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
9d807954
Commit
9d807954
authored
Aug 30, 2019
by
裴大威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix-dw-wxgroup' into 'master'
fix 更新群人数 See merge request rays/pcloud-book!116
parents
e1126772
e9208f81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
GroupQrcodeBizImpl.java
...va/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
+12
-2
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
View file @
9d807954
...
@@ -142,7 +142,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
...
@@ -142,7 +142,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
try
{
try
{
if
(
BookBusinessConstants
.
GROUP_NUM_DTO_MAP
.
size
()
<
1
)
{
if
(
BookBusinessConstants
.
GROUP_NUM_DTO_MAP
.
size
()
<
1
)
{
try
{
try
{
Thread
.
sleep
(
5
000
);
Thread
.
sleep
(
10
000
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
log
.
error
(
"[updateGroupNum] InterruptedException:{}"
,
e
);
log
.
error
(
"[updateGroupNum] InterruptedException:{}"
,
e
);
}
}
...
@@ -160,17 +160,24 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
...
@@ -160,17 +160,24 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
Integer
peopleCounts
=
WxGroupSDK
.
getPeopleCounts
(
value
.
getWxGroupId
(),
value
.
getRobotId
(),
value
.
getIp
());
Integer
peopleCounts
=
WxGroupSDK
.
getPeopleCounts
(
value
.
getWxGroupId
(),
value
.
getRobotId
(),
value
.
getIp
());
if
(
null
==
peopleCounts
||
peopleCounts
<
1
)
{
if
(
null
==
peopleCounts
||
peopleCounts
<
1
)
{
log
.
info
(
"[更新群人数] null == peopleCounts || peopleCounts < 1 entry:{}; peopleCounts:{}"
,
entry
,
peopleCounts
);
log
.
info
(
"[更新群人数] null == peopleCounts || peopleCounts < 1 entry:{}; peopleCounts:{}"
,
entry
,
peopleCounts
);
// 若未获取到将其移除
BookBusinessConstants
.
GROUP_NUM_DTO_MAP
.
remove
(
entry
.
getKey
());
continue
;
continue
;
}
}
log
.
info
(
"[更新群人数] entry:{}, peopleCounts:{}"
,
entry
,
peopleCounts
);
log
.
info
(
"[更新群人数] entry:{}, peopleCounts:{}"
,
entry
,
peopleCounts
);
groupQrcodeDao
.
updateUserNumber
(
value
.
getWxGroupId
(),
peopleCounts
);
groupQrcodeDao
.
updateUserNumber
(
value
.
getWxGroupId
(),
peopleCounts
);
BookBusinessConstants
.
GROUP_NUM_DTO_MAP
.
remove
(
entry
.
getKey
());
BookBusinessConstants
.
GROUP_NUM_DTO_MAP
.
remove
(
entry
.
getKey
());
try
{
Thread
.
sleep
(
1000
);
}
catch
(
InterruptedException
e
)
{
log
.
error
(
"[updateGroupNum] InterruptedException:{}"
,
e
);
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"[updateGroupNum] : Exception:{}"
,
e
);
log
.
error
(
"[updateGroupNum] : Exception:{}"
,
e
);
}
}
try
{
try
{
Thread
.
sleep
(
5
000
);
Thread
.
sleep
(
10
000
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
log
.
error
(
"[updateGroupNum] InterruptedException:{}"
,
e
);
log
.
error
(
"[updateGroupNum] InterruptedException:{}"
,
e
);
}
}
...
@@ -337,6 +344,9 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
...
@@ -337,6 +344,9 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
numDTO
=
new
AutoUpdateGroupNumDTO
(
weixinGroupId
,
robotId
,
ip
,
new
Date
());
numDTO
=
new
AutoUpdateGroupNumDTO
(
weixinGroupId
,
robotId
,
ip
,
new
Date
());
}
else
{
}
else
{
numDTO
.
getNum
().
incrementAndGet
();
numDTO
.
getNum
().
incrementAndGet
();
numDTO
.
setRobotId
(
robotId
);
numDTO
.
setIp
(
ip
);
numDTO
.
setWxGroupId
(
weixinGroupId
);
numDTO
.
setStartTime
(
new
Date
());
numDTO
.
setStartTime
(
new
Date
());
}
}
BookBusinessConstants
.
GROUP_NUM_DTO_MAP
.
put
(
weixinGroupId
,
numDTO
);
BookBusinessConstants
.
GROUP_NUM_DTO_MAP
.
put
(
weixinGroupId
,
numDTO
);
...
...
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