clll
2023-09-06 190cc52625bea627b6266f0124bd0d638f03394c
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
package com.example.springboot.controller;
 
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import com.example.springboot.common.Result;
import com.example.springboot.entity.alarmmg;
import com.example.springboot.mapper.AlarmMapper;
import com.example.springboot.service.AlarmService;
 
@RestController
@RequestMapping("/alarm")
public class AlarmController {
  @Autowired
  AlarmMapper alarmMapper;
 
  @Autowired
  AlarmService alarmService;
 
  @GetMapping("/load")
  public Result selectAll() {
    List<alarmmg> storageCagelist = alarmMapper.selectAll();
    Map<String, Object> map = new HashMap<>();
    map.put("list", storageCagelist);
    return Result.success(map);
  }
 
}