| | |
| | | import com.moral.service.MonitorPointService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import static com.moral.common.util.WebUtils.getParametersStartingWith; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | |
| | | @RestController |
| | |
| | | List<MonitorPoint> monitorPoints = monitorPointService.getMonitorPointsByName(name); |
| | | return new ResultBean<List<MonitorPoint>>(monitorPoints); |
| | | } |
| | | |
| | | @GetMapping("list/region") |
| | | public ResultBean<List<MonitorPoint>> getMonitorPointsByRegion(HttpServletRequest request) { |
| | | Map<String, Object> parameters = getParametersStartingWith(request, null); |
| | | List<MonitorPoint> monitorPoints = monitorPointService.getMonitorPointsByRegion(parameters); |
| | | return new ResultBean<List<MonitorPoint>>(monitorPoints); |
| | | } |
| | | |
| | | } |