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
aee12114
Commit
aee12114
authored
Feb 14, 2022
by
xugaojun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
鸿星尔克定制需求:增加企业校验
parent
cd736752
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+12
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
aee12114
...
@@ -25,6 +25,7 @@ import com.gic.wechat.api.dto.qywx.ItemDTO;
...
@@ -25,6 +25,7 @@ import com.gic.wechat.api.dto.qywx.ItemDTO;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.service.qywx.QywxDepartmentApiService
;
import
com.gic.wechat.api.service.qywx.QywxDepartmentApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.google.common.collect.Sets
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -133,6 +134,12 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -133,6 +134,12 @@ public class MessageApiServiceImpl implements MessageApiService {
log
.
info
(
"通过corpId:【{}】未查询到授权企业,无法处理"
,
dto
.
getAuthCorpId
());
log
.
info
(
"通过corpId:【{}】未查询到授权企业,无法处理"
,
dto
.
getAuthCorpId
());
return
;
return
;
}
}
// 校验适用企业
boolean
suitWxEnterpriseIid
=
checkSuitEnterpriseId
(
enterprise
.
getWxEnterpriseId
());
if
(!
suitWxEnterpriseIid
)
{
log
.
info
(
"微信企业id:{}, 不适用"
,
enterprise
.
getWxEnterpriseId
());
return
;
}
List
<
TabHaobanWxEnterpriseRelated
>
relatedList
=
wxEnterpriseRelatedService
.
getByWxEnterpriseId
(
enterprise
.
getWxEnterpriseId
());
List
<
TabHaobanWxEnterpriseRelated
>
relatedList
=
wxEnterpriseRelatedService
.
getByWxEnterpriseId
(
enterprise
.
getWxEnterpriseId
());
if
(
CollectionUtils
.
isEmpty
(
relatedList
))
{
if
(
CollectionUtils
.
isEmpty
(
relatedList
))
{
log
.
info
(
"未查询到企业关联企业 wxEnt"
);
log
.
info
(
"未查询到企业关联企业 wxEnt"
);
...
@@ -189,6 +196,11 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -189,6 +196,11 @@ public class MessageApiServiceImpl implements MessageApiService {
return
userid
.
startsWith
(
"5"
);
return
userid
.
startsWith
(
"5"
);
}
}
private
boolean
checkSuitEnterpriseId
(
String
wxEnterpriseId
)
{
Set
<
String
>
wxSet
=
Sets
.
newHashSet
(
"ca66a01b79474c40b3e7c7f93daf1a3b"
);
return
wxSet
.
contains
(
wxEnterpriseId
);
}
private
void
doDealUser
(
QywxCallBackDTO
dto
,
String
enterpriseId
,
String
secret
)
{
private
void
doDealUser
(
QywxCallBackDTO
dto
,
String
enterpriseId
,
String
secret
)
{
ClerkQwDTO
clerkQwDTO
=
new
ClerkQwDTO
();
ClerkQwDTO
clerkQwDTO
=
new
ClerkQwDTO
();
clerkQwDTO
.
setEnterpriseId
(
enterpriseId
);
clerkQwDTO
.
setEnterpriseId
(
enterpriseId
);
...
...
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