Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小学僧a
jeepay
提交
ecec403e
jeepay
项目概览
小学僧a
/
jeepay
与 Fork 源项目一致
Fork自
计全科技 / jeepay
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
jeepay
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ecec403e
编写于
6月 25, 2021
作者:
terrfly
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
解决paymenet项目缓存没有更新的问题
上级
c465ec96
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
23 addition
and
21 deletion
+23
-21
jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextService.java
.../com/jeequan/jeepay/pay/service/ConfigContextService.java
+23
-21
未找到文件。
jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextService.java
浏览文件 @
ecec403e
...
...
@@ -79,7 +79,7 @@ public class ConfigContextService {
/** 获取 [商户配置信息] **/
public
synchronized
MchInfoConfigContext
getMchInfoConfigContext
(
String
mchNo
){
public
MchInfoConfigContext
getMchInfoConfigContext
(
String
mchNo
){
MchInfoConfigContext
mchInfoConfigContext
=
mchInfoConfigContextMap
.
get
(
mchNo
);
...
...
@@ -92,7 +92,7 @@ public class ConfigContextService {
}
/** 获取 [商户应用支付参数配置信息] **/
public
synchronized
MchAppConfigContext
getMchAppConfigContext
(
String
mchNo
,
String
appId
){
public
MchAppConfigContext
getMchAppConfigContext
(
String
mchNo
,
String
appId
){
MchAppConfigContext
mchAppConfigContext
=
mchAppConfigContextMap
.
get
(
appId
);
...
...
@@ -105,7 +105,7 @@ public class ConfigContextService {
}
/** 获取 [ISV支付参数配置信息] **/
public
synchronized
IsvConfigContext
getIsvConfigContext
(
String
isvNo
){
public
IsvConfigContext
getIsvConfigContext
(
String
isvNo
){
IsvConfigContext
isvConfigContext
=
isvConfigContextMap
.
get
(
isvNo
);
...
...
@@ -142,7 +142,19 @@ public class ConfigContextService {
mchInfoConfigContext
.
setMchNo
(
mchInfo
.
getMchNo
());
mchInfoConfigContext
.
setMchType
(
mchInfo
.
getType
());
mchInfoConfigContext
.
setMchInfo
(
mchInfo
);
mchAppService
.
list
(
MchApp
.
gw
().
eq
(
MchApp:
:
getMchNo
,
mchNo
)).
stream
().
forEach
(
mchApp
->
mchInfoConfigContext
.
putMchApp
(
mchApp
));
mchAppService
.
list
(
MchApp
.
gw
().
eq
(
MchApp:
:
getMchNo
,
mchNo
)).
stream
().
forEach
(
mchApp
->
{
//1. 更新商户内appId集合
mchInfoConfigContext
.
putMchApp
(
mchApp
);
MchAppConfigContext
mchAppConfigContext
=
mchAppConfigContextMap
.
get
(
mchApp
.
getAppId
());
if
(
mchAppConfigContext
!=
null
){
mchAppConfigContext
.
setMchApp
(
mchApp
);
mchAppConfigContext
.
setMchNo
(
mchInfo
.
getMchNo
());
mchAppConfigContext
.
setMchType
(
mchInfo
.
getType
());
mchAppConfigContext
.
setMchInfo
(
mchInfo
);
}
});
mchInfoConfigContextMap
.
put
(
mchNo
,
mchInfoConfigContext
);
}
...
...
@@ -156,28 +168,18 @@ public class ConfigContextService {
return
;
}
//DB已经删除
if
(
mchAppService
.
count
(
MchApp
.
gw
().
eq
(
MchApp:
:
getAppId
,
appId
))
<=
0
){
mchAppConfigContextMap
.
remove
(
appId
);
//清除缓存信息
mchInfoConfigContext
.
getAppMap
().
remove
(
appId
);
//清除主体信息中的appId
return
;
}
//商户应用信息(缓存中存在)
MchApp
mchApp
=
mchInfoConfigContext
.
getMchApp
(
appId
);
// 查询商户应用信息主体
MchApp
dbMchApp
=
mchAppService
.
getById
(
appId
);
if
(
mchApp
==
null
){
//说明商户主体信息不存在缓存
mchApp
=
mchAppService
.
getById
(
appId
);
if
(
mchApp
==
null
){
// DB查询为空
//DB已经删除
if
(
dbMchApp
==
null
){
mchAppConfigContextMap
.
remove
(
appId
);
//清除缓存信息
mchInfoConfigContext
.
getAppMap
().
remove
(
appId
);
//清除主体信息中的appId
return
;
}
//更新商户信息主体中的商户应用
mchInfoConfigContext
.
putMchApp
(
mchApp
);
}
mchInfoConfigContext
.
putMchApp
(
dbMchApp
);
//商户主体信息
MchInfo
mchInfo
=
mchInfoConfigContext
.
getMchInfo
();
...
...
@@ -188,7 +190,7 @@ public class ConfigContextService {
mchAppConfigContext
.
setMchNo
(
mchInfo
.
getMchNo
());
mchAppConfigContext
.
setMchType
(
mchInfo
.
getType
());
mchAppConfigContext
.
setMchInfo
(
mchInfo
);
mchAppConfigContext
.
setMchApp
(
m
chApp
);
mchAppConfigContext
.
setMchApp
(
dbM
chApp
);
// 查询商户的所有支持的参数配置
List
<
PayInterfaceConfig
>
allConfigList
=
payInterfaceConfigService
.
list
(
PayInterfaceConfig
.
gw
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录