package com.lightinit.hsdataplatform.controller.admin;

import com.lightinit.hsdataplatform.model.admin.CatelogCountListModel;
import com.lightinit.hsdataplatform.model.admin.CatelogCountSearchModel;
import com.lightinit.hsdataplatform.model.admin.SectorCountListModel;
import com.lightinit.hsdataplatform.model.admin.SectorCountSearchModel;
import com.lightinit.hsdataplatform.service.admin.ISectorCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;
@RequestMapping(value = "/admin/SectorCount")
@Controller
public class SectorCountController extends BaseController {
    @Autowired
    private ISectorCountService sectorCountService;
    @RequestMapping(value = "index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("admin/access_statistics/sectorCount");
        return modelAndView;
    }

    @RequestMapping(value = "list.action")
    public ModelAndView list(SectorCountSearchModel inputModel) {
        ModelAndView modelAndView = new ModelAndView("admin/access_statistics/sectorCountList");

        List<SectorCountListModel> outputModel = sectorCountService.queryList(inputModel);
        modelAndView.addObject("list", outputModel);
        return modelAndView;
    }
}
