Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
783121ad
Link Wechat
项目概览
仟微科技
/
Link Wechat
通知
48
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Link Wechat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
783121ad
编写于
12月 17, 2020
作者:
水
水库浪子
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加企业账号更新,启动清空企业微信token功能;
上级
53e8b2c0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
2 deletion
+41
-2
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeAccessTokenService.java
...a/com/linkwechat/wecom/service/IWeAccessTokenService.java
+2
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeAccessTokenServiceImpl.java
...nkwechat/wecom/service/impl/WeAccessTokenServiceImpl.java
+13
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCorpAccountServiceImpl.java
...nkwechat/wecom/service/impl/WeCorpAccountServiceImpl.java
+26
-2
未找到文件。
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeAccessTokenService.java
浏览文件 @
783121ad
...
...
@@ -14,4 +14,6 @@ public interface IWeAccessTokenService {
public
String
findProviderAccessToken
();
public
void
removeToken
();
}
\ No newline at end of file
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeAccessTokenServiceImpl.java
浏览文件 @
783121ad
...
...
@@ -68,6 +68,8 @@ public class WeAccessTokenServiceImpl implements IWeAccessTokenService {
}
private
String
findAccessToken
(
String
accessTokenKey
){
String
weAccessToken
=
redisCache
.
getCacheObject
(
accessTokenKey
);
...
...
@@ -105,4 +107,15 @@ public class WeAccessTokenServiceImpl implements IWeAccessTokenService {
}
/**
* 清空redis中的相关token
*/
@Override
public
void
removeToken
()
{
redisCache
.
deleteObject
(
WeConstans
.
WE_COMMON_ACCESS_TOKEN
);
redisCache
.
deleteObject
(
WeConstans
.
WE_CONTACT_ACCESS_TOKEN
);
redisCache
.
deleteObject
(
WeConstans
.
WE_PROVIDER_ACCESS_TOKEN
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCorpAccountServiceImpl.java
浏览文件 @
783121ad
...
...
@@ -6,6 +6,7 @@ import java.util.Optional;
import
com.linkwechat.common.constant.Constants
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.utils.DateUtils
;
import
com.linkwechat.wecom.service.IWeAccessTokenService
;
import
com.linkwechat.wecom.service.IWeCorpAccountService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -25,6 +26,10 @@ public class WeCorpAccountServiceImpl implements IWeCorpAccountService {
@Autowired
private
WeCorpAccountMapper
weCorpAccountMapper
;
@Autowired
private
IWeAccessTokenService
iWeAccessTokenService
;
/**
* 查询企业id相关配置
*
...
...
@@ -72,7 +77,15 @@ public class WeCorpAccountServiceImpl implements IWeCorpAccountService {
public
int
updateWeCorpAccount
(
WeCorpAccount
wxCorpAccount
)
{
return
weCorpAccountMapper
.
updateWeCorpAccount
(
wxCorpAccount
);
int
returnCode
=
weCorpAccountMapper
.
updateWeCorpAccount
(
wxCorpAccount
);
if
(
Constants
.
SERVICE_RETURN_SUCCESS_CODE
<
returnCode
){
iWeAccessTokenService
.
removeToken
();
}
return
returnCode
;
}
...
...
@@ -94,7 +107,18 @@ public class WeCorpAccountServiceImpl implements IWeCorpAccountService {
*/
@Override
public
int
startVailWeCorpAccount
(
String
corpId
)
{
return
weCorpAccountMapper
.
startVailWeCorpAccount
(
corpId
);
int
returnCode
=
weCorpAccountMapper
.
startVailWeCorpAccount
(
corpId
);
if
(
Constants
.
SERVICE_RETURN_SUCCESS_CODE
<
returnCode
){
iWeAccessTokenService
.
removeToken
();
}
return
returnCode
;
}
@Override
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录