This commit is contained in:
wangjinlei
2023-12-29 17:52:48 +08:00
parent 43ce513550
commit 2cf70e4f6a

View File

@@ -242,15 +242,13 @@ public class MyUserController {
/** /**
* 绑定用户电话号 * 绑定用户电话号
* @param phone
* @param code
* @param id
* @return * @return
*/ */
@RequestMapping("/updateUserTel") @RequestMapping("/updateUserTel")
public R updateUserTel(@RequestParam("phone") String phone, public R updateUserTel(@RequestBody Map<String,Object> map){
@RequestParam("code") String code, String phone = map.get("phone").toString();
@RequestParam("id") int id){ String code = map.get("code").toString();
Integer id = Integer.valueOf(map.get("id").toString());
String redisCode = redisTemplate.opsForValue().get("RegistCode"+phone); String redisCode = redisTemplate.opsForValue().get("RegistCode"+phone);
if(StringUtils.isEmpty(redisCode)){ if(StringUtils.isEmpty(redisCode)){
return R.error("验证码已过期,请重试"); return R.error("验证码已过期,请重试");
@@ -267,15 +265,13 @@ public class MyUserController {
/** /**
* 绑定用户邮件 * 绑定用户邮件
* @param email
* @param code
* @param id
* @return * @return
*/ */
@RequestMapping("/updateUserEmail") @RequestMapping("/updateUserEmail")
public R updateUserEmail(@RequestParam("email") String email, public R updateUserEmail(@RequestBody Map<String,Object> map){
@RequestParam("code") String code, String email = map.get("email").toString();
@RequestParam("id") int id){ String code = map.get("code").toString();
Integer id = Integer.valueOf(map.get("id").toString());
String redisCode = redisTemplate.opsForValue().get("RegistCode"+email); String redisCode = redisTemplate.opsForValue().get("RegistCode"+email);
if(StringUtils.isEmpty(redisCode)){ if(StringUtils.isEmpty(redisCode)){
return R.error("验证码已过期,请重试"); return R.error("验证码已过期,请重试");