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
18991f5f
Commit
18991f5f
authored
Aug 25, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企微加密类型
parent
1bebc84d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
29 deletions
+47
-29
WxEnterpriseApiService.java
...gic/haoban/manage/api/service/WxEnterpriseApiService.java
+2
-0
WxEnterpriseService.java
...ic/haoban/manage/service/service/WxEnterpriseService.java
+2
-0
WxEnterpriseServiceImpl.java
.../manage/service/service/impl/WxEnterpriseServiceImpl.java
+29
-23
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+5
-0
TestController.java
.../com/gic/haoban/manage/web/controller/TestController.java
+0
-4
WxEnterpriseController.java
.../haoban/manage/web/controller/WxEnterpriseController.java
+9
-2
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxEnterpriseApiService.java
View file @
18991f5f
...
...
@@ -221,6 +221,8 @@ public interface WxEnterpriseApiService {
public
void
updateWxSecurityType
(
String
wxEnterpriseId
)
;
public
int
calcSecretType
(
String
wxEnterpriseId
)
;
/**
*
* @Title: stopHaoban
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/WxEnterpriseService.java
View file @
18991f5f
...
...
@@ -91,6 +91,8 @@ public interface WxEnterpriseService {
void
updateWxSecurityType
(
String
wxEnterpriseId
)
;
public
int
calcSecretType
(
String
wxEnterpriseId
)
;
void
stopHaoban
(
String
enterpriseId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseServiceImpl.java
View file @
18991f5f
...
...
@@ -178,6 +178,31 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
@Override
public
void
updateWxSecurityType
(
String
wxEnterpriseId
)
{
int
wxSecurityType
=
this
.
calcSecretType
(
wxEnterpriseId
);
if
(
wxSecurityType
<
1
||
wxSecurityType
>
4
)
{
return
;
}
this
.
mapper
.
updateWxSecurityType
(
wxEnterpriseId
,
wxSecurityType
);
}
private
int
getType
(
boolean
mix3th
,
boolean
mixdk
)
{
if
(!
mix3th
&&
!
mixdk
)
{
return
1
;
}
if
(
mix3th
&&
mixdk
)
{
return
2
;
}
if
(!
mix3th
&&
mixdk
)
{
return
3
;
}
if
(
mix3th
&&
!
mixdk
)
{
return
4
;
}
return
0
;
}
@Override
public
int
calcSecretType
(
String
wxEnterpriseId
)
{
List
<
TabHaobanWxApplication
>
applictionList
=
this
.
wxApplicationMapper
.
listApplication
(
wxEnterpriseId
)
;
String
corpid3th
=
null
,
corpidDk
=
null
;
boolean
mix3th
=
false
;
...
...
@@ -194,7 +219,7 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
};
}
if
(
StringUtils
.
isBlank
(
corpid3th
)
||
StringUtils
.
isBlank
(
corpidDk
))
{
return
;
return
0
;
}
if
(
corpid3th
.
length
()
>
len
)
{
mix3th
=
true
;
...
...
@@ -202,31 +227,12 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
if
(
corpidDk
.
length
()
>
len
)
{
mixdk
=
true
;
}
int
wxSecurityType
=
this
.
getType
(
mix3th
,
mixdk
)
;
logger
.
info
(
"更新企微加密类型,corpid3th={},corpidDk={},wxSecurityType={}"
,
corpid3th
,
corpidDk
,
wxSecurityType
);
if
(
wxSecurityType
<
1
||
wxSecurityType
>
4
)
{
return
;
}
this
.
mapper
.
updateWxSecurityType
(
wxEnterpriseId
,
wxSecurityType
);
int
wxType
=
this
.
getType
(
mix3th
,
mixdk
)
;
logger
.
info
(
"更新企微加密类型,corpid3th={},corpidDk={},wxSecurityType={}"
,
corpid3th
,
corpidDk
,
wxType
);
return
wxType
;
}
public
int
getType
(
boolean
mix3th
,
boolean
mixdk
)
{
if
(!
mix3th
&&
!
mixdk
)
{
return
1
;
}
if
(
mix3th
&&
mixdk
)
{
return
2
;
}
if
(!
mix3th
&&
mixdk
)
{
return
3
;
}
if
(
mix3th
&&
!
mixdk
)
{
return
4
;
}
return
0
;
}
private
void
alert
(
String
title
,
Map
<
String
,
Object
>
map
)
{
String
msg
=
title
+
JSON
.
toJSONString
(
map
);
String
dingUrl
=
"https://oapi.dingtalk.com/robot/send?access_token=c38fdc53d26e9a019640755bdada1ce07ebd44a2555d1c8acc299de7a7b5b857"
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
18991f5f
...
...
@@ -484,6 +484,11 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
}
@Override
public
int
calcSecretType
(
String
wxEnterpriseId
)
{
return
this
.
wxEnterpriseService
.
calcSecretType
(
wxEnterpriseId
)
;
}
@Override
public
SecretSettingDTO
getSecretSettingById
(
String
secretId
)
{
return
secretSettingService
.
getSecretSettingById
(
secretId
);
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/TestController.java
View file @
18991f5f
...
...
@@ -445,10 +445,6 @@ public class TestController extends WebBaseController {
map
.
put
(
"当前企业加密方式"
,
getCorpid
(
qwDTO
))
;
map
.
put
(
"企微信息"
,
qwDTO
)
;
return
map
;
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseController.java
View file @
18991f5f
...
...
@@ -208,8 +208,10 @@ public class WxEnterpriseController extends WebBaseController {
private
String
getCorpid
(
WxEnterpriseDTO
wxEnterpriseDTO
)
{
Integer
wxType
=
wxEnterpriseDTO
.
getWxSecurityType
()
;
String
wxEnterpriseId
=
wxEnterpriseDTO
.
getWxEnterpriseId
()
;
if
(
null
==
wxType
||
0
==
wxType
)
{
this
.
wxEnterpriseApiService
.
updateWxSecurityType
(
wxEnterpriseDTO
.
getWxEnterpriseId
());
this
.
wxEnterpriseApiService
.
updateWxSecurityType
(
wxEnterpriseId
);
wxType
=
this
.
wxEnterpriseApiService
.
calcSecretType
(
wxEnterpriseId
)
;
}
String
desc
=
" (企微加密方式待确认,请联系运营人员) "
;
if
(
wxType
==
1
)
{
...
...
@@ -224,7 +226,12 @@ public class WxEnterpriseController extends WebBaseController {
if
(
wxType
==
4
)
{
desc
=
"(第三方明文,代开密文)"
;
}
return
Arrays
.
asList
(
wxEnterpriseDTO
.
getWxCorpid
(),
wxEnterpriseDTO
.
getOpenCorpid
()).
stream
().
filter
(
str
->
StringUtils
.
isNotBlank
(
str
)).
collect
(
Collectors
.
joining
(
" / "
))
+
desc
;
int
newType
=
this
.
wxEnterpriseApiService
.
calcSecretType
(
wxEnterpriseId
)
;
String
diff
=
""
;
if
(
null
!=
wxType
&&
wxType
.
intValue
()
!=
newType
)
{
diff
=
"*"
;
}
return
Arrays
.
asList
(
wxEnterpriseDTO
.
getWxCorpid
(),
wxEnterpriseDTO
.
getOpenCorpid
()).
stream
().
filter
(
str
->
StringUtils
.
isNotBlank
(
str
)).
collect
(
Collectors
.
joining
(
" / "
))
+
desc
+
diff
;
}
//gic企业列表
...
...
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