Commit dae80c4a authored by 吴琼's avatar 吴琼

修改调用用户中心参数

parent 4293ad11
......@@ -835,32 +835,27 @@ public class UserServiceImpl implements IUserService {
*/
@Override
public JsonResult deleteAccount(Long userId) {
//调用kdsp接口
Map<String, String> header = Maps.newHashMap();
header.put("Content-type", "application/x-www-form-urlencoded");
header.put("qg-tenant-id", "560761");
String kdspUrl = kdspOperationUrl + "/api/kdsp/customer/logged-off";
Map param = Maps.newHashMap();
param.put("userId", userId.toString());
String result = httpService.post(kdspUrl, header, param);
JSONObject jsonObject = JSONObject.parseObject(result);;
String businessCode = jsonObject.getString("businessCode");
if(!"0000".equals(businessCode)){
return JsonResult.buildErrorStateResult(jsonObject.getString("msg"),jsonObject.get("data"));
}
//删除用户相关信息
String userUrl = userSysUrl + "/innerapi/user/delete/"+userId;
String userResult = httpService.get(userUrl, header);
if(userResult!=null){
JSONObject userJsonObject = JSONObject.parseObject(userResult);;
String userBusinessCode = jsonObject.getString("businessCode");
if("0000".equals(userBusinessCode)){
return JsonResult.buildSuccessResult(userJsonObject.getString("msg"),jsonObject.get("data"));
try{
//调用kdsp接口
Map<String, String> header = Maps.newHashMap();
header.put("Content-type", "application/x-www-form-urlencoded");
header.put("qg-tenant-id", "560761");
String kdsp = kdspUrl + "/api/kdsp/user/customer/logged-off";
Map param = Maps.newHashMap();
param.put("userId", userId.toString());
param.put("tenantId", "560761");
String result = httpService.post(kdsp, header, param);
JSONObject jsonObject = JSONObject.parseObject(result);;
String businessCode = jsonObject.getString("businessCode");
if(!"0000".equals(businessCode)){
return JsonResult.buildErrorStateResult(jsonObject.getString("msg"),jsonObject.get("data"));
}else{
return JsonResult.buildErrorStateResult(userJsonObject.getString("msg"),jsonObject.get("data"));
return JsonResult.buildSuccessResult("注销成功",null);
}
}catch (Exception e) {
log.error("[user][modifyAccountStatusDisableNew] 网络通讯异常,userId:{},ex:{}", userId, ExceptionUtils.getStackTrace(e));
throw new BusinessException(ErrorCodeEnum.NET_ERROR);
}
return JsonResult.buildSuccessResult("",null);
}
@Override
......@@ -890,7 +885,7 @@ public class UserServiceImpl implements IUserService {
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("userId", userId.toString());
String userUrl = userSysUrl + "/innerapi/user/active";
String userResult = httpService.post(userUrl, header, param);
JSONObject userJsonObject = null;
......
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