Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
29820fe8
Commit
29820fe8
authored
Jul 04, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字典更新和新增 调整缓存
parent
9eea297f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
SysDictItemServiceImpl.java
...us.v1/yifu/admin/service/impl/SysDictItemServiceImpl.java
+8
-6
No files found.
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDictItemServiceImpl.java
View file @
29820fe8
...
@@ -99,10 +99,12 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
...
@@ -99,10 +99,12 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
// 系统内置
// 系统内置
Assert
.
state
(!
DictTypeEnum
.
SYSTEM
.
getType
().
equals
(
dict
.
getSystemFlag
()),
Assert
.
state
(!
DictTypeEnum
.
SYSTEM
.
getType
().
equals
(
dict
.
getSystemFlag
()),
MsgUtils
.
getMessage
(
ErrorCodes
.
SYS_DICT_UPDATE_SYSTEM
));
MsgUtils
.
getMessage
(
ErrorCodes
.
SYS_DICT_UPDATE_SYSTEM
));
if
(
this
.
updateById
(
item
)){
// 更新字典
// 更新字典
extractedRedis
(
item
);
extractedRedis
(
item
);
return
true
;
return
this
.
updateById
(
item
);
}
return
false
;
}
}
private
void
extractedRedis
(
SysDictItem
item
)
{
private
void
extractedRedis
(
SysDictItem
item
)
{
...
@@ -114,12 +116,12 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
...
@@ -114,12 +116,12 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
@CacheEvict
(
value
=
CacheConstants
.
DICT_DETAILS
,
allEntries
=
true
)
@CacheEvict
(
value
=
CacheConstants
.
DICT_DETAILS
,
allEntries
=
true
)
@Override
@Override
public
R
<
Boolean
>
saveDiy
(
SysDictItem
sysDictItem
)
{
public
R
<
Boolean
>
saveDiy
(
SysDictItem
sysDictItem
)
{
// 更新字典
extractedRedis
(
sysDictItem
);
int
res
=
baseMapper
.
insert
(
sysDictItem
);
int
res
=
baseMapper
.
insert
(
sysDictItem
);
if
(
res
<
0
){
if
(
res
<
0
){
return
R
.
failed
();
return
R
.
failed
();
}
}
// 更新字典
extractedRedis
(
sysDictItem
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
...
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