wu
2024-04-09 b35cea7a306c107eb38e024ea39f6351014ce799
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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;
 
    /**
     * @param id
     * @return
     * // 获取指定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();  // 返回消息列表的字符串表示形式
//    }
 
 
 
 
}