wuyouming666
2024-04-22 d7eb95da29eed4722b8321a469a5980fad67501a
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageDetailsController.java
@@ -3,14 +3,17 @@
import com.mes.downstorage.entity.DownStorageCageDetails;
import com.mes.downstorage.service.DownStorageCageDetailsService;
import com.mes.downstorage.service.DownStorageCageService;
import com.mes.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@Api(tags = "缓存")
@RestController
@RequestMapping("/api/unLoadGlass/downstorage")
@RequestMapping("/downStorage")
public class DownStorageCageDetailsController {
    @Autowired
@@ -24,21 +27,46 @@
        return "Details added successfully";
    }
    @GetMapping("/leisure")
    public List<Map> getLeisureData() {
        return downStorageCageService.getCacheInfo();
    //查询磨边缓存理片笼内详情
    @ApiOperation("查询缓存理片笼内详情")
    @GetMapping("/selectStorageCage")
    @ResponseBody
    public Result selectEdgStorageCage () {
        List<Map> list=downStorageCageService.getCacheInfo();
        return Result.build(200,"成功",list);
    }
    private static final int START_VALUE = 0;
    private static final int END_VALUE = 5;
    @GetMapping("/leisure2")
    public List<Map> getLeisureData2() {
        // 调用Service层获取数据
        return downStorageCageService.getCacheOut(START_VALUE, END_VALUE);
    @ApiOperation("添加缓存理片笼信息   功能:笼内绑定玻璃  参数(DownStorageCageDetails downStorageCageDetails)")
    @PostMapping("/insertEdgStorageCage")
    @ResponseBody
    public Result insertEdgStorageCage(@RequestBody DownStorageCageDetails downStorageCageDetails) {
        boolean isSucess=downStorageCageDetailsService.updatedownStorageCageDetails(downStorageCageDetails);
        return Result.build(200,"添加成功",1);
    }
    @ApiOperation("修改缓存理片笼信息   功能:对笼内栅格进行【启用/禁用】/ 【更换】笼内栅格玻璃信息")
    @PostMapping("/updateEdgStorageCage")
    @ResponseBody
    public Result updateEdgStorageCage(@RequestBody DownStorageCageDetails downStorageCageDetails) {
        boolean isSucess=downStorageCageDetailsService.updatedownStorageCageDetails(downStorageCageDetails);
        return Result.build(200,"更换成功",1);
    }
    @ApiOperation("删除缓存理片笼信息   功能:对笼内栅格玻璃进行【清除】")
    @PostMapping("/deleteEdgStorageCage")
    @ResponseBody
    public Result deleteEdgStorageCage(@RequestBody DownStorageCageDetails downStorageCageDetails) {
        boolean isSucess=downStorageCageDetailsService.updatedownStorageCageDetails(downStorageCageDetails);
        return Result.build(200,"删除成功",1);
    }
//
    // Other CRUD operations can be defined here
}