|
|
@@ -4,15 +4,9 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.ydtech.modules.order.entity.po.InsOrderPushMsg;
|
|
|
import com.ydtech.modules.order.entity.vo.PushDataVo;
|
|
|
import com.ydtech.modules.order.service.InsOrderPushMsgService;
|
|
|
-import org.springframework.amqp.core.Message;
|
|
|
-import org.springframework.amqp.core.MessageProperties;
|
|
|
|
|
|
-import java.nio.charset.StandardCharsets;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
-import java.util.UUID;
|
|
|
-
|
|
|
-import static org.springframework.amqp.core.MessageProperties.CONTENT_TYPE_TEXT_PLAIN;
|
|
|
|
|
|
/**
|
|
|
* @version
|
|
|
@@ -47,11 +41,11 @@ public class OrderRunnableThread implements Runnable {
|
|
|
//发送数据
|
|
|
this.message.forEach(item ->{
|
|
|
//修改执行相应业务逻辑
|
|
|
- MessageProperties messageProperties = new MessageProperties();
|
|
|
- messageProperties.setMessageId(UUID.randomUUID().toString());
|
|
|
- messageProperties.setContentType(CONTENT_TYPE_TEXT_PLAIN);
|
|
|
- messageProperties.setContentEncoding("UTF-8");
|
|
|
- Message message_cj = new Message(item.getBytes(StandardCharsets.UTF_8), messageProperties);
|
|
|
+ // MessageProperties messageProperties = new MessageProperties();
|
|
|
+ // messageProperties.setMessageId(UUID.randomUUID().toString());
|
|
|
+ // messageProperties.setContentType(CONTENT_TYPE_TEXT_PLAIN);
|
|
|
+ // messageProperties.setContentEncoding("UTF-8");
|
|
|
+ // Message message_cj = new Message(item.getBytes(StandardCharsets.UTF_8), messageProperties);
|
|
|
PushDataVo pushDataVo = JSON.parseObject(item, PushDataVo.class);
|
|
|
//推送
|
|
|
InsOrderPushMsg insOrderPushMsg = new InsOrderPushMsg(null, pushDataVo.getInsAreaCompany().getId(), "0", new Date(), pushDataVo.toString());
|