Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
dff734d7
Commit
dff734d7
authored
Aug 28, 2021
by
季圣华
Browse files
解决租户会被误删的bug
parent
f46166a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/constants/ExceptionConstants.java
View file @
dff734d7
...
@@ -76,6 +76,9 @@ public class ExceptionConstants {
...
@@ -76,6 +76,9 @@ public class ExceptionConstants {
//演示用户不允许修改
//演示用户不允许修改
public
static
final
int
USER_LIMIT_UPDATE_CODE
=
500007
;
public
static
final
int
USER_LIMIT_UPDATE_CODE
=
500007
;
public
static
final
String
USER_LIMIT_UPDATE_MSG
=
"抱歉,演示模式下的演示用户不允许修改"
;
public
static
final
String
USER_LIMIT_UPDATE_MSG
=
"抱歉,演示模式下的演示用户不允许修改"
;
//租户不能被删除
public
static
final
int
USER_LIMIT_TENANT_DELETE_CODE
=
500008
;
public
static
final
String
USER_LIMIT_TENANT_DELETE_MSG
=
"抱歉,租户不能被删除"
;
/**
/**
* 角色信息
* 角色信息
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/user/UserService.java
View file @
dff734d7
...
@@ -263,6 +263,12 @@ public class UserService {
...
@@ -263,6 +263,12 @@ public class UserService {
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
USER_LIMIT_DELETE_CODE
,
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
USER_LIMIT_DELETE_CODE
,
ExceptionConstants
.
USER_LIMIT_DELETE_MSG
);
ExceptionConstants
.
USER_LIMIT_DELETE_MSG
);
}
}
if
(
user
.
getId
().
equals
(
user
.
getTenantId
()))
{
logger
.
error
(
"异常码[{}],异常提示[{}],参数,ids:[{}]"
,
ExceptionConstants
.
USER_LIMIT_TENANT_DELETE_CODE
,
ExceptionConstants
.
USER_LIMIT_TENANT_DELETE_MSG
,
ids
);
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
USER_LIMIT_TENANT_DELETE_CODE
,
ExceptionConstants
.
USER_LIMIT_TENANT_DELETE_MSG
);
}
sb
.
append
(
"["
).
append
(
user
.
getLoginName
()).
append
(
"]"
);
sb
.
append
(
"["
).
append
(
user
.
getLoginName
()).
append
(
"]"
);
}
}
logService
.
insertLog
(
"用户"
,
sb
.
toString
(),
logService
.
insertLog
(
"用户"
,
sb
.
toString
(),
...
...
Write
Preview
Supports
Markdown
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