| | |
| | | import com.zy.core.utils.DeviceMsgUtils; |
| | | import com.zy.core.utils.FakeDeviceUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/open") |
| | | public class OpenController { |
| | | |
| | | @Value("${deviceMsgConfig.gatewayId}") |
| | | private Integer gatewayId; |
| | | @Value("${deviceMsgConfig.gatewayPort}") |
| | | private Integer gatewayPort; |
| | | |
| | | @Autowired |
| | | private DeviceMsgUtils deviceMsgUtils; |
| | | @Autowired |
| | | private FakeDeviceUtils fakeDeviceUtils; |
| | | |
| | | @GetMapping("/getSystemInfo") |
| | | public R getSystemInfo() { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("gatewayId", gatewayId); |
| | | map.put("gatewayPort", gatewayPort); |
| | | return R.ok().add(map); |
| | | } |
| | | |
| | | @GetMapping("/getDeviceList") |
| | | public R getDeviceList() { |
| | | List<DeviceConfig> deviceList = new ArrayList<>(); |