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
2282a6e9
Commit
2282a6e9
authored
Aug 10, 2021
by
李腾威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日常管理-redis key值修改
parent
fc890e47
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
RedisKey.java
...java/com/yeejoin/amos/boot/biz/common/utils/RedisKey.java
+2
-0
ESAlertCalled.java
...eejoin/amos/boot/module/tzs/api/entity/ESAlertCalled.java
+1
-1
AlertCalledServiceImpl.java
...t/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
+6
-6
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/RedisKey.java
View file @
2282a6e9
...
...
@@ -26,6 +26,8 @@ public class RedisKey {
public
static
final
String
THOUGHT_ID
=
"thought_id_"
;
/**根据警情id查询警情详情记录*/
public
static
final
String
ALERTCALLED_ID
=
"alertcalled_id_"
;
/**特种设备根据警情id查询警情详情记录*/
public
static
final
String
TZS_ALERTCALLED_ID
=
"tzs_alertcalled_id_"
;
/** 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)}) */
public
static
String
humpToLine
(
String
str
)
{
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/ESAlertCalled.java
View file @
2282a6e9
...
...
@@ -21,7 +21,7 @@ import java.util.Date;
*/
@Data
@Accessors
(
chain
=
true
)
@Document
(
indexName
=
"tzs"
,
type
=
"
a
lertCalled"
,
shards
=
1
,
replicas
=
0
)
@Document
(
indexName
=
"tzs"
,
type
=
"
tzsA
lertCalled"
,
shards
=
1
,
replicas
=
0
)
public
class
ESAlertCalled
{
/** 主键 */
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
View file @
2282a6e9
...
...
@@ -76,10 +76,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Override
public
Object
selectAlertCalledById
(
Long
id
)
{
/* if(redisUtils.hasKey(RedisKey.
ALERTCALLED_ID+id)){
Object obj= redisUtils.get(RedisKey.ALERTCALLED_ID+id);
return
JSON.toJavaObject((JSON) obj,AlertCalledFormDto.class)
;
}else{
*/
if
(
redisUtils
.
hasKey
(
RedisKey
.
TZS_
ALERTCALLED_ID
+
id
)){
Object
obj
=
redisUtils
.
get
(
RedisKey
.
TZS_
ALERTCALLED_ID
+
id
);
return
obj
;
}
else
{
// 警情基本信息
AlertCalled
alertCalled
=
this
.
getById
(
id
);
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
...
...
@@ -111,9 +111,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
AlertCalledFormDto
alertCalledFormVo
=
new
AlertCalledFormDto
(
alertCalledVo
,
formValue
);
//redisUtils.set(RedisKey.
ALERTCALLED_ID+id, JSON.toJSON(alertCalledFormVo),time);
redisUtils
.
set
(
RedisKey
.
TZS_
ALERTCALLED_ID
+
id
,
JSON
.
toJSON
(
alertCalledFormVo
),
time
);
return
alertCalledFormVo
;
//
}
}
}
...
...
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