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

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

parent 202114c6
......@@ -154,7 +154,7 @@ public class UserRest {
}
/**
* 修改用户账户状态(注销/恢复)
* 修改用户账户状态(注销)
*
* @return
*/
......@@ -164,6 +164,16 @@ public class UserRest {
return GSON.fromJson(response, JsonResult.class);
}
/**
* 修改用户账户状态(激活)
*
* @return
*/
@PostMapping(value = "/modify/account/status/active")
public JsonResult modifyAccountStatusActive(@RequestParam(required = true) Long userId) {
String response = userService.modifyAccountStatusActive(userId);
return GSON.fromJson(response, JsonResult.class);
}
}
......@@ -49,4 +49,11 @@ public interface IUserService extends UserDetailsService {
*/
String modifyAccountStatusDisable(Long userId);
/**
* 激活账户
* @param userId
* @return
*/
String modifyAccountStatusActive(Long userId);
}
......@@ -605,4 +605,21 @@ public class UserServiceImpl implements IUserService {
}
}
@Override
public String modifyAccountStatusActive(Long userId) {
String url = sidecarUrl + "/middle_office/middle_office/kefu/user/active";
try {
Map<String, String> header = Maps.newHashMap();
header.put("Content-type", "application/x-www-form-urlencoded");
Map param = Maps.newHashMap();
param.put("userId", userId);
String result = httpService.post(url, header, param);
log.info("[user][modifyAccountStatusActive] 请求业务系统返回值:{}", result);
return result;
} catch (Exception e) {
log.error("[user][modifyAccountStatusActive] 网络通讯异常,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