Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
JingnengService
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王亚宁
JingnengService
Commits
596f3db6
Commit
596f3db6
authored
Dec 02, 2023
by
realize1020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新手机号接口
parent
dff23c4f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
com.gx.obe.service/src/main/java/com/gx/obe/server/management/user/controller/AuthUserController.java
...server/management/user/controller/AuthUserController.java
+6
-0
com.gx.obe.service/src/main/java/com/gx/obe/server/management/user/service/AuthUserService.java
...x/obe/server/management/user/service/AuthUserService.java
+3
-1
com.gx.obe.service/src/main/java/com/gx/obe/server/management/user/service/impl/AuthUserServiceImpl.java
...ver/management/user/service/impl/AuthUserServiceImpl.java
+20
-2
No files found.
com.gx.obe.service/src/main/java/com/gx/obe/server/management/user/controller/AuthUserController.java
View file @
596f3db6
...
...
@@ -381,4 +381,10 @@ public class AuthUserController extends BaseController<AuthUserService,AuthUser
}
@PostMapping
({
"/updatePhone"
})
public
String
updatePhone
(
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"oldPhone"
)
String
oldPhone
,
@RequestParam
(
"newPhone"
)
String
newPhone
)
{
return
this
.
authUserService
.
updatePhone
(
id
,
oldPhone
,
newPhone
);
}
}
\ No newline at end of file
com.gx.obe.service/src/main/java/com/gx/obe/server/management/user/service/AuthUserService.java
View file @
596f3db6
...
...
@@ -188,5 +188,7 @@ public interface AuthUserService extends IService<AuthUserEntity> {
* @return
*/
List
<
AuthUserEntity
>
getGroupItemUserList
(
String
id
);
String
updatePhone
(
String
id
,
String
oldPhone
,
String
newPhone
);
}
com.gx.obe.service/src/main/java/com/gx/obe/server/management/user/service/impl/AuthUserServiceImpl.java
View file @
596f3db6
...
...
@@ -2,6 +2,8 @@ package com.gx.obe.server.management.user.service.impl;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -250,4 +252,20 @@ public class AuthUserServiceImpl extends ServiceImpl<AuthUserMapper, AuthUserEnt
return
authUserMapper
.
getGroupItemUserList
(
id
);
}
}
@Override
public
String
updatePhone
(
String
id
,
String
oldPhone
,
String
newPhone
)
{
String
returnFlag
=
"{\n\"suc\":\"0\"\n}"
;
if
(
oldPhone
!=
null
&&
newPhone
!=
null
)
{
LambdaUpdateWrapper
<
AuthUserEntity
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
set
(
AuthUserEntity:
:
getPhone
,
newPhone
);
wrapper
.
set
(
AuthUserEntity:
:
getUserAccount
,
newPhone
);
wrapper
.
eq
(
AuthUserEntity:
:
getUserAccount
,
oldPhone
);
this
.
update
(
wrapper
);
//this.authUserMapper.updatePhone(id, oldPhone, newPhone);
returnFlag
=
"{\n\"suc\":\"1\"\n}"
;
}
return
returnFlag
;
}
}
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