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

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

/**
 * @ClassName UrbanInvestmentPlatformController
 * @Description 城投平台
 * @Author Dgm
 * @Date 2023/5/18 10:09
 * @Version 1.0.0
 */
@RestController
@RequestMapping(value ="/urbanInvestment")
public class UrbanInvestmentPlatformController {

    @Autowired
    private UrbanInvestmentPlatformService urbanInvestmentPlatformService;

    /***
     *@Description: 城投平台分页列表
     *@Param:
     *@return: com.dsk.common.core.domain.AjaxResult
     *@Author: Dgm
     *@date: 2023/5/18 10:29
     */
    @PostMapping("/page")
    public AjaxResult page(@RequestBody UrbanInvestmentPlatformDto dto) {
        return urbanInvestmentPlatformService.page(dto);
    }

    /***
     *@Description: 城投平台详情
     *@Param:
     *@return: com.dsk.common.core.domain.AjaxResult
     *@Author: Dgm
     *@date: 2023/5/18 10:29
     */
    @PostMapping("/details/{id}")
    public AjaxResult details(@PathVariable("id") String id) {
        return urbanInvestmentPlatformService.details(id);
    }


    /***
     *@Description: 城投平台统计
     *@Param:
     *@return: com.dsk.common.core.domain.AjaxResult
     *@Author: Dgm
     *@date: 2023/5/18 10:29
     */
    @PostMapping("/statistics")
    public AjaxResult statistics(@RequestBody UrbanInvestmentPlatformDto dto) {
        return urbanInvestmentPlatformService.statistics(dto);
    }
}
