package com.lightinit.hsdataplatform.controller.admin;

import com.lightinit.hsdataplatform.model.admin.CatelogCountListModel;
import com.lightinit.hsdataplatform.model.admin.CatelogCountSearchModel;
import com.lightinit.hsdataplatform.service.admin.ICatelogCountService;
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;

@Controller
    @RequestMapping(value = "/admin/catelogCount")
public class CatelogCountCountroller extends BaseController {
    @Autowired
    private ICatelogCountService  catelogCountService;
    @RequestMapping(value = "index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("admin/access_statistics/catelogCount");
        return modelAndView;
    }

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

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

}
