Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
debcf8e2
Commit
debcf8e2
authored
Apr 15, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:标签同步增加限制
parent
e2a06cea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
QywxTagApiServiceImpl.java
...anage/service/service/out/impl/QywxTagApiServiceImpl.java
+7
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/QywxTagApiServiceImpl.java
View file @
debcf8e2
...
...
@@ -26,6 +26,7 @@ import com.gic.member.api.service.MemberTagService;
import
com.gic.member.tag.api.dto.MemberTagItemDTO
;
import
com.gic.member.tag.api.service.MemberTagItemApiService
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.wechat.api.dto.qywx.QywxTagDTO
;
import
com.gic.wechat.api.dto.qywx.QywxTagGroupDTO
;
import
com.gic.wechat.api.dto.qywx.response.QywxGetCorpTagListDTO
;
...
...
@@ -36,6 +37,9 @@ import com.google.common.collect.Sets;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.tuple.Pair
;
import
org.redisson.api.RRateLimiter
;
import
org.redisson.api.RateIntervalUnit
;
import
org.redisson.api.RateType
;
import
org.slf4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -551,6 +555,9 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
logger
.
info
(
"不需要操作:{},{}"
,
wxUserId
,
externalUserId
);
return
;
}
RRateLimiter
rateLimiter
=
RedisUtil
.
getRedisClient
().
getRateLimiter
(
"qywx:tag:limit"
);
rateLimiter
.
trySetRate
(
RateType
.
OVERALL
,
5
,
1
,
RateIntervalUnit
.
SECONDS
);
rateLimiter
.
acquire
();
QywxResponseDTO
responseDTO
=
qywxUserApiService
.
markTag
(
wxEnterprise
.
getCorpid
(),
config
.
getWxSuiteid
(),
wxUserId
,
externalUserId
,
needSetTags
,
needDelTags
);
logger
.
info
(
"操作返回:{}"
,
JSONObject
.
toJSONString
(
responseDTO
));
if
(
responseDTO
.
getErrcode
()
!=
0
)
{
...
...
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