package com.ho.business.controller;

import com.ho.business.service.VirtualDeviceConfigService;
import com.ho.business.vo.VirtuallyModel;
import com.ho.common.tools.annotation.LogAnnotation;
import com.ho.common.tools.constant.ContextConstant;
import com.ho.common.tools.exception.DataResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author gyan
 * @desc: TODO
 * @DateTime: 2024/3/5 14:49
 */
@RestController
@RequestMapping(ContextConstant.BUSINESS + "virtual")
@Api(tags = "虚拟设备点一键绑定模块")
@Slf4j
public class VirtualDeviceConfigController {
    @Autowired
    VirtualDeviceConfigService virtualDeviceConfigService;

    @PostMapping("getVirtualList")
    @ApiOperation(value = "新增虚拟设备点一键关联接口")
    @LogAnnotation(title = "虚拟设备关系模块", action = "新增虚拟设备点一键关联接口")
    public DataResult getVirtualList(@RequestBody @Valid VirtuallyModel model) {
        virtualDeviceConfigService.getVirtualList(model);
        return DataResult.success();
    }
}