From 89ac3c9e25a2e28e072e9288ea407dffd01e1ea3 Mon Sep 17 00:00:00 2001 From: SongZhang <2064194730@qq.com> Date: Sat, 14 Sep 2024 17:50:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/Tets.java | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/test/java/com/chaozhanggui/system/cashierservice/Tets.java diff --git a/src/test/java/com/chaozhanggui/system/cashierservice/Tets.java b/src/test/java/com/chaozhanggui/system/cashierservice/Tets.java new file mode 100644 index 0000000..002d451 --- /dev/null +++ b/src/test/java/com/chaozhanggui/system/cashierservice/Tets.java @@ -0,0 +1,43 @@ +package com.chaozhanggui.system.cashierservice; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.poi.excel.ExcelUtil; +import cn.hutool.poi.excel.ExcelWriter; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.chaozhanggui.system.cashierservice.rabbit.PrintConsumer; +import com.chaozhanggui.system.cashierservice.rabbit.PrintMechineConsumer; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.Map; + +@ActiveProfiles("dev") +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +public class Tets { + @Autowired + private PrintMechineConsumer printMechineConsumer; + @Autowired + private PrintConsumer printConsumer; + + @Test + public void test() { +// printMechineConsumer.listener("4537"); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("orderId", 4557); + jsonObject.put("orderDetailIds", new Integer[]{10454, 10455}); + jsonObject.put("isReturn", false); +// printConsumer.printDishesListener(jsonObject); + } + + public static void main(String[] args) { + + } +}