后台修改用户电话或邮箱接口

This commit is contained in:
wangjinlei
2024-01-29 14:52:59 +08:00
parent 3f46c1f562
commit be8303fc2c
3 changed files with 13 additions and 0 deletions

View File

@@ -126,6 +126,10 @@ public class MyUserController {
*/
@RequestMapping("/update")
public R update(@RequestBody MyUserEntity user){
boolean b = userService.checkUserTelOrEmail(user);
if(!b){
return R.error("电话或邮箱已存在");
}
userService.updateById(user);
return R.ok();
}