Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
liyeyun-user-web
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
cfld-backend
liyeyun-user-web
Commits
dee76380
Commit
dee76380
authored
Nov 24, 2023
by
yaobaizheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户服务个人中心信息返回
parent
b03cdeb3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
SysUserController.java
...om/lyy/user/moudle/user/controller/SysUserController.java
+13
-0
SysUserInfoService.java
.../com/lyy/user/moudle/user/service/SysUserInfoService.java
+10
-0
SysUserInfoServiceImpl.java
...user/moudle/user/service/impl/SysUserInfoServiceImpl.java
+8
-0
No files found.
src/main/java/com/lyy/user/moudle/user/controller/SysUserController.java
View file @
dee76380
...
@@ -54,4 +54,17 @@ public class SysUserController {
...
@@ -54,4 +54,17 @@ public class SysUserController {
public
boolean
update
(
@RequestBody
@Validated
ForgetVo
forgetVo
)
{
public
boolean
update
(
@RequestBody
@Validated
ForgetVo
forgetVo
)
{
return
this
.
sysUserInfoService
.
forget
(
forgetVo
,
SendMsgTypeEnum
.
UPDATE_PASSWORD
.
getCode
());
return
this
.
sysUserInfoService
.
forget
(
forgetVo
,
SendMsgTypeEnum
.
UPDATE_PASSWORD
.
getCode
());
}
}
/**
* @description: 获取用户信息
* @date: 2023/11/23 10:21
* @param: [token]
* @return: String
**/
@PostMapping
(
"/get"
)
@ApiOperation
(
value
=
"获取用户信息"
)
public
String
get
(
HttpServletRequest
request
)
{
return
this
.
sysUserInfoService
.
get
(
request
.
getHeader
(
Constants
.
TOKEN_HEADER
));
}
}
}
src/main/java/com/lyy/user/moudle/user/service/SysUserInfoService.java
View file @
dee76380
...
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.lyy.user.moudle.user.entity.SysUserInfo
;
import
com.lyy.user.moudle.user.entity.SysUserInfo
;
import
com.lyy.user.moudle.user.vo.*
;
import
com.lyy.user.moudle.user.vo.*
;
import
javax.servlet.http.HttpServletRequest
;
/**
/**
* @author 26996
* @author 26996
* @description 针对表【sys_user_info(用户信息表)】的数据库操作Service
* @description 针对表【sys_user_info(用户信息表)】的数据库操作Service
...
@@ -57,4 +59,12 @@ public interface SysUserInfoService extends IService<SysUserInfo> {
...
@@ -57,4 +59,12 @@ public interface SysUserInfoService extends IService<SysUserInfo> {
* @return: boolean
* @return: boolean
**/
**/
boolean
forget
(
ForgetVo
forgetVo
,
Integer
code
);
boolean
forget
(
ForgetVo
forgetVo
,
Integer
code
);
/**
* @description: 获取用户信息
* @date: 2023/11/23 10:21
* @param: [token]
* @return: String
**/
String
get
(
String
token
);
}
}
src/main/java/com/lyy/user/moudle/user/service/impl/SysUserInfoServiceImpl.java
View file @
dee76380
...
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.lyy.user.config.LyyConfig
;
import
com.lyy.user.config.LyyConfig
;
import
com.lyy.user.config.exception.ServiceException
;
import
com.lyy.user.config.exception.ServiceException
;
import
com.lyy.user.constant.Constants
;
import
com.lyy.user.constant.Constants
;
import
com.lyy.user.domain.JwtInfo
;
import
com.lyy.user.enums.SendMsgTypeEnum
;
import
com.lyy.user.enums.SendMsgTypeEnum
;
import
com.lyy.user.moudle.login.vo.SmsVo
;
import
com.lyy.user.moudle.login.vo.SmsVo
;
import
com.lyy.user.moudle.smslog.entity.SysSmsLogEntity
;
import
com.lyy.user.moudle.smslog.entity.SysSmsLogEntity
;
...
@@ -36,6 +37,7 @@ import org.springframework.util.ObjectUtils;
...
@@ -36,6 +37,7 @@ import org.springframework.util.ObjectUtils;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
/**
/**
...
@@ -270,6 +272,12 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
...
@@ -270,6 +272,12 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
return
this
.
updateById
(
sysUserInfo
);
return
this
.
updateById
(
sysUserInfo
);
}
}
@Override
public
String
get
(
String
token
)
{
JwtInfo
jwtUser
=
JwtTokenUtil
.
getJwtUser
(
token
);
return
StringUtils
.
overlay
(
jwtUser
.
getPhone
(),
"****"
,
3
,
7
);
}
private
void
check
(
String
phone
)
{
private
void
check
(
String
phone
)
{
if
(
StringUtils
.
isEmpty
(
phone
))
{
if
(
StringUtils
.
isEmpty
(
phone
))
{
throw
new
ServiceException
(
"手机号不能为空"
);
throw
new
ServiceException
(
"手机号不能为空"
);
...
...
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