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
f6cf2a4b
Commit
f6cf2a4b
authored
Jul 05, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
d80016f9
33c46411
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
SysDictItemServiceImpl.java
...us.v1/yifu/admin/service/impl/SysDictItemServiceImpl.java
+17
-3
No files found.
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDictItemServiceImpl.java
View file @
f6cf2a4b
...
@@ -143,7 +143,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
...
@@ -143,7 +143,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
List
<
SysDictItem
>
allList
=
baseMapper
.
selectList
(
Wrappers
.<
SysDictItem
>
query
().
lambda
()
List
<
SysDictItem
>
allList
=
baseMapper
.
selectList
(
Wrappers
.<
SysDictItem
>
query
().
lambda
()
.
in
(
SysDictItem:
:
getType
,
type
)
.
in
(
SysDictItem:
:
getType
,
type
)
.
eq
(
SysDictItem:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
SysDictItem:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
));
extracted
(
allList
,
resultMap
);
extracted
Cache
(
allList
,
resultMap
);
}
}
/**
/**
...
@@ -245,7 +245,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
...
@@ -245,7 +245,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
}
}
log
.
info
(
"字典数据加入缓存初始化结束..."
);
log
.
info
(
"字典数据加入缓存初始化结束..."
);
}
}
private
void
extracted
(
List
<
SysDictItem
>
allList
,
Map
<
String
,
Object
>
resultMap
)
{
private
void
extracted
Cache
(
List
<
SysDictItem
>
allList
,
Map
<
String
,
Object
>
resultMap
)
{
if
(
Common
.
isNotNull
(
allList
)){
if
(
Common
.
isNotNull
(
allList
)){
if
(
Common
.
isEmpty
(
resultMap
)){
if
(
Common
.
isEmpty
(
resultMap
)){
resultMap
=
new
HashMap
<>();
resultMap
=
new
HashMap
<>();
...
@@ -255,7 +255,21 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
...
@@ -255,7 +255,21 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
}
}
}
}
}
}
private
void
extracted
(
List
<
SysDictItem
>
allList
,
Map
<
String
,
Object
>
resultMap
)
{
if
(
Common
.
isNotNull
(
allList
)){
for
(
SysDictItem
item
:
allList
)
{
String
dictCode
=
item
.
getType
();
if
(
resultMap
.
get
(
dictCode
)
==
null
)
{
Map
<
String
,
Object
>
dictMap
=
new
HashMap
<
String
,
Object
>();
dictMap
.
put
(
item
.
getValue
(),
item
.
getLabel
());
resultMap
.
put
(
dictCode
,
dictMap
);
}
else
{
Map
dictMap
=
(
Map
)
resultMap
.
get
(
dictCode
);
dictMap
.
put
(
item
.
getValue
(),
item
.
getLabel
());
}
}
}
}
@Override
@Override
public
R
<
Map
<
String
,
Map
<
String
,
String
>>>
getDictToLable
()
{
public
R
<
Map
<
String
,
Map
<
String
,
String
>>>
getDictToLable
()
{
Map
<
String
,
Map
<
String
,
String
>>
resultMap
=
this
.
getStringMapMap
(
false
);
Map
<
String
,
Map
<
String
,
String
>>
resultMap
=
this
.
getStringMapMap
(
false
);
...
...
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