Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
069b2ebd
Commit
069b2ebd
authored
Jul 07, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改缓存
parent
f2a8b77f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
12 deletions
+24
-12
StockServiceImpl.java
...om/yeejoin/equipmanage/service/impl/StockServiceImpl.java
+21
-11
RelationRedisUtil.java
...java/com/yeejoin/equipmanage/utils/RelationRedisUtil.java
+3
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/StockServiceImpl.java
View file @
069b2ebd
...
@@ -508,16 +508,19 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
...
@@ -508,16 +508,19 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
relationRedisUtil
.
delSysRedisKey
(
fireFightSysIdsBuffer
.
toString
());
relationRedisUtil
.
delSysRedisKey
(
fireFightSysIdsBuffer
.
toString
());
}
}
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
if
(
redisUtils
.
hasKey
(
"equipAndCarIotCodes"
))
{
@Override
redisUtils
.
del
(
"equipAndCarIotCodes"
);
public
void
afterCommit
()
{
}
List
<
EquipmentSpecificVo
>
data
=
equipmentSpecificMapper
.
getEquipOrCarByIotCode
(
null
);
// TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
if
(
redisUtils
.
hasKey
(
"equipAndCarIotCodes"
))
{
// @Override
redisUtils
.
del
(
"equipAndCarIotCodes"
);
// public void afterCommit() {
}
// List<EquipmentSpecificVo> data = equipmentSpecificMapper.getEquipOrCarByIotCode(null);
redisUtils
.
set
(
"equipAndCarIotCodes"
,
JSONObject
.
toJSONString
(
data
));
// if (redisUtils.hasKey("equipAndCarIotCodes")) {
}
// redisUtils.del("equipAndCarIotCodes");
});
// }
// redisUtils.set("equipAndCarIotCodes", JSONObject.toJSONString(data));
// }
// });
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
//处理异常 返回 成功失败条数
//处理异常 返回 成功失败条数
...
@@ -528,7 +531,14 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
...
@@ -528,7 +531,14 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
return
date
;
return
date
;
}
}
String
[]
split
=
errBufferName
.
toString
().
split
(
","
);
String
[]
split
=
errBufferName
.
toString
().
split
(
","
);
String
date
=
"上传成功:"
+(
equipmentDetailDownloadVOS
.
size
()-(
split
!=
null
?
split
.
length
:
0
))+
"条---上传失败:"
+(
split
!=
null
?
split
.
length
:
0
)+
"条(失败编号:"
+
errBufferName
+
"详情:"
+
erryy
+
")"
;
String
date
=
""
;
if
(
split
!=
null
&&
split
.
length
>
0
&&!
""
.
equals
(
split
[
0
])){
date
=
"上传成功:"
+(
equipmentDetailDownloadVOS
.
size
()-(
split
!=
null
?
split
.
length
:
0
))+
"条---上传失败:"
+(
split
!=
null
?
split
.
length
:
0
)+
"条(失败编号:"
+
errBufferName
+
"详情:"
+
erryy
+
")"
;
}
else
{
date
=
"上传成功:"
+(
equipmentDetailDownloadVOS
.
size
())+
"条---上传失败:"
+
"0条(失败编号:"
+
errBufferName
+
"详情:"
+
erryy
+
")"
;
}
log
.
error
(
date
);
log
.
error
(
date
);
return
date
;
return
date
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/utils/RelationRedisUtil.java
View file @
069b2ebd
...
@@ -44,7 +44,9 @@ public class RelationRedisUtil {
...
@@ -44,7 +44,9 @@ public class RelationRedisUtil {
List
<
String
>
collect
=
list
.
stream
().
map
(
FireFightingSystemEntity:
:
getSystemTypeCode
).
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
list
.
stream
().
map
(
FireFightingSystemEntity:
:
getSystemTypeCode
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
collect
))
{
if
(
CollectionUtils
.
isNotEmpty
(
collect
))
{
for
(
String
key
:
collect
)
{
for
(
String
key
:
collect
)
{
redisUtil
.
del
(
key
);
if
(
key
!=
null
&&
redisUtil
.
hasKey
(
key
)){
redisUtil
.
del
(
key
);
}
}
}
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
...
...
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