package com.ruoyi.web.controller.zhdd;

/**
 * @Description: TODO
 * @Author: huangcheng
 * @Date: 2022/1/19
 * @Version V1.0
 */

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.zhdd.service.IDhService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Validated
@Api(value = "大华接口控制器", tags = {"大华接口控制器"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/zhdd/dh")
public class DhController {

    private final IDhService dhService;

    @ApiOperation("查询设备列表")
    @GetMapping("/deviceList")
    public AjaxResult list() {
        return AjaxResult.success(dhService.getDeviceTree());
    }
}
