Commit 78565854 authored by 吴琼's avatar 吴琼

修改手机号

parent f7bcd85a
......@@ -108,6 +108,13 @@ public class UserRest {
if (StringUtils.isEmpty(response)) {
return JsonResult.buildErrorStateResult(ErrorCodeEnum.RETURN_ERROR.getMessage(), ErrorCodeEnum.RETURN_ERROR.getCode());
}
//修改手机号,只有审核通过时调用
if(ModifyPhoneAuditStatus.PASS.equals(modifyPhoneAudit.getApplyStatus())){
String response2 = userService.deleteToken(modifyPhoneAudit);
if(StringUtils.isEmpty(response2)){
return JsonResult.buildErrorStateResult(ErrorCodeEnum.RETURN_ERROR.getMessage(), ErrorCodeEnum.RETURN_ERROR.getCode());
}
}
return GSON.fromJson(response, JsonResult.class);
}
......
......@@ -13,4 +13,5 @@ public class ModifyPhoneAudit {
private String applyStatusReason;
@NotNull(message = "id不能为空")
private String id;
private Long userId;
}
......@@ -19,6 +19,8 @@ public interface IUserService extends UserDetailsService {
String modifyPhoneAudit(ModifyPhoneAudit modifyPhoneAudit);
String deleteToken(ModifyPhoneAudit modifyPhoneAudit);
String modifyPhoneFeedback(ModifyPhoneFeedback modifyPhoneFeedback);
String findUuidByIdNo(String idNo);
......
......@@ -67,6 +67,9 @@ public class UserServiceImpl implements IUserService {
@Value("${mo-sidecar.http}")
private String sidecarUrl;
@Value("${kdsp.http}")
private String kdspUrl;
private final UserRepo userRepo;
......@@ -162,6 +165,22 @@ public class UserServiceImpl implements IUserService {
}
}
@Override
public String deleteToken(ModifyPhoneAudit modifyPhoneAudit) {
String url = kdspUrl + "/inner/kdsp/user/clearToken";
Map param = GSON.fromJson(GSON.toJson(modifyPhoneAudit), Map.class);
try {
Map<String, String> header = Maps.newHashMap();
header.put("Content-type", "application/json");
String result = httpService.post(url, header, param);
log.info("[user][query modify audit ] 请求业务系统返回值:{}", result);
return result;
} catch (Exception e) {
log.error("[user][query modify audit ] 网络通讯异常,modifyPhoneAudit:{},ex:{}", modifyPhoneAudit, ExceptionUtils.getStackTrace(e));
throw new BusinessException(ErrorCodeEnum.NET_ERROR);
}
}
@Override
public String modifyPhoneFeedback(ModifyPhoneFeedback modifyPhoneFeedback) {
String url = userSysUrl + "/v1/user/modify/phone_no/{id}/feedback";
......
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 to comment