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
5e0382af
Commit
5e0382af
authored
Aug 25, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新企微加密类型字段
parent
8a197569
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
15 deletions
+82
-15
WxEnterpriseApiService.java
...gic/haoban/manage/api/service/WxEnterpriseApiService.java
+2
-0
WxEnterpriseMapper.java
.../haoban/manage/service/dao/mapper/WxEnterpriseMapper.java
+4
-5
WxEnterpriseService.java
...ic/haoban/manage/service/service/WxEnterpriseService.java
+4
-0
MemberUnionRelatedServiceImpl.java
...e/service/service/impl/MemberUnionRelatedServiceImpl.java
+0
-5
WxEnterpriseServiceImpl.java
.../manage/service/service/impl/WxEnterpriseServiceImpl.java
+51
-0
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+7
-1
WxEnterpriseMapper.xml
...-service/src/main/resources/mapper/WxEnterpriseMapper.xml
+7
-0
TestController.java
.../com/gic/haoban/manage/web/controller/TestController.java
+1
-1
WxEnterpriseController.java
.../haoban/manage/web/controller/WxEnterpriseController.java
+6
-3
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxEnterpriseApiService.java
View file @
5e0382af
...
...
@@ -219,6 +219,8 @@ public interface WxEnterpriseApiService {
*/
SecretSettingDTO
getSecretSettingById
(
String
secretId
);
public
void
updateWxSecurityType
(
String
wxEnterpriseId
)
;
/**
*
* @Title: stopHaoban
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/WxEnterpriseMapper.java
View file @
5e0382af
...
...
@@ -83,13 +83,13 @@ public interface WxEnterpriseMapper {
* @date 2022-08-03 17:27:13
*/
int
updateAutoActiveFlagById
(
@Param
(
"autoActiveFlag"
)
Integer
autoActiveFlag
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
void
updateWxSecurityType
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxSecurityType"
)
Integer
wxSecurityType
)
;
/**
* 列出所有企业(与gic关联)
*
* @return {@link List }<{@link WxEnterpriseDTO }>
* @author mozhu
* @date 2022-08-08 13:45:30
*/
List
<
WxEnterpriseDTO
>
listAllEnterprise
();
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/WxEnterpriseService.java
View file @
5e0382af
...
...
@@ -6,6 +6,8 @@ import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
WxEnterpriseService
{
String
add
(
WxEnterpriseDTO
wxDTO
);
...
...
@@ -87,6 +89,8 @@ public interface WxEnterpriseService {
*/
int
updateAutoActiveFlagById
(
Integer
autoActiveFlag
,
String
wxEnterpriseId
);
void
updateWxSecurityType
(
String
wxEnterpriseId
)
;
void
stopHaoban
(
String
enterpriseId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/MemberUnionRelatedServiceImpl.java
View file @
5e0382af
...
...
@@ -11,9 +11,7 @@ import com.gic.haoban.base.api.common.BasePageInfo;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.MemberUnionidRelatedDTO
;
import
com.gic.haoban.manage.service.dao.mapper.MemberUnionidRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.entity.MemberUnionidRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.service.MemberUnionRelatedService
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -23,8 +21,6 @@ public class MemberUnionRelatedServiceImpl implements MemberUnionRelatedService
@Autowired
private
MemberUnionidRelatedMapper
mapper
;
@Autowired
private
StaffMapper
staffMapper
;
@Override
public
MemberUnionidRelatedDTO
getByWxUserIdAndUnionId
(
String
wxEnterpriseId
,
String
staffId
,
String
unionid
)
{
...
...
@@ -68,7 +64,6 @@ public class MemberUnionRelatedServiceImpl implements MemberUnionRelatedService
return
;
}
mapper
.
cleanStaffRelated
(
wxEnterpriseId
,
staffIds
);
}
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseServiceImpl.java
View file @
5e0382af
...
...
@@ -175,6 +175,57 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
public
int
updateAutoActiveFlagById
(
Integer
autoActiveFlag
,
String
wxEnterpriseId
)
{
return
mapper
.
updateAutoActiveFlagById
(
autoActiveFlag
,
wxEnterpriseId
);
}
@Override
public
void
updateWxSecurityType
(
String
wxEnterpriseId
)
{
List
<
TabHaobanWxApplication
>
applictionList
=
this
.
wxApplicationMapper
.
listApplication
(
wxEnterpriseId
)
;
String
corpid3th
=
null
,
corpidDk
=
null
;
boolean
mix3th
=
false
;
boolean
mixdk
=
false
;
int
len
=
20
;
if
(
CollectionUtils
.
isNotEmpty
(
applictionList
))
{
for
(
TabHaobanWxApplication
app
:
applictionList
)
{
Integer
appType
=
app
.
getApplicationType
()
;
if
(
appType
==
2
)
{
corpid3th
=
app
.
getCorpid
()
;
}
else
if
(
appType
.
equals
(
3
))
{
corpidDk
=
app
.
getCorpid
()
;
}
};
}
if
(
StringUtils
.
isBlank
(
corpid3th
)
||
StringUtils
.
isBlank
(
corpidDk
))
{
return
;
}
if
(
corpid3th
.
length
()
>
len
)
{
mix3th
=
true
;
}
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
);
}
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
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
5e0382af
...
...
@@ -181,6 +181,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
secretSettingService
.
saveSecretSetting
(
secretSetting
);
}
agreeExternalUseridFlag
(
wxEnterpriseId
,
1
);
this
.
wxEnterpriseService
.
updateWxSecurityType
(
wxEnterpriseId
);
log
.
info
(
"企业微信授权处理完成"
);
}
...
...
@@ -476,7 +477,12 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
staffPrivacyUseLogService
.
insert
(
staffPrivacyUseLogBO
);
}
}
@Override
public
void
updateWxSecurityType
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseService
.
updateWxSecurityType
(
wxEnterpriseId
);
}
@Override
public
SecretSettingDTO
getSecretSettingById
(
String
secretId
)
{
return
secretSettingService
.
getSecretSettingById
(
secretId
);
...
...
haoban-manage3-service/src/main/resources/mapper/WxEnterpriseMapper.xml
View file @
5e0382af
...
...
@@ -503,6 +503,13 @@
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId}
</update>
<update
id=
"updateWxSecurityType"
>
update tab_haoban_wx_enterprise
set wx_security_type = #{wxSecurityType},
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId}
</update>
<select
id=
"listAllEnterprise"
resultType=
"com.gic.haoban.manage.api.dto.WxEnterpriseDTO"
>
select
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/TestController.java
View file @
5e0382af
...
...
@@ -468,7 +468,7 @@ public class TestController extends WebBaseController {
if
(
wxType
==
4
)
{
desc
=
"(第三方明文,代开密文)"
;
}
return
Arrays
.
asList
(
wxEnterpriseDTO
.
getThirdCorpid
()+
"(第三方)"
,
wxEnterpriseDTO
.
getDkCorpid
()+
"()"
).
stream
().
filter
(
str
->
StringUtils
.
isNotBlank
(
str
)).
collect
(
Collectors
.
joining
(
" / "
))
+
desc
;
return
Arrays
.
asList
(
wxEnterpriseDTO
.
getThirdCorpid
()+
"(第三方)"
,
wxEnterpriseDTO
.
getDkCorpid
()+
"(
代开发
)"
).
stream
().
filter
(
str
->
StringUtils
.
isNotBlank
(
str
)).
collect
(
Collectors
.
joining
(
" / "
))
+
desc
;
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseController.java
View file @
5e0382af
...
...
@@ -208,12 +208,15 @@ public class WxEnterpriseController extends WebBaseController {
private
String
getCorpid
(
WxEnterpriseDTO
wxEnterpriseDTO
)
{
Integer
wxType
=
wxEnterpriseDTO
.
getWxSecurityType
()
;
String
desc
=
" -- "
;
if
(
null
==
wxType
||
0
==
wxType
)
{
this
.
wxEnterpriseApiService
.
updateWxSecurityType
(
wxEnterpriseDTO
.
getWxEnterpriseId
());
}
String
desc
=
" (企微加密方式待确认,请联系运营人员) "
;
if
(
wxType
==
1
)
{
desc
=
"(全
部
明文)"
;
desc
=
"(全明文)"
;
}
if
(
wxType
==
2
)
{
desc
=
"(全
部
密文)"
;
desc
=
"(全密文)"
;
}
if
(
wxType
==
3
)
{
desc
=
"(第三方密文,代开明文)"
;
...
...
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