Commit dae80c4a authored by 吴琼's avatar 吴琼

修改调用用户中心参数

parent 4293ad11
...@@ -835,32 +835,27 @@ public class UserServiceImpl implements IUserService { ...@@ -835,32 +835,27 @@ public class UserServiceImpl implements IUserService {
*/ */
@Override @Override
public JsonResult deleteAccount(Long userId) { public JsonResult deleteAccount(Long userId) {
//调用kdsp接口 try{
Map<String, String> header = Maps.newHashMap(); //调用kdsp接口
header.put("Content-type", "application/x-www-form-urlencoded"); Map<String, String> header = Maps.newHashMap();
header.put("qg-tenant-id", "560761"); header.put("Content-type", "application/x-www-form-urlencoded");
String kdspUrl = kdspOperationUrl + "/api/kdsp/customer/logged-off"; header.put("qg-tenant-id", "560761");
Map param = Maps.newHashMap(); String kdsp = kdspUrl + "/api/kdsp/user/customer/logged-off";
param.put("userId", userId.toString()); Map param = Maps.newHashMap();
String result = httpService.post(kdspUrl, header, param); param.put("userId", userId.toString());
JSONObject jsonObject = JSONObject.parseObject(result);; param.put("tenantId", "560761");
String businessCode = jsonObject.getString("businessCode"); String result = httpService.post(kdsp, header, param);
if(!"0000".equals(businessCode)){ JSONObject jsonObject = JSONObject.parseObject(result);;
return JsonResult.buildErrorStateResult(jsonObject.getString("msg"),jsonObject.get("data")); 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"));
}else{ }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 @Override
...@@ -890,7 +885,7 @@ public class UserServiceImpl implements IUserService { ...@@ -890,7 +885,7 @@ public class UserServiceImpl implements IUserService {
Map<String, String> header = Maps.newHashMap(); Map<String, String> header = Maps.newHashMap();
header.put("Content-type", "application/x-www-form-urlencoded"); header.put("Content-type", "application/x-www-form-urlencoded");
Map param = Maps.newHashMap(); Map param = Maps.newHashMap();
param.put("userId", userId); param.put("userId", userId.toString());
String userUrl = userSysUrl + "/innerapi/user/active"; String userUrl = userSysUrl + "/innerapi/user/active";
String userResult = httpService.post(userUrl, header, param); String userResult = httpService.post(userUrl, header, param);
JSONObject userJsonObject = null; 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