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
c389618b
Commit
c389618b
authored
Jul 01, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:bug修改
parent
d1a57666
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+17
-16
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
c389618b
...
...
@@ -769,7 +769,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
dto
.
setAvatar
(
StringUtils
.
isBlank
(
dto
.
getAvatar
())
?
midRelatedDto
.
getAvatar
()
:
dto
.
getAvatar
());
dto
.
setMemberUnionidRelatedId
(
midRelatedDto
.
getMemberUnionidRelatedId
());
if
(
StringUtils
.
isAnyBlank
(
dto
.
getExternalUserid
(),
dto
.
getSelfExternalUserid
()))
{
if
(
StringUtils
.
isAnyBlank
(
dto
.
getExternalUserid
(),
dto
.
getSelfExternalUserid
()))
{
log
.
error
(
"加好友异常、请检查配置是否正常(如:检查客户联系回调、老好办助手回调、代开发回调(是否配置多个回调、企微权限是否正常、密钥是否正确)、好办权限等),wxEnterpriseId:{}"
,
wxEnterpriseId
);
return
null
;
}
...
...
@@ -2014,9 +2014,9 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
wxEnterpriseService
.
updateUseridFlagById
(
2
,
null
,
wxEnterpriseId
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"corpid"
,
corpid
);
jsonObject
.
put
(
"wxEnterpriseId"
,
wxEnterpriseId
);
jsonObject
.
put
(
"secret"
,
secretSetting
.
getSecretVal
());
jsonObject
.
put
(
"corpid"
,
corpid
);
jsonObject
.
put
(
"wxEnterpriseId"
,
wxEnterpriseId
);
jsonObject
.
put
(
"secret"
,
secretSetting
.
getSecretVal
());
GicMQClient
clientInstance
=
GICMQClientUtil
.
getClientInstance
();
try
{
clientInstance
.
sendMessage
(
"updateNewUseridCorpidMq"
,
jsonObject
.
toJSONString
());
...
...
@@ -2033,7 +2033,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
log
.
error
(
"传入为空"
);
return
;
}
log
.
info
(
"转换corpid、userid start params:{}"
,
params
);
log
.
info
(
"转换corpid、userid start params:{}"
,
params
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
params
);
String
wxEnterpriseId
=
jsonObject
.
getString
(
"wxEnterpriseId"
);
String
corpid
=
jsonObject
.
getString
(
"corpid"
);
...
...
@@ -2045,7 +2045,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
rateLimiter
.
trySetRate
(
RateType
.
OVERALL
,
5
,
1
,
RateIntervalUnit
.
SECONDS
);
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
int
pageNum
=
1
;
while
(
true
){
while
(
true
)
{
rateLimiter
.
acquire
();
basePageInfo
.
setPageNum
(
pageNum
);
basePageInfo
.
setPageSize
(
1000
);
...
...
@@ -2064,10 +2064,10 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
for
(
QywxNewUseridDTO
qywxNewUseridDTO
:
qywxNewUseridDTOList
)
{
String
userid
=
qywxNewUseridDTO
.
getUserid
();
String
openUserid
=
qywxNewUseridDTO
.
getOpen_userid
();
log
.
info
(
"转换新的userid,userid:{},openUserid:{}"
,
userid
,
openUserid
);
staffService
.
updateUserIdByUserId
(
wxEnterpriseId
,
openUserid
,
userid
);
log
.
info
(
"转换新的userid,userid:{},openUserid:{}"
,
userid
,
openUserid
);
staffService
.
updateUserIdByUserId
(
wxEnterpriseId
,
openUserid
,
userid
);
}
pageNum
++;
pageNum
++;
}
//更新导购员工关联关系表
...
...
@@ -2080,13 +2080,14 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
externalClerkRelatedService
.
updateUserIdByWxEnterpriseId
(
wxEnterpriseId
);
//更新自建外部联系人id
memberUnionRelatedService
.
updateExternalUseridByWxEnterpriseId
(
wxEnterpriseId
);
log
.
info
(
"转换corpid、userid end params:{}"
,
params
);
log
.
info
(
"转换corpid、userid end params:{}"
,
params
);
//迁移完成
updateUseridFlagById
(
wxEnterpriseId
,
corpid
);
updateUseridFlagById
(
wxEnterpriseId
,
corpid
);
}
/**
* 迁移完成
*
* @param wxEnterpriseId
* @param corpid
*/
...
...
@@ -2095,16 +2096,16 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String
openCorpid
=
qywxUserApiService
.
toOpenCorpid
(
corpid
,
serviceCorpid
);
TabHaobanWxApplication
tabHaobanWxApplication
=
wxApplicationMapper
.
selectByCorpId
(
corpid
,
3
);
if
(
tabHaobanWxApplication
==
null
)
{
log
.
info
(
"代开发应用不存在:{}"
,
corpid
);
return
;
log
.
info
(
"代开发应用不存在:{}"
,
corpid
);
return
;
}
wxApplicationMapper
.
updateCorpidById
(
tabHaobanWxApplication
.
getWxApplicationId
(),
openCorpid
);
String
[]
openidType
=
{
"1"
,
"3"
};
String
[]
openidType
=
{
"1"
,
"3"
};
//调用完成接口
boolean
flag
=
qywxUserApiService
.
finishOpenidMigration
(
corpid
,
serviceCorpid
,
tabHaobanWxApplication
.
getAgentId
(),
openidType
);
if
(
flag
)
{
wxApplicationMapper
.
updateCorpidById
(
tabHaobanWxApplication
.
getWxApplicationId
(),
openCorpid
);
wxEnterpriseService
.
updateUseridFlagById
(
1
,
openCorpid
,
wxEnterpriseId
);
}
else
{
}
else
{
wxEnterpriseService
.
updateUseridFlagById
(
3
,
openCorpid
,
wxEnterpriseId
);
}
String
lockKey
=
"updateNewUseridCorpid_"
+
wxEnterpriseId
;
...
...
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