package com.lightinit.hsdatashow.controller.admin;

import com.lightinit.hsdatashow.entity.EnvironmentalQuality;
import com.lightinit.hsdatashow.mapper.ConsumeMapper;
import com.lightinit.hsdatashow.mapper.ConsumptionMapper;
import com.lightinit.hsdatashow.model.admin.ConsumeListModel;
import com.lightinit.hsdatashow.model.admin.CulturalFalitiesListModel;
import com.lightinit.hsdatashow.model.admin.EnvironmentalGovernanceGdpListModel;
import com.lightinit.hsdatashow.model.admin.SpreadListModel;
import com.lightinit.hsdatashow.service.admin.IEcologicalCivilizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Controller
@RequestMapping(value = "/admin/EcologicalCivilization")
public class EcologicalCivilizationControllerr {
    @Autowired
    private IEcologicalCivilizationService ecologicalCivilizationService;
    @RequestMapping(value = "/index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("admin/ecologicalCivilization/index") ;
        return modelAndView ;
    }
    @RequestMapping(value = "/getConsume.action")
    @ResponseBody
    public ConsumeListModel getConsume() {
        ConsumeListModel model = ecologicalCivilizationService.getConsume();
        return model;
    }

    @RequestMapping(value = "/getEnvironmentalQuality.action")
    @ResponseBody
    public List<EnvironmentalQuality> getEnvironmentalQuality() {
        List<EnvironmentalQuality> model = ecologicalCivilizationService.getEnvironmentalQuality();
        return model;
    }

    @RequestMapping(value = "/getEnvironmentalGovernanceGdp.action")
    @ResponseBody
    public EnvironmentalGovernanceGdpListModel getEnvironmentalGovernanceGdp() {
        EnvironmentalGovernanceGdpListModel model = ecologicalCivilizationService.getEnvironmentalGovernanceGdp();
        return model;
    }
    @RequestMapping(value = "/getDealWithTheStandard.action")
    @ResponseBody
    public SpreadListModel getDealWithTheStandard() {
        SpreadListModel model = ecologicalCivilizationService.getDealWithTheStandard();
        return model;
    }
}
