xiewj hai 1 ano
pai
achega
5c9929407d

+ 6 - 6
720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/FodderServiceImpl.java

@@ -229,9 +229,9 @@ public class FodderServiceImpl extends IBaseServiceImpl<FodderEntity, Long> impl
             if (type.equals("pano")) {
                 log.info("准备发送消息: " + entity.getId());
                 //发消息到mq
-                DoSliceDTO doSliceDTO = new DoSliceDTO();
-                doSliceDTO.setId(entity.getId());
-                rabbitMqProducer.sendByWorkQueue(doSliceQueue,doSliceDTO);
+                Map<String,Object> map=new HashMap<>();
+                map.put("id", entity.getId());
+                rabbitMqProducer.sendByWorkQueue(doSliceQueue,map);
                 log.info("发送消息到队列完成: " + entity.getId());
             }
             long end = System.currentTimeMillis();
@@ -732,9 +732,9 @@ public class FodderServiceImpl extends IBaseServiceImpl<FodderEntity, Long> impl
         List<FodderEntity> fodderEntities = getBaseMapper().selectByCondition(condition);
         log.info("重新入队数量{}",fodderEntities.size());
         for (FodderEntity fodderEntity : fodderEntities) {
-            DoSliceDTO doSliceDTO = new DoSliceDTO();
-            doSliceDTO.setId(fodderEntity.getId());
-            rabbitMqProducer.sendByWorkQueue(doSliceQueue,doSliceDTO);
+            Map<String,Object> map=new HashMap<>();
+            map.put("id",  fodderEntity.getId());
+            rabbitMqProducer.sendByWorkQueue(doSliceQueue,map);
         }
     }
 }

+ 1 - 1
720yun_fd_manage/gis_web/src/main/java/com/gis/web/controller/TestController.java

@@ -175,7 +175,7 @@ public class TestController extends BaseController {
         DoSliceDTO doSliceDTO = new DoSliceDTO();
         doSliceDTO.setId(1L);
         Map<String, Object> map = new HashMap<>();
-        rabbitMqProducer.sendByWorkQueue(doSliceQueue,doSliceDTO);
+        rabbitMqProducer.sendByWorkQueue(doSliceQueue,map);
         return Result.success(doSliceDTO);
     }