diff --git a/integration/src/main/java/com/foreverwin/mesnac/integration/controller/IntegrationLogController.java b/integration/src/main/java/com/foreverwin/mesnac/integration/controller/IntegrationLogController.java index 37f3e2cf..ba7a3345 100644 --- a/integration/src/main/java/com/foreverwin/mesnac/integration/controller/IntegrationLogController.java +++ b/integration/src/main/java/com/foreverwin/mesnac/integration/controller/IntegrationLogController.java @@ -22,11 +22,21 @@ public class IntegrationLogController { @ResponseBody @PostMapping("redoSend") public R shopOrderRelease(@RequestBody List integrationLogs) { - + StringBuffer stringBuffer = new StringBuffer(""); for (IntegrationLog integrationLog: integrationLogs) { - integrationLogService.redoSend(integrationLog.getHandle()); + try { + String str = integrationLogService.redoSend(integrationLog.getHandle()); + if (str != null){ + stringBuffer.append("ERP接口错误:" + str + ";"); + } + }catch (Exception e){ + return R.failed("重发失败:" + e.getMessage()); + } + } + if (stringBuffer.toString().equals("")){ + return R.ok(); } - return R.ok(); + return R.failed(stringBuffer); } } \ No newline at end of file diff --git a/integration/src/main/java/com/foreverwin/mesnac/integration/service/IntegrationLogService.java b/integration/src/main/java/com/foreverwin/mesnac/integration/service/IntegrationLogService.java index d077611b..7a3cf16a 100644 --- a/integration/src/main/java/com/foreverwin/mesnac/integration/service/IntegrationLogService.java +++ b/integration/src/main/java/com/foreverwin/mesnac/integration/service/IntegrationLogService.java @@ -15,6 +15,8 @@ public interface IntegrationLogService extends IService { void saveIntegrationLog(IntegrationLog integrationLog); - void redoSend(String handle); + void updateIntegrationLog(IntegrationLog integrationLog); + + String redoSend(String handle); } \ No newline at end of file diff --git a/integration/src/main/java/com/foreverwin/mesnac/integration/service/impl/IntegrationLogServiceImpl.java b/integration/src/main/java/com/foreverwin/mesnac/integration/service/impl/IntegrationLogServiceImpl.java index 0aa978a1..b4a9704b 100644 --- a/integration/src/main/java/com/foreverwin/mesnac/integration/service/impl/IntegrationLogServiceImpl.java +++ b/integration/src/main/java/com/foreverwin/mesnac/integration/service/impl/IntegrationLogServiceImpl.java @@ -12,6 +12,7 @@ import com.foreverwin.mesnac.integration.mapper.IntegrationLogMapper; import com.foreverwin.mesnac.integration.model.IntegrationLog; import com.foreverwin.mesnac.integration.service.IntegrationLogService; import com.foreverwin.modular.core.exception.BaseException; +import com.foreverwin.modular.core.exception.BusinessException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; @@ -43,7 +44,13 @@ public class IntegrationLogServiceImpl extends ServiceImpl