From 939b4eae5a2f459b60ab3e8d17dcf466511a4b66 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 20 十二月 2023 08:11:00 +0800
Subject: [PATCH] 测试更新

---
 springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
index 1b0f721..f638b6c 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -15,7 +15,7 @@
 
 public interface SpianMapper {
     // 鍒ゆ柇鐩搁偦绗煎瓙鏄惁鏈夌┖鏍�
-    @Select("select COUNT(if(a.state1=0,cell,null))as cell,ROUND(id/2)as id from (select *,max(state)as state1 from storage_cage a  GROUP BY cage,cell)as a where (a.cage=#{cage1}-1 or a.cage=#{cage1}+1)and if(a.cage<6,a.cage>0 and a.cage<6,a.cage>5) and disabled=0 GROUP BY cage ORDER BY cell desc LIMIT 1")
+    @Select("select COUNT(if(a.state1=0,cell,0))as cell,ROUND(id/2)as id from (select *,max(state)as state1 from storage_cage a  GROUP BY cage,cell)as a where (a.cage=#{cage1}-1 or a.cage=#{cage1}+1)and if(a.cage<6,a.cage>0 and a.cage<6,a.cage>5) and disabled=0 GROUP BY cage ORDER BY cell desc LIMIT 1")
     int selectCage(int cage1);
 
     // @Select("(select*from storage_cage as a where a.state=0 and cage%2=0 ORDER BY
@@ -42,7 +42,7 @@
     StorageCage selectCage1(int cage1, int cell, double width);
 
     // 鍒ゆ柇绗煎瓙鍐呯幓鐠冩暟
-    @Select("select COUNT(tier)as tier from storage_cage where  cage=#{cage} and cell=#{cell} and state!=0;")
+    @Select("select COUNT(tier)as tier from storage_cage where  cage=#{cage} and cell=#{cell} and state=1;")
     int selectsum(int cage, int cell);
 
     // 瀹屾垚杩涚墖涓殑鐜荤拑鐘舵��
@@ -77,7 +77,7 @@
     StorageCage selectGlassCage(int cage, double width, int cage1, int cage2);
 
     // 鍒犻櫎绗煎瓙淇℃伅(鍑虹墖)
-    @Update("update storage_cage as a set state=#{state},glass_id=null,order_id=null,glasswidth=0,a.glassheight=null,a.glasswidthmm=null,a.glassheightmm=null,a.listid=null,a.boxid=null where glass_id=#{glassid} and state=3;")
+    @Update("update storage_cage as a set state=#{state},glass_id=null,order_id=null,glasswidth=null,a.glassheight=null,a.glasswidthmm=null,a.glassheightmm=null,a.listid=null,a.boxid=null where glass_id=#{glassid} and state=3;")
     void UpdataGlassCage(String glassid, int state);
 
     // 鏀瑰彉鐜荤拑鐘舵�佷负鍑虹墖涓�
@@ -109,7 +109,7 @@
     void UpdataOutCage1(double width, int cage, int cell);
 
     // 璋冩嫧鏇存崲绗煎瓙淇℃伅
-    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=#{tier})as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth,a.glassheight=b.glassheight,a.glasswidthmm=b.glasswidthmm,a.glassheightmm=b.glassheightmm,a.listid=b.listid,a.boxid=b.boxid where a.id=#{id1}")
+    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=#{tier})as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=2,a.glasswidth=b.glasswidth,a.glassheight=b.glassheight,a.glasswidthmm=b.glasswidthmm,a.glassheightmm=b.glassheightmm,a.listid=b.listid,a.boxid=b.boxid where a.id=#{id1}")
     void UpdateDBCage(int id1, int cage, int cell, int tier);
 
     // @Insert("insert into user(name, date, address, user_no) values (#{name},
@@ -231,4 +231,7 @@
     // 鎶婅杩涚墖鐨勭幓鐠冩洿鏂板埌鍑虹墖闃熷垪
     @Select("update out_slice set state=0 where glassId=#{glassId} and state=3")
     void UpdateAddQueue(String glassId);
-}
+    //鏂板鏃ュ織琛ㄦ牸
+    @Insert("INSERT INTO `canadames`.`log`( `text`,time) VALUES (#{logtxt},now());")
+    void insertlog(String logtxt);
+}
\ No newline at end of file

--
Gitblit v1.8.0