package com.zy.asrs.controller; import com.core.common.R; import com.zy.common.model.WatchModel; import com.zy.common.service.WatchService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController public class WatchController { @Autowired private WatchService watchService; @GetMapping("/watch/findAll") public R findAll() { List list = watchService.getList(); return R.ok().add(list); } @GetMapping("/watch/fake") public R fake() { watchService.push("101站点", "入库信号满足,托盘码为空"); watchService.push("102站点", "测试数据"); watchService.push("103站点", "测试数据2"); return R.ok(); } }