|
|
@@ -37,12 +37,10 @@ public class RabbitMqMessageProducer implements MqBaseProducer { |
|
|
public void sendMessage(BaseMsg data, String topic, String tags, String keys) { |
|
|
public void sendMessage(BaseMsg data, String topic, String tags, String keys) { |
|
|
try { |
|
|
try { |
|
|
data.setUuid(UUID.randomUUID().toString()); |
|
|
data.setUuid(UUID.randomUUID().toString()); |
|
|
wxMsgRecordService.save(data); |
|
|
|
|
|
|
|
|
|
|
|
rabbitTemplate.convertAndSend(topic, JsonUtil.obj2Json(data)); |
|
|
rabbitTemplate.convertAndSend(topic, JsonUtil.obj2Json(data)); |
|
|
|
|
|
|
|
|
data.setMsgStatus(EnumMsgRecordStatus.SEND_SUCC.getCode()); |
|
|
|
|
|
wxMsgRecordMapper.update(data); |
|
|
|
|
|
|
|
|
wxMsgRecordService.save(data); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("RabbitMqMessageProducer: Send Message Error ", e); |
|
|
log.error("RabbitMqMessageProducer: Send Message Error ", e); |
|
|
} |
|
|
} |
|
|
|