Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
antai-sport-http-server
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
antai-sport
antai-sport-http-server
Commits
61e9dfbf
Commit
61e9dfbf
authored
Sep 19, 2022
by
liming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户个人信息注销接口
parent
9e8e233e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
SportUserController.java
...ver/api/business/user/controller/SportUserController.java
+7
-0
SportUserService.java
...er/server/api/business/user/service/SportUserService.java
+11
-0
No files found.
server-api/src/main/java/com/antai/sport/http/server/server/api/business/user/controller/SportUserController.java
View file @
61e9dfbf
...
...
@@ -112,4 +112,11 @@ public class SportUserController {
public
ResponseEntity
<
Result
<
HomePopupVO
>>
getPopup
(
@PathVariable
(
"sportUserId"
)
Long
sportUserId
)
{
return
success
(
sportUserService
.
getPopup
(
sportUserId
));
}
@ApiOperation
(
"账户注销"
)
@GetMapping
(
"delete/{sportUserId}"
)
public
ResponseEntity
<
Result
>
delete
(
@PathVariable
(
"sportUserId"
)
Long
sportUserId
){
sportUserService
.
delete
(
sportUserId
);
return
success
();
}
}
server-api/src/main/java/com/antai/sport/http/server/server/api/business/user/service/SportUserService.java
View file @
61e9dfbf
...
...
@@ -13,7 +13,9 @@ import com.antai.sport.http.server.server.api.business.user.dto.NewMessageVO;
import
com.antai.sport.http.server.server.api.business.user.dto.RespUserHomeInfo
;
import
com.antai.sport.http.server.server.api.business.user.mapper.SportUserSummaryBusinessMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
...
...
@@ -39,6 +41,9 @@ public class SportUserService {
@Resource
private
AchievementService
achievementService
;
@Resource
private
RedisTemplate
<
String
,
Object
>
redisTemplate
;
public
RespUserHomeInfo
getUserHomeInfo
(
Long
userId
)
{
RespUserHomeInfo
resp
=
new
RespUserHomeInfo
();
SportUser
sportUser
=
sportUserMapper
.
selectById
(
userId
);
...
...
@@ -149,4 +154,10 @@ public class SportUserService {
return
result
;
}
public
void
delete
(
@PathVariable
(
"sportUserId"
)
Long
sportUserId
)
{
SportUser
sportUser
=
sportUserMapper
.
selectById
(
sportUserId
);
redisTemplate
.
delete
(
"sport_user::"
+
sportUser
.
getPhone
());
sportUserMapper
.
deleteById
(
sportUserId
);
}
}
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