DeviceController.java 1.14 KB
package com.glsx.modules.notify.controller;

import com.glsx.modules.notify.service.DeviceService;
import com.glsx.plat.core.web.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * @author fengzhi
 * @date 2021/4/8 14:14
 */
@Controller
@RequestMapping("/youmeng/notify")
@Api(value = "设备管理", tags = {"设备管理"})
public class DeviceController {
    @Autowired
    private DeviceService deviceService;

    /**
     * 获取用户下的设备列表
     *
     * @return R
     */
    @RequestMapping(value = "/{uid}/devices", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取用户下的设备列表")
    public R getAllDevicesByUser(@PathVariable String uid) {
        return deviceService.getAllDevicesByUser("1");
    }
}