package com.wsm.admin.api;

import com.wsm.admin.service.IDeviceService;
import com.wsm.common.api.BaseController;
import com.wsm.common.util.AjaxJson;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/device")
public class ApiDeviceController extends BaseController {

    private Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private IDeviceService deviceService;

    /**
     * 获取所有的设备信息
     * @return
     */
    @RequestMapping(value = {"/list"})
    public AjaxJson list() {
       return AjaxJson.success(deviceService.findAll());
    }
}
