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
6c98cb1f
Commit
6c98cb1f
authored
Jan 14, 2025
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企微自建转代开发调整
parent
15ddb57b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
WxEnterpriseServiceImpl.java
.../manage/service/service/impl/WxEnterpriseServiceImpl.java
+15
-2
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseServiceImpl.java
View file @
6c98cb1f
...
...
@@ -8,6 +8,7 @@ import java.util.List;
import
java.util.Map
;
import
cn.hutool.core.collection.CollUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -52,6 +53,16 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
@Override
public
String
add
(
WxEnterpriseDTO
wxDTO
)
{
String
wxCorpid
=
wxDTO
.
getWxCorpid
()
;
if
(
StringUtils
.
isBlank
(
wxCorpid
))
{
wxCorpid
=
wxDTO
.
getOpenCorpid
()
;
}
String
key
=
"wxEnterpriseId:"
+
wxCorpid
;
RedisUtil
.
lock
(
key
,
3L
);
TabHaobanWxEnterprise
en
=
this
.
getEnterpriseBycorpId
(
wxCorpid
);
if
(
null
!=
en
)
{
return
en
.
getWxEnterpriseId
()
;
}
logger
.
info
(
"新增wx_enterprise,dto={}"
,
JSON
.
toJSONString
(
wxDTO
));
Date
now
=
new
Date
();
wxDTO
.
setWxEnterpriseId
(
StringUtil
.
randomUUID
());
...
...
@@ -61,6 +72,7 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
tabHaobanWxEnterprise
.
setStatusFlag
(
1
);
tabHaobanWxEnterprise
.
setBindFlag
(
1
);
mapper
.
insertSelective
(
tabHaobanWxEnterprise
);
RedisUtil
.
unlock
(
key
);
return
wxDTO
.
getWxEnterpriseId
();
}
...
...
@@ -129,10 +141,11 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
qw
.
setMemberCorpid
(
wxEnterprise
.
getWxCorpid
());
TabSecretSetting
secret
=
secretSettingMapper
.
getSecretSetting
(
wxEnterpriseId
,
SecretTypeEnum
.
CUSTOMIZED_APP
.
getVal
(),
null
);
qw
.
setSelfSecret
(
secret
.
getSecretVal
());
qw
.
setAgentId
(
secret
.
getAgentId
());
qw
.
setAgentName
(
secret
.
getAgentName
());
qw
.
setSelf3thSecret
(
secret
.
getSecretVal
());
qw
.
setSelfAppid
(
wxEnterprise
.
getWxaAppid
());
TabHaobanWxApplication
app
=
this
.
wxApplicationMapper
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
3
)
;
qw
.
setAgentId
(
app
.
getAgentId
());
qw
.
setAgentName
(
app
.
getAgentName
());
}
logger
.
info
(
"企微所有corpid信息={}"
,
JSON
.
toJSON
(
qw
));
return
qw
;
...
...
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