Commit 901ea9ad by chongli

重置账户绑定的微信信息

parent 71a2047c
......@@ -553,6 +553,19 @@ public class UserMController {
mp.put("code", 0);
return mp;
}
/**
* 重置当前账户绑定的微信信息
*
* @param registerBean
* @return
*/
@ResponseBody
@RequestMapping(value = "/v1/users/resetMiniOpenid", method = RequestMethod.POST)
@Security(index = 1, field = "token")
public Object resetMiniOpenid(@RequestBody ChangePasswordBean changePasswordBean) {
return userMService.resetMiniOpenid(changePasswordBean);
}
/**
* 用户详情
......
......@@ -446,6 +446,24 @@ public class UserMService extends BaseService {
}
}
public Response<String> resetMiniOpenid(ChangePasswordBean changePasswordBean) {
Request<ChangePasswordBean> request = new Request<ChangePasswordBean>("",
changePasswordBean);
HttpEntity<Request<ChangePasswordBean>> entity = new HttpEntity<Request<ChangePasswordBean>>(
request);
Response<String> response = super.exchange(this.getServiceUri("uri.user.resetMiniOpenid"),
HttpMethod.POST, entity, new ParameterizedTypeReference<Response<String>>() {
}).getBody();
if (response.getStatus() == 0) {
return response;
} else {
logger.error("[list] status:{}, msg: {}", response.getStatus(), response.getMessage());
throw new RestException(500, response.getMessage());
}
}
/*
* 保存被推荐码(0--成功 -1:推荐码不存在 -2:当前用户信息不全 -3:保存推荐码失败 -4:不能使用自己的推荐码 -5:当前用户已使用过推荐码)
......
......@@ -84,6 +84,7 @@ uri.user.changeUserInfo=/fun-golf-service/user/changeUserInfo
uri.user.sendResetPwdVerifyCode=/fun-golf-service/user/sendResetPwdVerifyCode
uri.user.validateResetPwdCode=/fun-golf-service/user/validateResetPwdCode
uri.user.resetPassord=/fun-golf-service/user/resetPassord
uri.user.resetMiniOpenid=/fun-golf-service/user/resetMiniOpenid
uri.user.sendDynamicPassword=/fun-golf-service/user/sendDynamicPassword
uri.user.loginByDynamicPassword=/fun-golf-service/user/loginByDynamicPassword
uri.user.validateWeChatUser=/fun-golf-service/user/validateWeChatUser
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment