Commit d7f3057d authored by xiaozhe.chen's avatar xiaozhe.chen

客服系统对接中台接口,用户修改、修改密码、修改账户状态

parent def9c354
......@@ -136,10 +136,11 @@ public class UserRest {
* @return
*/
@PostMapping(value = "/modify/user_detail")
public JsonResult modifyUserDetail() {
return JsonResult.buildSuccessResult("success", null);
public JsonResult modifyUserDetail(@RequestParam(required = true) Long userId,
@RequestParam(required = true) String realName,
@RequestParam(required = true) String idNO) {
String response = userService.modifyUserDetail(userId, realName, idNO);
return GSON.fromJson(response, JsonResult.class);
}
/**
......
......@@ -56,4 +56,13 @@ public interface IUserService extends UserDetailsService {
*/
String modifyAccountStatusActive(Long userId);
/**
* 修改用户姓名、身份证
* @param userId
* @param realName
* @param idNO
* @return
*/
String modifyUserDetail(Long userId, String realName, String idNO);
}
......@@ -622,4 +622,23 @@ public class UserServiceImpl implements IUserService {
}
}
@Override
public String modifyUserDetail(Long userId, String realName, String idNO) {
String url = sidecarUrl + "/middle_office/middle_office/kefu/userDetail/reset";
try {
Map<String, String> header = Maps.newHashMap();
header.put("Content-type", "application/x-www-form-urlencoded");
Map param = Maps.newHashMap();
param.put("userId", userId);
param.put("realName", realName);
param.put("idNO", idNO);
String result = httpService.post(url, header, param);
log.info("[user][modifyUserDetail] 请求业务系统返回值:{}", result);
return result;
} catch (Exception e) {
log.error("[user][modifyUserDetail] 网络通讯异常,userId:{},ex:{}", userId, ExceptionUtils.getStackTrace(e));
throw new BusinessException(ErrorCodeEnum.NET_ERROR);
}
}
}
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