package com.xunmei.core.access.controller;

import java.util.List;

import com.xunmei.common.core.web.page.TableDataInfo;
import com.xunmei.core.access.domain.CoreMonitoringTaskRegistration;
import com.xunmei.core.access.dto.CoreMonitoringTaskRegistrationDTO;
import com.xunmei.core.access.service.ICoreMonitoringTaskRegistrationMonitorService;
import com.xunmei.core.access.service.ICoreMonitoringTaskRegistrationService;
import com.xunmei.core.access.vo.CoreMonitoringTaskRegistrationVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xunmei.common.log.annotation.Log;
import com.xunmei.common.log.enums.BusinessType;
import com.xunmei.common.security.annotation.RequiresPermissions;

import com.xunmei.common.core.web.controller.BaseController;
import com.xunmei.common.core.web.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;


/**
 * 【请填写功能名称】Controller
 *
 * @author xunmei
 * @date 2023-08-28
 */
@Api(tags = {"CoreMonitoringTaskRegistration"})
@RestController
@RequestMapping("/registration")
public class CoreMonitoringTaskRegistrationController extends BaseController {
    @Autowired
    private ICoreMonitoringTaskRegistrationService coreMonitoringTaskRegistrationService;
    @Autowired
    private ICoreMonitoringTaskRegistrationMonitorService coreMonitoringTaskRegistrationMonitorService;

    /**
     * 查询【请填写功能名称】列表
     */
    @ApiOperation(value = "查询CoreMonitoringTaskRegistration列表")
    @RequiresPermissions("system:registration:list")
    @GetMapping("/list")
    public AjaxResult list(CoreMonitoringTaskRegistration coreMonitoringTaskRegistration) {
        return success(coreMonitoringTaskRegistrationMonitorService.selectCoreMonitoringTaskRegistrationList(coreMonitoringTaskRegistration.getTaskId()));
    }

    /**
     * 获取【请填写功能名称】详细信息
     */
    @ApiOperation(value = "获取CoreMonitoringTaskRegistration详细信息")
    @RequiresPermissions("system:registration:query")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(coreMonitoringTaskRegistrationService.selectCoreMonitoringTaskRegistrationById(id));
    }

    /**
     * 新增【调阅任务登记NCF开始】
     */
    @ApiOperation(value = "新增CoreMonitoringTaskRegistration")
    @RequiresPermissions("system:registration:add")
    @Log(title = "【调阅任务登记NCF开始】", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody CoreMonitoringTaskRegistration coreMonitoringTaskRegistration) {
        return toAjax(coreMonitoringTaskRegistrationService.insertCoreMonitoringTaskRegistration(coreMonitoringTaskRegistration));
    }

    /**
     * 修改【请填写功能名称】
     */
    @ApiOperation(value = "修改CoreMonitoringTaskRegistration")
    @RequiresPermissions("system:registration:edit")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody CoreMonitoringTaskRegistration coreMonitoringTaskRegistration) {
        return toAjax(coreMonitoringTaskRegistrationService.updateCoreMonitoringTaskRegistration(coreMonitoringTaskRegistration));
    }
    /*
     *//**
     * 删除【请填写功能名称】
     *//*
    @ApiOperation(value = "删除CoreMonitoringTaskRegistration")
    @RequiresPermissions("system:registration:remove")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(coreMonitoringTaskRegistrationService.deleteCoreMonitoringTaskRegistrationByIds(ids));
    }*/
}
