package com.ruoyi.interfaces.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.interfaces.service.ServiceDataViewService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/pt/service/dataView")
public class PtServiceDataViewController extends BaseController {

    private final ServiceDataViewService service;

    public PtServiceDataViewController(ServiceDataViewService service) {
        this.service = service;
    }

    @RequestMapping(value = "/{srvId}")
    public AjaxResult dataView(@PathVariable("srvId") String srvId) {
        return AjaxResult.success(service.getDataView(srvId));
    }

}
