代码修改

release
xuliangwei 2 years ago
parent 93d2df137c
commit d146890e65
  1. 14
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/RequestRecordServiceImpl.java

@ -166,14 +166,14 @@ public class RequestRecordServiceImpl extends MpBaseServiceImpl<RequestRecordDao
updateSuccessfulRecallRecord(dbRecord, 0, JSONObject.toJSONString(rspJson), JSONObject.toJSONString(data)); updateSuccessfulRecallRecord(dbRecord, 0, JSONObject.toJSONString(rspJson), JSONObject.toJSONString(data));
return ResponseEntity.ok(JSONObject.toJSONString(data)); return ResponseEntity.ok(JSONObject.toJSONString(data));
} catch (Exception e) { } catch (Exception e) {
log.error("重调出现异常,异常信息:{}", e.getMessage()); log.error("重调出现异常,异常信息:{}", e);
e.printStackTrace();
try { try {
updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse),
JSONObject.toJSONString(data), "重调用出现异常:" + JSONObject.toJSONString(e.getMessage()), 1); JSONObject.toJSONString(data), "重调用出现异常:" + JSONObject.toJSONString(e.getMessage()), 1);
} catch (Exception exception) { } catch (Exception exception) {
e.printStackTrace();
log.error("接口重调用保存异常:{}", exception.getMessage()); log.error("接口重调用保存异常:{}", exception);
} }
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT))); return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT)));
} }
@ -181,8 +181,8 @@ public class RequestRecordServiceImpl extends MpBaseServiceImpl<RequestRecordDao
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
log.info("请求处理异常,异常信息:{}", JSONObject.toJSONString(e)); log.info("请求处理异常,异常信息:{}", e);
return ResponseEntity.ok(JSONObject.toJSONString(R.error("请求处理异常,请校正参数!"))); return ResponseEntity.ok(JSONObject.toJSONString(R.error("请求处理异常,请校正参数!")));
} }
@ -195,7 +195,7 @@ public class RequestRecordServiceImpl extends MpBaseServiceImpl<RequestRecordDao
record.setLastRetryTime(new Date()); record.setLastRetryTime(new Date());
record.setRetryTimes(record.getRetryTimes() + 1); record.setRetryTimes(record.getRetryTimes() + 1);
record.setStatus(status); record.setStatus(status);
record.setIsRecall(null); record.setIsRecall(0);
return requestRecordDao.updateById(record); return requestRecordDao.updateById(record);
} }

Loading…
Cancel
Save