|
@ -2,8 +2,10 @@ package com.yihu.hos.services;
|
|
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.hos.common.constants.ContextAttributes;
|
|
|
import com.yihu.hos.core.log.Logger;
|
|
|
import com.yihu.hos.core.log.LoggerFactory;
|
|
|
import com.yihu.hos.interceptor.LocalContext;
|
|
|
import com.yihu.hos.web.framework.constant.ServiceFlowConstant;
|
|
|
import com.yihu.hos.web.framework.model.bo.ServiceFlow;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -73,6 +75,8 @@ public class ServiceFlowEventService {
|
|
|
try {
|
|
|
String msg = objectMapper.writeValueAsString(serviceFlow);
|
|
|
Map<String, Object> header = new HashMap<>();
|
|
|
String attachment = LocalContext.getContext().getAttachment(ContextAttributes.TENANT_NAME);
|
|
|
header.put("tenant", attachment);
|
|
|
header.put("event", event);
|
|
|
this.jmsMessagingTemplate.convertAndSend(this.queue, msg, header);
|
|
|
} catch (JsonProcessingException e) {
|