|
@@ -6,6 +6,7 @@ import com.fdkankan.dingtalk.DingTalkSendUtils;
|
|
|
import com.fdkankan.jp.xspace.common.constant.NasPathConstant;
|
|
|
import com.fdkankan.jp.xspace.common.exception.PackException;
|
|
|
import com.fdkankan.jp.xspace.common.rabbitmq.RabbitmqConstant;
|
|
|
+import com.fdkankan.jp.xspace.common.rabbitmq.dto.SceneXspaceMqDTO;
|
|
|
import com.fdkankan.jp.xspace.entity.SceneXspace;
|
|
|
import com.fdkankan.jp.xspace.entity.User;
|
|
|
import com.fdkankan.jp.xspace.service.ISceneXspaceService;
|
|
@@ -60,16 +61,16 @@ public class RabbitMqListener {
|
|
|
* queuesToDeclare = @Queue("${queue.modeling.modeling-test}"), 如果队列不不存在会自动创建队列
|
|
|
* concurrency = "3" 设置消费线程数,每个线程每次只拉取一条消息消费
|
|
|
*/
|
|
|
-// @RabbitListener(
|
|
|
-// queuesToDeclare = @Queue(RabbitmqConstant.QUEUE_PACK_XSPACE),
|
|
|
-// concurrency = "1"
|
|
|
-// )
|
|
|
+ @RabbitListener(
|
|
|
+ queuesToDeclare = @Queue(RabbitmqConstant.QUEUE_PACK_XSPACE),
|
|
|
+ concurrency = "1"
|
|
|
+ )
|
|
|
public void packXspace(Channel channel, Message message) throws Exception {
|
|
|
String messageId = message.getMessageProperties().getMessageId();
|
|
|
String msg = new String(message.getBody(), StandardCharsets.UTF_8);
|
|
|
log.info("开始消费消息,id:{},content:{}", messageId, msg);
|
|
|
-
|
|
|
- SceneXspace bean = BeanUtil.toBean(msg, SceneXspace.class);
|
|
|
+ SceneXspaceMqDTO dto = BeanUtil.toBean(msg, SceneXspaceMqDTO.class);
|
|
|
+ SceneXspace bean = BeanUtil.copyProperties(dto, SceneXspace.class);
|
|
|
String errorReason = null;
|
|
|
|
|
|
try {
|