From 2f0370645ddd5cabfecd77238f6e38c05cd6a466 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期四, 19 九月 2024 08:06:29 +0800
Subject: [PATCH] liquibase使用说明:1、changeset zsh:20240904003 设置创建者及序号id(唯一不能重复) preconditions onFail:CONTINUE onError:CONTINUE 设置异常错误规则 precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_dict_type 设置sql执行的前置条件,符合执行,不符合直接结束 2、建表sql判断表是否存在需要在表名的基础上加库限制:SELECT count(1) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'raw_glass_storage_station' and table_schema = 'hangzhoumes'; 防止因为同一连接其他库已有该表造成无法创建表或者重复建表的情况发生。
---
hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java
index 05ad286..c567a90 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java
@@ -28,8 +28,16 @@
@Test
public void testFindPa() {
- List<TemperingGlassInfo> glass = temperingAgoService.selectIntoGlass(12);
- log.info("杩涚倝涓殑鐜荤拑锛歿}", Arrays.asList(glass));
+ List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId();
+ if(!layoutId.isEmpty()) {
+ List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0));
+ log.info("宸插嚭涓殑鐜荤拑锛歿}", Arrays.asList(intoGlass));
+ //杩涚倝涓殑绗簩涓増鍥�
+ if (layoutId.size() > 1) {
+ List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1));
+ log.info("宸插嚭涓殑鐜荤拑锛歿}", Arrays.asList(intoGlass2));
+ }
+ }
}
@Test
public void testFindPa2() {
@@ -46,15 +54,5 @@
public void testFindPa4() {
List<TemperingGlassInfo> glass = temperingAgoService.selectOverGlass();
log.info("閽㈠寲鍚庣殑鐜荤拑锛歿}", Arrays.asList(glass));
- }
- @Test
- public void testFindPa5() {
- List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId();
- //杩涚倝涓殑鐜荤拑
- log.info("鐗堝浘id锛歿}", Arrays.asList(layoutId.get(0).getTemperingLayoutId()));
- List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0).getTemperingLayoutId());
- log.info("鐜荤拑鐗堝浘id锛歿}", Arrays.asList(intoGlass));
- List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1).getTemperingLayoutId());
- log.info("鐜荤拑鐗堝浘id锛歿}", Arrays.asList(intoGlass2));
}
}
--
Gitblit v1.8.0