From 24e09e649ed7ab3809e2c5c586a308637991d4ae Mon Sep 17 00:00:00 2001 From: luozukai Date: Tue, 15 Jan 2019 11:28:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E6=B5=81=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BA=8B=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/iformall/service/WxFlowService.java | 2 +- .../java/com/iformall/service/impl/WxFlowServiceImpl.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/WxFlowService.java b/mallinkService/src/main/java/com/iformall/service/WxFlowService.java index 2bc22814d..cbc00ddee 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxFlowService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxFlowService.java @@ -51,7 +51,7 @@ public interface WxFlowService { /** * 生成流程图 * @param httpServletResponse - * @param processInstanceId + * @param businessId * @throws Exception */ void genProcessDiagram(HttpServletResponse httpServletResponse, String businessId) throws Exception; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index edd0bfe4a..539cf3b09 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -26,8 +26,9 @@ import org.flowable.task.api.Task; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.InputStream; import java.io.OutputStream; @@ -72,6 +73,7 @@ public class WxFlowServiceImpl implements WxFlowService { } @Override + @Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class}) public ResultData start(Map params,Long userId,String userName,String tenantId) { String remark = (String)params.get("remark"); Long businessId = Long.parseLong((String)params.get("businessId")); @@ -110,6 +112,8 @@ public class WxFlowServiceImpl implements WxFlowService { wxFlowRecord.setStatus(EnumFlowRecordStatus.NEW.getCode()); wxFlowRecordService.saveOrUpdate(wxFlowRecord); + System.out.println(1/0); + // 给审批人发送代办通知短信 List mallUserInfoList = getUserByProcessInstanceId(processInstance.getId()); for (MallUserInfo mallUserInfo:mallUserInfoList) { @@ -174,6 +178,7 @@ public class WxFlowServiceImpl implements WxFlowService { } @Override + @Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class}) public ResultData apply(Map params,Long userId,String userName,String tenantId) { String taskId = params.get("taskId"); String processInstanceId = params.get("processInstanceId"); @@ -248,6 +253,7 @@ public class WxFlowServiceImpl implements WxFlowService { } @Override + @Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class}) public ResultData reject(Map params,Long userId,String userName,String tenantId) { String taskId = params.get("taskId"); String processInstanceId = params.get("processInstanceId");