update 优化发布事件增加租户ID
This commit is contained in:
parent
b63231fe8c
commit
00177c28f5
@ -16,6 +16,11 @@ public class ProcessDeleteEvent implements Serializable {
|
|||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户ID
|
||||||
|
*/
|
||||||
|
private String tenantId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程定义编码
|
* 流程定义编码
|
||||||
*/
|
*/
|
||||||
|
@ -16,6 +16,11 @@ public class ProcessEvent implements Serializable {
|
|||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户ID
|
||||||
|
*/
|
||||||
|
private String tenantId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程定义编码
|
* 流程定义编码
|
||||||
*/
|
*/
|
||||||
|
@ -16,6 +16,11 @@ public class ProcessTaskEvent implements Serializable {
|
|||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户ID
|
||||||
|
*/
|
||||||
|
private String tenantId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程定义编码
|
* 流程定义编码
|
||||||
*/
|
*/
|
||||||
|
@ -5,6 +5,7 @@ import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
|||||||
import org.dromara.common.core.domain.event.ProcessEvent;
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.SpringUtils;
|
import org.dromara.common.core.utils.SpringUtils;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,8 +27,10 @@ public class FlowProcessEventHandler {
|
|||||||
* @param submit 当为true时为申请人节点办理
|
* @param submit 当为true时为申请人节点办理
|
||||||
*/
|
*/
|
||||||
public void processHandler(String flowCode, String businessId, String status, boolean submit) {
|
public void processHandler(String flowCode, String businessId, String status, boolean submit) {
|
||||||
log.info("发布流程事件,流程状态: {}, 流程编码: {}, 业务ID: {}", status, flowCode, businessId);
|
String tenantId = LoginHelper.getTenantId();
|
||||||
|
log.info("发布流程事件,租户ID: {}, 流程状态: {}, 流程编码: {}, 业务ID: {}, 是否申请人节点办理: {}", tenantId, status, flowCode, businessId, submit);
|
||||||
ProcessEvent processEvent = new ProcessEvent();
|
ProcessEvent processEvent = new ProcessEvent();
|
||||||
|
processEvent.setTenantId(tenantId);
|
||||||
processEvent.setFlowCode(flowCode);
|
processEvent.setFlowCode(flowCode);
|
||||||
processEvent.setBusinessId(businessId);
|
processEvent.setBusinessId(businessId);
|
||||||
processEvent.setStatus(status);
|
processEvent.setStatus(status);
|
||||||
@ -44,8 +47,10 @@ public class FlowProcessEventHandler {
|
|||||||
* @param businessId 业务id
|
* @param businessId 业务id
|
||||||
*/
|
*/
|
||||||
public void processTaskHandler(String flowCode, String nodeCode, Long taskId, String businessId) {
|
public void processTaskHandler(String flowCode, String nodeCode, Long taskId, String businessId) {
|
||||||
log.info("发布流程任务事件, 流程编码: {}, 业务ID: {}", flowCode, businessId);
|
String tenantId = LoginHelper.getTenantId();
|
||||||
|
log.info("发布流程任务事件, 租户ID: {}, 流程编码: {}, 节点编码: {}, 任务ID: {}, 业务ID: {}", tenantId, flowCode, nodeCode, taskId, businessId);
|
||||||
ProcessTaskEvent processTaskEvent = new ProcessTaskEvent();
|
ProcessTaskEvent processTaskEvent = new ProcessTaskEvent();
|
||||||
|
processTaskEvent.setTenantId(tenantId);
|
||||||
processTaskEvent.setFlowCode(flowCode);
|
processTaskEvent.setFlowCode(flowCode);
|
||||||
processTaskEvent.setNodeCode(nodeCode);
|
processTaskEvent.setNodeCode(nodeCode);
|
||||||
processTaskEvent.setTaskId(taskId);
|
processTaskEvent.setTaskId(taskId);
|
||||||
@ -60,8 +65,10 @@ public class FlowProcessEventHandler {
|
|||||||
* @param businessId 业务ID
|
* @param businessId 业务ID
|
||||||
*/
|
*/
|
||||||
public void processDeleteHandler(String flowCode, String businessId) {
|
public void processDeleteHandler(String flowCode, String businessId) {
|
||||||
log.info("发布删除流程事件, 流程编码: {}, 业务ID: {}", flowCode, businessId);
|
String tenantId = LoginHelper.getTenantId();
|
||||||
|
log.info("发布删除流程事件, 租户ID: {}, 流程编码: {}, 业务ID: {}", tenantId, flowCode, businessId);
|
||||||
ProcessDeleteEvent processDeleteEvent = new ProcessDeleteEvent();
|
ProcessDeleteEvent processDeleteEvent = new ProcessDeleteEvent();
|
||||||
|
processDeleteEvent.setTenantId(tenantId);
|
||||||
processDeleteEvent.setFlowCode(flowCode);
|
processDeleteEvent.setFlowCode(flowCode);
|
||||||
processDeleteEvent.setBusinessId(businessId);
|
processDeleteEvent.setBusinessId(businessId);
|
||||||
SpringUtils.context().publishEvent(processDeleteEvent);
|
SpringUtils.context().publishEvent(processDeleteEvent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user