package com.dsk.web.controller.search.macroMarket;

import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.dtos.OpRegionalEconomicDataV1Dto;
import com.dsk.system.service.EconomicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * @ClassName RegionalEconomicDataController
 * @Description 区域经济大全
 * @Author Dgm
 * @Date 2023/5/18 10:09
 * @Version 1.0.0
 */
@RestController
@RequestMapping(value ="/economic")
public class RegionalEconomicDataController {

    @Autowired
    private EconomicService economicService;

    /***
     *@Description: 全国经济大全分页列表
     *@Param:
     *@return: com.dsk.common.core.domain.AjaxResult
     *@Author: Dgm
     *@date: 2023/5/18 10:29
     */
    @PostMapping("/national/nationalPage")
    public AjaxResult nationalPage(@RequestBody OpRegionalEconomicDataV1Dto dto) {
        return economicService.nationalPage(dto);
    }

    /***
     *@Description: 全国经济大全详情
     *@Param:
     *@return: com.dsk.common.core.domain.AjaxResult
     *@Author: Dgm
     *@date: 2023/5/18 10:29
     */
    @GetMapping("/details/{id}")
    public AjaxResult details(@PathVariable("id") Integer id) {
        return economicService.details(id);
    }


    /***
     *@Description: 地区经济-统计
     *@Param:
     *@return: com.dsk.common.core.domain.AjaxResult
     *@Author: Dgm
     *@date: 2023/5/18 10:29
     */
    @PostMapping("/statistics/regional")
    public AjaxResult statisticsRegional(@RequestBody OpRegionalEconomicDataV1Dto dto) {
        return economicService.statisticsRegional(dto);
    }

    /***
     *@Description: 地区经济-主要指标列表
     *@Param:
     *@return: com.dsk.common.core.domain.AjaxResult
     *@Author: Dgm
     *@date: 2023/5/18 10:29
     */
    @PostMapping("/regional/list")
    public AjaxResult regionalList(@RequestBody OpRegionalEconomicDataV1Dto dto) {
        return economicService.regionalList(dto);
    }


}
