PrintDeviceController.java
780 Bytes
package com.diligrp.mqtt.web.controller;
import com.diligrp.mqtt.web.message.Message;
import com.diligrp.mqtt.core.service.PrintDeviceService;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* @author lvqi
*/
@RestController
@RequestMapping("/device")
public class PrintDeviceController {
@Autowired
PrintDeviceService printDeviceService;
@GetMapping("/info")
public Message<?> getMqttInfo(@RequestParam String sn) {
return Message.success(printDeviceService.queryBySn(sn));
}
}