feat(REQ-3114) - MQ 转发的钉钉消息增加环境标识
This commit is contained in:
parent
c2ea87f894
commit
7312f9cf4e
@ -15,6 +15,7 @@ import java.io.Serializable;
|
||||
public class DingtalkReceiveMqModel implements Serializable {
|
||||
private final static long serialVersionUID = 1L;
|
||||
private String traceId;
|
||||
private String activeProfile;
|
||||
|
||||
/**
|
||||
* 会话 ID
|
||||
|
||||
@ -14,6 +14,7 @@ import cn.axzo.riven.dingtalk.repository.entity.ThirdDingtalkConversation;
|
||||
import cn.axzo.riven.dingtalk.service.ThirdDingtalkConversationService;
|
||||
import com.dingtalk.open.app.api.models.bot.ChatbotMessage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@ -36,6 +37,8 @@ import java.util.stream.Collectors;
|
||||
public class TransferToMQStrategy extends AbstractRobotHandleStrategy {
|
||||
@Resource
|
||||
private RocketMQEventProducer producer;
|
||||
@Value("${spring.profiles.active}")
|
||||
private String activeProfile;
|
||||
@Resource
|
||||
private ThirdDingtalkConversationService thirdDingtalkConversationService;
|
||||
private final Map</*会话 ID*/String, ThirdDingtalkConversation> conversationMap = new HashMap<>();
|
||||
@ -68,6 +71,7 @@ public class TransferToMQStrategy extends AbstractRobotHandleStrategy {
|
||||
}
|
||||
|
||||
DingtalkReceiveMqModel model = new DingtalkReceiveMqModel();
|
||||
model.setActiveProfile(activeProfile);
|
||||
model.setTraceId(messageQueue.getTraceId());
|
||||
model.setConversationId(chatbotMessage.getConversationId());
|
||||
model.setMsgId(chatbotMessage.getMsgId());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user