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
e0dbda54
Commit
e0dbda54
authored
Jun 14, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
0a753235
ed9bb0b2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
DictTypeEnum.java
...plus.v1/yifu/common/core/constant/enums/DictTypeEnum.java
+2
-2
SysDict.java
...com/yifu.cloud.plus.v1/yifu/admin/api/entity/SysDict.java
+10
-0
DictController.java
...u.cloud.plus.v1/yifu/admin/controller/DictController.java
+7
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/enums/DictTypeEnum.java
View file @
e0dbda54
...
...
@@ -32,12 +32,12 @@ public enum DictTypeEnum {
/**
* 字典类型-系统内置(不可修改)
*/
SYSTEM
(
"
1
"
,
"系统内置"
),
SYSTEM
(
"
0
"
,
"系统内置"
),
/**
* 字典类型-业务类型
*/
BIZ
(
"
0
"
,
"业务类"
);
BIZ
(
"
1
"
,
"业务类"
);
/**
* 类型
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/entity/SysDict.java
View file @
e0dbda54
...
...
@@ -16,6 +16,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
...
...
@@ -23,6 +24,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.List
;
/**
* 字典表
*
...
...
@@ -80,4 +83,11 @@ public class SysDict extends BaseEntity {
*/
@Schema
(
description
=
"联动上级类型"
)
private
String
parentItemType
;
/**
* 上级字典名称
*/
@TableField
(
exist
=
false
)
private
String
parentItemName
;
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/DictController.java
View file @
e0dbda54
...
...
@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDict
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDictItem
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRoleMenu
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysDictItemService
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysDictService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
...
...
@@ -62,7 +63,12 @@ public class DictController {
*/
@GetMapping
(
"/{id:\\d+}"
)
public
R
<
SysDict
>
getById
(
@PathVariable
Long
id
)
{
return
R
.
ok
(
sysDictService
.
getById
(
id
));
SysDict
sysDict
=
sysDictService
.
getById
(
id
);
SysDict
sysDict1
=
sysDictService
.
getOne
(
Wrappers
.<
SysDict
>
query
().
lambda
().
eq
(
SysDict:
:
getType
,
sysDict
.
getParentItemType
()));
if
(
null
!=
sysDict1
)
{
sysDict
.
setParentItemName
(
sysDict1
.
getDescription
());
}
return
R
.
ok
(
sysDict
);
}
/**
...
...
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