package com.dsk.jsk.controller;

import cn.hutool.json.JSONObject;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.jsk.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @ClassName IndexController
 * @Description TODO
 * @Author Dgm
 * @Date 2023/8/15 12:01
 * @Version 1.0
 */
@RestController
@RequestMapping("/index")
public class IndexController {

    @Autowired
    private IndexService enterpriseService;

    @PostMapping(value = "bigWinningBidsPage")
    public AjaxResult bigWinningBidsPage(@RequestBody JSONObject object) throws Exception {
        return enterpriseService.bigWinningBidsPage(object);
    }

    @PostMapping(value = "bigBidPage")
    public AjaxResult bigBidPage(@RequestBody JSONObject object) throws Exception {
        return enterpriseService.bigBidPage(object);
    }

    @PostMapping("/countByCompany")
    public AjaxResult countByCompany(@RequestBody JSONObject object) {
        return enterpriseService.countByCompany(object);
    }

    @PostMapping("/bidRank")
    public AjaxResult bidRank(@RequestBody JSONObject object) {
        return enterpriseService.bidRank(object);
    }
}
