From ce7da2e967f19e7e5543c25e91b7a759a6f360a5 Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期三, 01 十一月 2023 10:31:50 +0800 Subject: [PATCH] 按要求修改主页面上片队列显示及操作 --- springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java index 5f6f1f4..7d20171 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java +++ b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java @@ -219,11 +219,35 @@ //鎵嬪姩娣诲姞鎵爜浣嶇幓鐠� @PostMapping("/InsertQueueGlassId") - public Result InsertQueueGlassId(String glassid) { - homeMapper.InsertQueueGlassId(glassid); + public Result InsertQueueGlassId(String glassid,Short id) { + Map<String, Object> map = new HashMap<>(); + short result = homeMapper.SelectStorageByGlassId(glassid); + if (result > 0) { + map.put("message", "300"); + }else{ + homeMapper.InsertQueueGlassId(glassid,id); + map.put("message", "200"); + } + return Result.success(map); + } + + //纭鎵爜浣嶇幓鐠冧俊鎭� + @PostMapping("/UpdateQueueState") + public Result UpdateQueueState() { + homeMapper.UpdateQueueState(); Map<String, Object> map = new HashMap<>(); map.put("message", "200"); return Result.success(map); } + + //娓呴櫎涓婄墖闃熷垪鐜荤拑 + @PostMapping("/DeleteQueueGlass") + public Result DeleteQueueGlass(String id) { + homeMapper.DeleteQueueGlass(id); + Map<String, Object> map = new HashMap<>(); + map.put("message", "200"); + return Result.success(map); + } + } -- Gitblit v1.8.0