Commit 1797dd7d authored by 吴琼's avatar 吴琼

客服系统注销接口修改

parent 6b44f738
......@@ -835,28 +835,38 @@ public class UserServiceImpl implements IUserService {
param.put("userId", userId.toString());
param.put("tenantId", "560761");
String result = httpService.post(kdsp, header, param);
log.info("[user][modifyAccountStatusDisableNew] 请求业务系统返回值:{}", result);
if(result!=null){
JSONObject jsonObject = JSONObject.parseObject(result);;
String businessCode = jsonObject.getString("businessCode");
//返回信息
if("0000".equals(businessCode)){
String data = jsonObject.getString("data");
JSONObject dataObject = JSONObject.parseObject(data);
Integer userStatus = dataObject.getInteger("userStatus");
String message = dataObject.getString("message");
//1.不支持注销 2 可以注销
if(userStatus!=null && userStatus.intValue() == 1){
return JsonResult.buildErrorStateResult(message);
}
//调用用户中心,将账户状态更新为冻结
Map param1 = Maps.newHashMap();
param1.put("userId", userId.toString());
String userUrl = userSysUrl + "/innerapi/user/disable";
String userResult = httpService.post(userUrl, header, param1);
log.info("[user][modifyAccountStatusDisableNew] 请求业务系统返回值:{}", userResult);
JSONObject userJsonObject = JSONObject.parseObject(userResult);
String userBusinessCode = userJsonObject.getString("businessCode");
if("0000".equals(userBusinessCode)){
return JsonResult.buildSuccessResult(userJsonObject.getString("msg"),userJsonObject.get("data"));
}else{
return JsonResult.buildErrorStateResult(userJsonObject.getString("msg"),userJsonObject.get("data"));
return JsonResult.buildErrorStateResult("调用用户中心接口报错,注销失败");
}
}else{
return JsonResult.buildErrorStateResult(jsonObject.getString("msg"),jsonObject.get("data"));
return JsonResult.buildErrorStateResult("调用电商接口报错,注销失败");
}
}else{
return JsonResult.buildErrorStateResult("调用kdsp接口报错",null);
return JsonResult.buildErrorStateResult("调用电商接口报错,注销失败");
}
} catch (Exception e) {
log.error("[user][modifyAccountStatusDisableNew] 网络通讯异常,userId:{},ex:{}", userId, ExceptionUtils.getStackTrace(e));
......@@ -881,12 +891,21 @@ public class UserServiceImpl implements IUserService {
param.put("userId", userId.toString());
param.put("tenantId", "560761");
String result = httpService.post(kdsp, header, param);
JSONObject jsonObject = JSONObject.parseObject(result);;
log.info("[user][modifyAccountStatusDisableNew] 请求业务系统返回值:{}", result);
JSONObject jsonObject = JSONObject.parseObject(result);
String businessCode = jsonObject.getString("businessCode");
if(!"0000".equals(businessCode)){
return JsonResult.buildErrorStateResult(jsonObject.getString("msg"),jsonObject.get("data"));
return JsonResult.buildErrorStateResult("调用电商注销接口报错,注销失败");
}else{
return JsonResult.buildSuccessResult("注销成功",null);
String data = jsonObject.getString("data");
JSONObject dataObject = JSONObject.parseObject(data);;
Integer userStatus = dataObject.getInteger("userStatus");
//不能注销
if(userStatus !=null && userStatus.intValue() ==1){
String message = dataObject.getString("message");
return JsonResult.buildErrorStateResult(message);
}
return JsonResult.buildSuccessResult("注销成功",data);
}
}catch (Exception e) {
log.error("[user][modifyAccountStatusDisableNew] 网络通讯异常,userId:{},ex:{}", userId, ExceptionUtils.getStackTrace(e));
......
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