Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
elearn
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
hqzhdj
elearn
Commits
5bec813d
Commit
5bec813d
authored
Jan 16, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录添加埋点
parent
254a7b58
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
cloud-system-api/src/main/java/com/yizhi/system/application/feign/DictionaryFeignClients.java
+2
-2
cloud-system/src/main/java/com/yizhi/system/application/controller/remote/DictionaryController.java
+30
-0
No files found.
cloud-system-api/src/main/java/com/yizhi/system/application/feign/DictionaryFeignClients.java
View file @
5bec813d
...
...
@@ -20,8 +20,8 @@ public interface DictionaryFeignClients {
@GetMapping
(
value
=
"/dictionary/insertBySearchName"
)
boolean
insertBySearchName
(
@RequestParam
(
"searchName"
)
String
searchName
);
@GetMapping
(
value
=
"/dictionary/child/listByCode"
)
Response
<
List
<
Dictionary
>
>
listChildDictionary
(
@RequestParam
(
name
=
"code"
,
defaultValue
=
"0"
)
String
code
,
@GetMapping
(
value
=
"/dictionary/child/listByCode
1
"
)
List
<
Dictionary
>
listChildDictionary
(
@RequestParam
(
name
=
"code"
,
defaultValue
=
"0"
)
String
code
,
@RequestParam
(
name
=
"includeParent"
,
defaultValue
=
"false"
)
Boolean
includeParent
,
@RequestParam
(
name
=
"layer"
,
defaultValue
=
"1"
)
Integer
layer
);
}
cloud-system/src/main/java/com/yizhi/system/application/controller/remote/DictionaryController.java
View file @
5bec813d
...
...
@@ -366,6 +366,36 @@ public class DictionaryController {
}
/**
* 查询当前数据字典下的子节点
*
* @param code 要查找的对象的父节点
* @param includeParent 是否包含父节点(id对应的自身节点),true:包含,false:不包含,默认false
* @param layer 以id对应对象为第0层,查询多少层子节点,默认1层
* @return
*/
@ApiOperation
(
value
=
"数据字典"
,
notes
=
"通过父类code查询当前数据字典下的子节点"
,
response
=
Response
.
class
)
@GetMapping
(
value
=
"/child/listByCode1"
)
public
List
<
Dictionary
>
listChildDictionary1
(
@ApiParam
(
"要查找的对象的父节点"
)
@RequestParam
(
name
=
"code"
,
defaultValue
=
"0"
)
String
code
,
@ApiParam
(
"是否包含父节点(id对应的自身节点),</br>true:包含,</br>false:不包含,默认false"
)
@RequestParam
(
name
=
"includeParent"
,
defaultValue
=
"false"
)
Boolean
includeParent
,
@ApiParam
(
"以id对应对象为第0层,查询多少层子节点,默认1层"
)
@RequestParam
(
name
=
"layer"
,
defaultValue
=
"1"
)
Integer
layer
)
{
try
{
com
.
yizhi
.
system
.
application
.
domain
.
Dictionary
dictionary
=
dictionaryService
.
findByCode
(
code
);
if
(
dictionary
==
null
){
return
Lists
.
newArrayList
();
}
List
<
com
.
yizhi
.
system
.
application
.
domain
.
Dictionary
>
result
=
dictionaryService
.
listChildren
(
dictionary
.
getId
(),
includeParent
,
layer
);
List
<
Dictionary
>
list
=
domainConverter
.
toDOList
(
result
,
Dictionary
.
class
);
return
list
;
}
catch
(
Exception
e
)
{
LOG
.
error
(
""
,
e
);
return
Lists
.
newArrayList
();
}
}
/**
* 检查该字典下是否有子数据
*
...
...
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