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
afbef9f2
Commit
afbef9f2
authored
Jun 16, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增定时任务服务及配置
parent
b92e4d48
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
1 deletion
+27
-1
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+5
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+1
-0
DictController.java
...u.cloud.plus.v1/yifu/admin/controller/DictController.java
+19
-0
SysDictServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysDictServiceImpl.java
+2
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
afbef9f2
...
@@ -141,4 +141,9 @@ public interface ErrorCodes {
...
@@ -141,4 +141,9 @@ public interface ErrorCodes {
* 已存在对应名称的角色
* 已存在对应名称的角色
*/
*/
String
SYS_ROLE_UPDATE_ERROR_NAME_EXIST
=
"sys.role.update.error.name.exist"
;
String
SYS_ROLE_UPDATE_ERROR_NAME_EXIST
=
"sys.role.update.error.name.exist"
;
/**
* 已存在对应编码的字典
*/
String
SYS_DICT_ADD_TYPE_EXISTS
=
"sys.dict.add.type.exist"
;
}
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
afbef9f2
...
@@ -28,6 +28,7 @@ sys.app.phone.unregistered={0} \u624B\u673A\u53F7\u672A\u6CE8\u518C
...
@@ -28,6 +28,7 @@ sys.app.phone.unregistered={0} \u624B\u673A\u53F7\u672A\u6CE8\u518C
sys.dict.delete.system
=
\u
7CFB
\u
7EDF
\u5185\u
7F6E
\u
5B57
\u5178\u9879\u
76EE
\u
4E0D
\u
80FD
\u5220\u9664
sys.dict.delete.system
=
\u
7CFB
\u
7EDF
\u5185\u
7F6E
\u
5B57
\u5178\u9879\u
76EE
\u
4E0D
\u
80FD
\u5220\u9664
sys.dict.update.system
=
\u
7CFB
\u
7EDF
\u5185\u
7F6E
\u
5B57
\u5178\u9879\u
76EE
\u
4E0D
\u
80FD
\u
4FEE
\u6539
sys.dict.update.system
=
\u
7CFB
\u
7EDF
\u5185\u
7F6E
\u
5B57
\u5178\u9879\u
76EE
\u
4E0D
\u
80FD
\u
4FEE
\u6539
sys.dict.delete.existing
=
\u
5B57
\u5178\u
5B58
\u5728\u
4E0B
\u
7EA7
\u8282\u
70B9
\u
4E0D
\u
80FD
\u5220\u9664
sys.dict.delete.existing
=
\u
5B57
\u5178\u
5B58
\u5728\u
4E0B
\u
7EA7
\u8282\u
70B9
\u
4E0D
\u
80FD
\u5220\u9664
sys.dict.add.type.exist
=
\u
5DF2
\u
5B58
\u5728\u
5BF9
\u
5E94
\u
7F16
\u7801\u7684\u
5B57
\u5178
sys.role.delete.system
=
\u
7CFB
\u
7EDF
\u5185\u
7F6E
\u
89D2
\u8272\u
4E0D
\u
80FD
\u5220\u9664
sys.role.delete.system
=
\u
7CFB
\u
7EDF
\u5185\u
7F6E
\u
89D2
\u8272\u
4E0D
\u
80FD
\u5220\u9664
sys.role.update.system
=
\u
7CFB
\u
7EDF
\u5185\u
7F6E
\u
89D2
\u8272\u
4E0D
\u
80FD
\u
4FEE
\u6539
sys.role.update.system
=
\u
7CFB
\u
7EDF
\u5185\u
7F6E
\u
89D2
\u8272\u
4E0D
\u
80FD
\u
4FEE
\u6539
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/DictController.java
View file @
afbef9f2
...
@@ -26,6 +26,10 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRoleMenu;
...
@@ -26,6 +26,10 @@ 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.SysDictItemService
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysDictService
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysDictService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
@@ -101,6 +105,13 @@ public class DictController {
...
@@ -101,6 +105,13 @@ public class DictController {
@PostMapping
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('sys_dict_add')"
)
@PreAuthorize
(
"@pms.hasPermission('sys_dict_add')"
)
public
R
<
Boolean
>
save
(
@Valid
@RequestBody
SysDict
sysDict
)
{
public
R
<
Boolean
>
save
(
@Valid
@RequestBody
SysDict
sysDict
)
{
SysDict
dict
=
sysDictService
.
getOne
(
Wrappers
.<
SysDict
>
query
().
lambda
()
.
eq
(
SysDict:
:
getType
,
sysDict
.
getType
())
.
eq
(
SysDict:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
dict
)){
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
SYS_DICT_ADD_TYPE_EXISTS
));
}
return
R
.
ok
(
sysDictService
.
save
(
sysDict
));
return
R
.
ok
(
sysDictService
.
save
(
sysDict
));
}
}
...
@@ -126,6 +137,14 @@ public class DictController {
...
@@ -126,6 +137,14 @@ public class DictController {
@SysLog
(
"修改字典"
)
@SysLog
(
"修改字典"
)
@PreAuthorize
(
"@pms.hasPermission('sys_dict_edit')"
)
@PreAuthorize
(
"@pms.hasPermission('sys_dict_edit')"
)
public
R
updateById
(
@Valid
@RequestBody
SysDict
sysDict
)
{
public
R
updateById
(
@Valid
@RequestBody
SysDict
sysDict
)
{
SysDict
dict
=
sysDictService
.
getOne
(
Wrappers
.<
SysDict
>
query
().
lambda
()
.
eq
(
SysDict:
:
getType
,
sysDict
.
getType
())
.
ne
(
SysDict:
:
getId
,
sysDict
.
getId
())
.
eq
(
SysDict:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
dict
)){
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
SYS_DICT_ADD_TYPE_EXISTS
));
}
sysDictService
.
updateDict
(
sysDict
);
sysDictService
.
updateDict
(
sysDict
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDictServiceImpl.java
View file @
afbef9f2
...
@@ -30,6 +30,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
...
@@ -30,6 +30,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.enums.DictTypeEnum
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.enums.DictTypeEnum
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -114,7 +115,7 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
...
@@ -114,7 +115,7 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
if
(
StrUtil
.
isNotBlank
(
sysDict
.
getDescription
())){
if
(
StrUtil
.
isNotBlank
(
sysDict
.
getDescription
())){
wrapper
.
likeRight
(
SysDict:
:
getDescription
,
sysDict
.
getDescription
());
wrapper
.
likeRight
(
SysDict:
:
getDescription
,
sysDict
.
getDescription
());
}
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
wrapper
;
return
wrapper
;
}
}
}
}
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