package com.project.zcustom.controller.service;

import com.project.common.core.controller.BaseController;
import com.project.common.core.domain.AjaxResult;
import com.project.zcustom.service.service.property.IPlatPropertyListService;
import com.project.zcustom.service.service.property.IPlatPropertyService;
import com.project.zcustom.service.service.property.IPlatPropertyToolsService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 共享驿站Controller
 *
 * @author change
 * @date 2024-10-21
 */

@RestController
@RequestMapping("/large/property")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class PlatPropertyController extends BaseController {

    private final IPlatPropertyService platPropertyService;
    private final IPlatPropertyListService platPropertyListService;
    private final IPlatPropertyToolsService platPropertyToolsService;


    @RequestMapping("/getOverviewData")
    public AjaxResult getOverviewData(@RequestParam String appOrg) {
        return AjaxResult.success("查询成功", platPropertyService.getOverviewData(appOrg));
    }


    @RequestMapping("/getPropertyList")
    public AjaxResult getPropertyList(@RequestParam String appOrg) {
        return AjaxResult.success("查询成功", platPropertyListService.selectServerListByAppOrg(appOrg));
    }


    @RequestMapping("/getSelfTestAndConsultation")
    public AjaxResult getSelfTestAndConsultation(@RequestParam String appOrg) {
        return AjaxResult.success("查询成功", platPropertyToolsService.getToolsChartsList(appOrg));
    }
}
