Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sup-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
Administrator
sup-server
Commits
68a10ac9
Commit
68a10ac9
authored
Nov 11, 2022
by
tyn
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.105.106.177:66/root/sup-server
parents
9f4ff485
bc3be17e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
653 additions
and
525 deletions
+653
-525
login.vue
dsk-srm-server/src/login.vue
+646
-524
UserController.java
...java/com/supServer/project/controller/UserController.java
+6
-0
UserInfoServiceImpl.java
...m/supServer/project/service/impl/UserInfoServiceImpl.java
+1
-1
No files found.
dsk-srm-server/src/login.vue
View file @
68a10ac9
This diff is collapsed.
Click to expand it.
src/main/java/com/supServer/project/controller/UserController.java
View file @
68a10ac9
...
...
@@ -12,11 +12,13 @@ import com.supServer.framework.web.domain.AjaxResult;
import
com.supServer.project.entity.UserInfo
;
import
com.supServer.project.entity.vo.ForgotPasswordVo
;
import
com.supServer.project.entity.vo.UserResetPwdVo
;
import
com.supServer.project.mapper.UserInfoMapper
;
import
com.supServer.project.service.SmsService
;
import
com.supServer.project.service.UserInfoService
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.crypto.bcrypt.BCrypt
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -63,6 +65,10 @@ public class UserController {
if
(
userInfo
.
getAccountStatus
().
equals
(
"3"
)){
return
AjaxResult
.
error
(
"当前账号已注销"
);
}
String
oldPassword
=
BCrypt
.
hashpw
(
loginBody
.
getPassword
(),
userInfo
.
getPassword
());
if
(!
oldPassword
.
equals
(
userInfo
.
getPassword
()))
{
return
AjaxResult
.
error
(
"密码错误"
);
}
//AesUtil.decode(loginBody.getUserName()),AesUtil.decode(loginBody.getPassword()),loginBody.getCode(),loginBody.getUuid(),loginBody.getType()
String
token
=
userLoginService
.
login
(
loginBody
.
getUserName
(),
loginBody
.
getPassword
(),
loginBody
.
getCode
(),
loginBody
.
getUuid
());
AjaxResult
ajax
=
AjaxResult
.
success
();
...
...
src/main/java/com/supServer/project/service/impl/UserInfoServiceImpl.java
View file @
68a10ac9
...
...
@@ -112,7 +112,7 @@ public class UserInfoServiceImpl implements UserInfoService {
LoginUser
loginUser
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
());
UserInfo
userInfoToken
=
loginUser
.
getUser
();
// 查询最新的数据
UserInfo
userInfo
=
userInfoMapper
.
selectUserByUserName
(
userInfoToken
.
get
UserNam
e
());
UserInfo
userInfo
=
userInfoMapper
.
selectUserByUserName
(
userInfoToken
.
get
Phon
e
());
// 原密码
String
oldPassword
=
BCrypt
.
hashpw
(
userInfoVo
.
getOldPassword
(),
userInfo
.
getPassword
());
if
(!
oldPassword
.
equals
(
userInfo
.
getPassword
()))
{
...
...
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