修改转发描述
This commit is contained in:
parent
21007598a9
commit
5a63afd7d8
|
@ -2111,7 +2111,8 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
return BaseResult.getSuccessMessageEntity("发送成功");
|
return BaseResult.getSuccessMessageEntity("发送成功");
|
||||||
} else {
|
} else {
|
||||||
saveMdmModuleSendLogEntity(mdmModuleEntity.getMdmCode(), mdmModuleDistributeEntity.getId(), "2", "转发失败:"+jsonResultEntity.getAttribute(), dbname, object.getString("id"), sysApplicationEntity.getName(), sysApplicationEntity.getId(), apiEntity.getApiName(), apiEntity.getId(), object.toJSONString(), type);
|
saveMdmModuleSendLogEntity(mdmModuleEntity.getMdmCode(), mdmModuleDistributeEntity.getId(), "2", "转发失败:"+jsonResultEntity.getAttribute(), dbname, object.getString("id"), sysApplicationEntity.getName(), sysApplicationEntity.getId(), apiEntity.getApiName(), apiEntity.getId(), object.toJSONString(), type);
|
||||||
return BaseResult.getFailureMessageEntity("发送错误:" + jsonResultEntity.getAttribute());
|
JSONObject object1 = JSONObject.parseObject(jsonResultEntity.getAttribute().toString());
|
||||||
|
return BaseResult.getFailureMessageEntity("发送错误:" +object1.getString("msg"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
||||||
@Resource
|
@Resource
|
||||||
private ApplicationCache applicationCache;
|
private ApplicationCache applicationCache;
|
||||||
|
|
||||||
@Value("${savefile.tomcatpath}")
|
@Value("${savefile.tomcatpath:}")
|
||||||
public String TOMCATPATH;
|
public String TOMCATPATH;
|
||||||
//多线程请求加锁 HttpRequest 构造方法是静态的
|
//多线程请求加锁 HttpRequest 构造方法是静态的
|
||||||
private final Object lock = new Object();
|
private final Object lock = new Object();
|
||||||
|
@ -1954,17 +1954,29 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
||||||
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
||||||
return BaseResult.getSuccessMessageEntity("转发成功", jsonObject);
|
return BaseResult.getSuccessMessageEntity("转发成功", jsonObject);
|
||||||
}else {
|
}else {
|
||||||
return BaseResult.getFailureMessageEntity("转发失败", jsonObject);
|
if(sysMessageManageLogEntity.getReturnMsg()!= null&& !"".equals(sysMessageManageLogEntity.getReturnMsg())){
|
||||||
|
return BaseResult.getFailureMessageEntity("转发失败:"+sysMessageManageLogEntity.getReturnMsg(), jsonObject);
|
||||||
|
}else {
|
||||||
|
return BaseResult.getFailureMessageEntity("转发失败", jsonObject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
||||||
return BaseResult.getSuccessMessageEntity("转发成功", body);
|
return BaseResult.getSuccessMessageEntity("转发成功", body);
|
||||||
}else {
|
}else {
|
||||||
return BaseResult.getFailureMessageEntity("转发失败", body);
|
if(sysMessageManageLogEntity.getReturnMsg()!= null&& !"".equals(sysMessageManageLogEntity.getReturnMsg())){
|
||||||
|
return BaseResult.getFailureMessageEntity("转发失败:"+sysMessageManageLogEntity.getReturnMsg(), body);
|
||||||
|
}else {
|
||||||
|
return BaseResult.getFailureMessageEntity("转发失败", body);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return BaseResult.getFailureMessageEntity("转发失败", body);
|
if(sysMessageManageLogEntity.getReturnMsg()!= null&& !"".equals(sysMessageManageLogEntity.getReturnMsg())){
|
||||||
|
return BaseResult.getFailureMessageEntity("转发失败:"+sysMessageManageLogEntity.getReturnMsg(), body);
|
||||||
|
}else {
|
||||||
|
return BaseResult.getFailureMessageEntity("转发失败", body);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {//GET
|
} else {//GET
|
||||||
|
@ -2036,13 +2048,21 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
||||||
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
||||||
return BaseResult.getSuccessMessageEntity("转发成功", jsonObject);
|
return BaseResult.getSuccessMessageEntity("转发成功", jsonObject);
|
||||||
}else {
|
}else {
|
||||||
return BaseResult.getFailureMessageEntity("转发失败", jsonObject);
|
if(sysMessageManageLogEntity.getReturnMsg()!= null&& !"".equals(sysMessageManageLogEntity.getReturnMsg())){
|
||||||
|
return BaseResult.getFailureMessageEntity("转发失败:"+sysMessageManageLogEntity.getReturnMsg(), jsonObject);
|
||||||
|
}else {
|
||||||
|
return BaseResult.getFailureMessageEntity("转发失败", jsonObject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
||||||
return BaseResult.getSuccessMessageEntity("转发成功", body);
|
return BaseResult.getSuccessMessageEntity("转发成功", body);
|
||||||
}else {
|
}else {
|
||||||
return BaseResult.getFailureMessageEntity("转发失败", body);
|
if(sysMessageManageLogEntity.getReturnMsg()!= null&& !"".equals(sysMessageManageLogEntity.getReturnMsg())){
|
||||||
|
return BaseResult.getFailureMessageEntity("转发失败:"+sysMessageManageLogEntity.getReturnMsg(), body);
|
||||||
|
}else {
|
||||||
|
return BaseResult.getFailureMessageEntity("转发失败", body);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -2599,6 +2619,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
||||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||||
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
||||||
String returnMsg = cheackdatas.getString(receiveApi.getReturnMsg());
|
String returnMsg = cheackdatas.getString(receiveApi.getReturnMsg());
|
||||||
|
sysMessageManageLogEntity.setReturnMsg(returnMsg);//返回信息
|
||||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误,返回信息如下:" + returnMsg);//返回信息
|
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误,返回信息如下:" + returnMsg);//返回信息
|
||||||
} else {
|
} else {
|
||||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误");//返回信息
|
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误");//返回信息
|
||||||
|
@ -2609,6 +2630,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
||||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||||
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
||||||
String returnMsg = cheackdatas.getString(receiveApi.getReturnMsg());
|
String returnMsg = cheackdatas.getString(receiveApi.getReturnMsg());
|
||||||
|
sysMessageManageLogEntity.setReturnMsg(returnMsg);//返回信息
|
||||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误,返回信息如下:" + returnMsg);//返回信息
|
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误,返回信息如下:" + returnMsg);//返回信息
|
||||||
} else {
|
} else {
|
||||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误");//返回信息
|
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误");//返回信息
|
||||||
|
@ -2625,6 +2647,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
||||||
if (JSONUtil.isTypeJSON(body)) {
|
if (JSONUtil.isTypeJSON(body)) {
|
||||||
JSONObject cheackdatas = JSONObject.parseObject(body);
|
JSONObject cheackdatas = JSONObject.parseObject(body);
|
||||||
String checkdata = cheackdatas.getString(receiveApi.getReturnMsg());
|
String checkdata = cheackdatas.getString(receiveApi.getReturnMsg());
|
||||||
|
sysMessageManageLogEntity.setReturnMsg(checkdata);//返回信息
|
||||||
sysMessageManageLogEntity.setRemark("接口调用失败,api返回信息字段未配置,返回信息如下:" + checkdata);//返回信息
|
sysMessageManageLogEntity.setRemark("接口调用失败,api返回信息字段未配置,返回信息如下:" + checkdata);//返回信息
|
||||||
} else {
|
} else {
|
||||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回格式错误,不是JSON");//返回信息
|
sysMessageManageLogEntity.setRemark("接口调用失败,返回格式错误,不是JSON");//返回信息
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class SysMessageManageLogEntity extends BaseEntity {
|
||||||
private String status;
|
private String status;
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
private String remark;
|
private String remark;
|
||||||
|
private String returnMsg;
|
||||||
/** 返回解析类型 */
|
/** 返回解析类型 */
|
||||||
private String returnType;
|
private String returnType;
|
||||||
/** 失败状态(1、需要重新发送 2、不需要重新发送) */
|
/** 失败状态(1、需要重新发送 2、不需要重新发送) */
|
||||||
|
@ -206,5 +207,13 @@ public class SysMessageManageLogEntity extends BaseEntity {
|
||||||
public void setSendAppName(String sendAppName) {
|
public void setSendAppName(String sendAppName) {
|
||||||
this.sendAppName = sendAppName;
|
this.sendAppName = sendAppName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getReturnMsg() {
|
||||||
|
return returnMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReturnMsg(String returnMsg) {
|
||||||
|
this.returnMsg = returnMsg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue