From dc7f1d12fa03f487232a00d62cdbec42fdd39d5a Mon Sep 17 00:00:00 2001 From: 严智鑫 <test> Date: 星期四, 18 四月 2024 14:40:54 +0800 Subject: [PATCH] 代码丢失重新提交 --- hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/controller/EdgStorageCageController.java | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 45 insertions(+), 8 deletions(-) diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/controller/EdgStorageCageController.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/controller/EdgStorageCageController.java index 020a22d..5e3bed7 100644 --- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/controller/EdgStorageCageController.java +++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/controller/EdgStorageCageController.java @@ -1,9 +1,19 @@ package com.mes.edgstoragecage.controller; +import com.mes.edgstoragecage.entity.EdgStorageCage; +import com.mes.edgstoragecage.service.EdgStorageCageService; +import com.mes.edgstoragecage.service.impl.EdgStorageCageServiceImpl; +import com.mes.taskcache.entity.TaskCache; +import com.mes.taskcache.service.impl.TaskCacheServiceImpl; +import com.mes.utils.Result; import io.swagger.annotations.ApiOperation; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.awt.image.ImageProducer; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * <p> @@ -17,11 +27,38 @@ @RequestMapping("/edgStorageCage") public class EdgStorageCageController { - //todo: 瀹炰緥浠g爜 寰呭垹闄� - @ApiOperation("娴嬭瘯") - @GetMapping("/index") - public String index() { - return "hello world"; + @Autowired + private EdgStorageCageServiceImpl edgStorageCageServiceImpl; + + + //鏌ヨ纾ㄨ竟缂撳瓨鐞嗙墖绗煎唴璇︽儏 + @PostMapping("/selectEdgStorageCage") + @ResponseBody + public Result selectEdgStorageCage () { + List<Map> list=edgStorageCageServiceImpl.selectEdgStorageCages(); + return Result.build(200,"鎴愬姛",list); + } + //娣诲姞纾ㄨ竟缂撳瓨鐞嗙墖绗间俊鎭� 鍔熻兘锛氱鍐呯粦瀹氱幓鐠� + @PostMapping("/insertEdgStorageCage") + @ResponseBody + public Result insertEdgStorageCage(@RequestBody EdgStorageCage edgStorageCage) { + boolean isSucess=edgStorageCageServiceImpl.updateEdgStorageCage(edgStorageCage); + return Result.build(200,"娣诲姞鎴愬姛",1); + } + //淇敼纾ㄨ竟缂撳瓨鐞嗙墖绗间俊鎭� 鍔熻兘锛氬绗煎唴鏍呮牸杩涜銆愬惎鐢�/绂佺敤銆�/ 銆愭洿鎹€�戠鍐呮爡鏍肩幓鐠冧俊鎭� + @PostMapping("/updateEdgStorageCage") + @ResponseBody + public Result updateEdgStorageCage(@RequestBody EdgStorageCage edgStorageCage) { + boolean isSucess=edgStorageCageServiceImpl.updateEdgStorageCage(edgStorageCage); + return Result.build(200,"鏇存崲鎴愬姛",1); + } + + //鍒犻櫎纾ㄨ竟缂撳瓨鐞嗙墖绗间俊鎭� 鍔熻兘锛氬绗煎唴鏍呮牸鐜荤拑杩涜銆愭竻闄ゃ�� + @PostMapping("/deleteEdgStorageCage") + @ResponseBody + public Result deleteEdgStorageCage(@RequestBody EdgStorageCage edgStorageCage) { + boolean isSucess=edgStorageCageServiceImpl.updateEdgStorageCage(edgStorageCage); + return Result.build(200,"鍒犻櫎鎴愬姛",1); } } -- Gitblit v1.8.0