Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-user
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-user
Commits
83d9e1bf
Commit
83d9e1bf
authored
Oct 13, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redis缓存->根据字典类型和字典名称获取字典值
parent
dc6f241b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
yd-user-feign/src/main/java/com/yd/user/feign/response/sysdict/GetDictItemListByDictTypeResponse.java
+22
-0
No files found.
yd-user-feign/src/main/java/com/yd/user/feign/response/sysdict/GetDictItemListByDictTypeResponse.java
View file @
83d9e1bf
...
...
@@ -81,4 +81,26 @@ public class GetDictItemListByDictTypeResponse implements Serializable {
}
return
itemLabel
;
}
/**
* 根据字典类型和字典名称获取字典值
* @param list
* @param dictType
* @param itemLabel
* @return
*/
public
static
String
getItemValue
(
List
<
GetDictItemListByDictTypeResponse
>
list
,
String
dictType
,
String
itemLabel
)
{
String
itemValue
=
""
;
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
List
<
GetDictItemListByDictTypeResponse
>
singeList
=
list
.
stream
()
.
filter
(
item
->
item
.
getDictType
().
equals
(
dictType
)
&&
item
.
getItemLabel
().
equals
(
itemLabel
))
.
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
singeList
))
{
GetDictItemListByDictTypeResponse
typeResponse
=
singeList
.
get
(
0
);
itemValue
=
typeResponse
.
getItemValue
();
}
}
return
itemValue
;
}
}
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