Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
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
吴迪
gs1-office-web-sit
Commits
5a416e44
Commit
5a416e44
authored
Nov 27, 2022
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改成手机查询个人信息
parent
4cbb8355
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
MemberServiceImpl.java
...office/modules/manage/service/impl/MemberServiceImpl.java
+14
-9
No files found.
src/main/java/io/office/modules/manage/service/impl/MemberServiceImpl.java
View file @
5a416e44
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
io.office.common.exception.RRException
;
import
io.office.common.exception.RRException
;
import
io.office.common.utils.IPUtils
;
import
io.office.common.utils.IPUtils
;
import
io.office.modules.manage.dao.*
;
import
io.office.modules.manage.dao.*
;
...
@@ -25,10 +26,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -25,10 +26,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.service.MemberService
;
import
io.office.modules.manage.service.MemberService
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpSession
;
@Service
(
"memberService"
)
@Service
(
"memberService"
)
...
@@ -162,14 +161,20 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
...
@@ -162,14 +161,20 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
if
(!
newPass
.
equals
(
affirmPass
))
{
if
(!
newPass
.
equals
(
affirmPass
))
{
throw
new
RRException
(
"两次密码信息不一致,请重新输入"
);
throw
new
RRException
(
"两次密码信息不一致,请重新输入"
);
}
}
MemberEntity
memberEntity
=
memberDao
.
selectById
(
id
);
//根据手机号修改
String
passData
=
memberEntity
.
getPass
();
UpdateWrapper
<
MemberEntity
>
memberEntityUpdateWrapper
=
new
UpdateWrapper
<
MemberEntity
>();
String
passMD5
=
MD5Util
.
md5Encrypt32Lower
(
oldPass
);
memberEntityUpdateWrapper
.
eq
(
"phone"
,
id
);
if
(!
passMD5
.
equals
(
passData
))
{
MemberEntity
memberEntity
=
memberDao
.
selectOne
(
memberEntityUpdateWrapper
);
throw
new
RRException
(
"旧密码输入错误"
);
if
(
memberEntity
!=
null
)
{
String
passData
=
memberEntity
.
getPass
();
String
passMD5
=
MD5Util
.
md5Encrypt32Lower
(
oldPass
);
if
(!
passMD5
.
equals
(
passData
))
{
throw
new
RRException
(
"旧密码输入错误"
);
}
//修改密码
memberDao
.
updateByIdPassWord
(
Long
.
valueOf
(
id
),
MD5Util
.
md5Encrypt32Lower
(
newPass
));
}
}
//修改密码
memberDao
.
updateByIdPassWord
(
Long
.
valueOf
(
id
),
MD5Util
.
md5Encrypt32Lower
(
newPass
));
}
}
@Override
@Override
...
...
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