|
|
@@ -1,5 +1,6 @@
|
|
|
package com.fdkankan.task;
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
import com.fdkankan.task.entity.Repair;
|
|
|
import com.fdkankan.task.entity.TbBuilding;
|
|
|
import com.fdkankan.task.entity.TbHouse;
|
|
|
@@ -8,17 +9,19 @@ import com.fdkankan.task.mapper.TbBuildingMapper;
|
|
|
import com.fdkankan.task.mapper.TbHouseMapper;
|
|
|
import com.fdkankan.task.service.RepairService;
|
|
|
import com.mybatisflex.core.query.QueryWrapper;
|
|
|
+import com.rabbitmq.client.AMQP;
|
|
|
+import com.rabbitmq.client.Channel;
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
import org.mybatis.spring.annotation.MapperScan;
|
|
|
+import org.springframework.amqp.rabbit.core.ChannelCallback;
|
|
|
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.UUID;
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.*;
|
|
|
|
|
|
@SpringBootTest
|
|
|
public class TaskTestApplication {
|
|
|
@@ -33,4 +36,14 @@ public class TaskTestApplication {
|
|
|
List<Repair> repairs = repairMapper.selectListByQuery(queryWrapper);
|
|
|
System.out.println(repairs);
|
|
|
}
|
|
|
+
|
|
|
+ @Resource(name = "v3RabbitTemplate")
|
|
|
+ private RabbitTemplate secondRabbitTemplate;
|
|
|
+
|
|
|
+ @Test
|
|
|
+ void test2() {
|
|
|
+ Long queueModelingA = secondRabbitTemplate.execute(channel -> channel.messageCount("QUEUE_MODELING_A"));
|
|
|
+ System.out.println(queueModelingA);
|
|
|
+ }
|
|
|
+
|
|
|
}
|