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


import cn.hutool.core.bean.BeanUtil;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.dtos.UrbanInvestmentPlatformDto;
import com.dsk.system.domain.OpUipFinancialData;
import com.dsk.system.service.UrbanInvestmentPlatformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @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();
        Map<String, Object> map = BeanUtil.beanToMap(new OpUipFinancialData(), false, false);
        // 招标
        map.put("biddingAnnouncement", 11);
        // 供应商
        map.put("supplier", 33);
        // 土地
        map.put("landInfo",  66);
        return new AjaxResult(HttpStatus.OK.value(), "", map);
    }

    /***
     *@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);
    }
}
