Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
relation
Commits
cf7031d5
"git@gitlab.ruzhoukj.com:wangcaixuan/rz-gb-web.git" did not exist on "f402273d24269af16cc715e29259fd63f5db604e"
Commit
cf7031d5
authored
Aug 03, 2025
by
wujipeng
Browse files
删除用户
parent
6972b544
Changes
3
Show whitespace changes
Inline
Side-by-side
src/main/java/com/platform/controller/UserController.java
View file @
cf7031d5
...
...
@@ -51,8 +51,8 @@ public class UserController extends BaseController {
}
@ApiModelProperty
(
value
=
"删除用户"
)
@DeleteMapping
(
"/{id}"
)
public
Result
delete
(
@
PathVariable
String
id
)
{
return
Result
.
data
(
userService
.
delete
(
id
));
@DeleteMapping
()
public
Result
delete
(
@
RequestParam
(
name
=
"userName"
)
String
userName
)
{
return
Result
.
data
(
userService
.
delete
(
userName
));
}
}
src/main/java/com/platform/service/UserService.java
View file @
cf7031d5
...
...
@@ -30,5 +30,5 @@ public interface UserService extends IService<UserEntity> {
EveryoneVO
relationPage
(
UserDTO
userDTO
);
Boolean
delete
(
String
id
);
Boolean
delete
(
String
userName
);
}
src/main/java/com/platform/service/impl/UserServiceImpl.java
View file @
cf7031d5
...
...
@@ -203,9 +203,13 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
}
@Override
public
Boolean
delete
(
String
id
)
{
UserEntity
user
=
getById
(
id
);
excelDataService
.
remove
(
new
LambdaQueryWrapper
<
ExcelDataEntity
>().
eq
(
ExcelDataEntity:
:
getPayUserName
,
user
.
getUserName
()));
return
removeById
(
id
);
@Transactional
public
Boolean
delete
(
String
userName
)
{
excelDataService
.
remove
(
new
LambdaQueryWrapper
<
ExcelDataEntity
>().
eq
(
ExcelDataEntity:
:
getPayUserName
,
userName
));
//删除关系
userRelationService
.
remove
(
new
LambdaQueryWrapper
<
UserRelationEntity
>().
eq
(
UserRelationEntity:
:
getUserName
,
userName
));
userRelationService
.
remove
(
new
LambdaQueryWrapper
<
UserRelationEntity
>().
eq
(
UserRelationEntity:
:
getOtherName
,
userName
));
return
remove
(
new
LambdaQueryWrapper
<
UserEntity
>().
eq
(
UserEntity:
:
getUserName
,
userName
));
}
}
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