wang
2024-03-28 04adb88a2ed54cdf4c2958c79972c30109b9b5b6
UnLoadGlassModule/src/main/java/com/mes/controller/DownGlassInfoController.java
New file
@@ -0,0 +1,40 @@
package com.mes.controller;
import com.mes.entity.DownGlassInfo;
import com.mes.service.DownGlassInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/downGlassInfo")
public class DownGlassInfoController {
    @Autowired
    private DownGlassInfoService downGlassInfoService;
    // 获取指定ID的DownGlassInfo信息
    @GetMapping("/{id}")
    public DownGlassInfo getDownGlassInfoById(@PathVariable Integer id) {
        return downGlassInfoService.getDownGlassInfoById(id);
    }
//    @GetMapping("/messages")
//    public String getMessages() throws IOException, TimeoutException {
//        List<String> messages = new ArrayList<>();
//        try {
//            messages = RabbitMQUtils.browseMessages("hangzhou2");
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        return messages.toString();  // 返回消息列表的字符串表示形式
//    }
}