package com.lightinit.hsdataplatform.controller.admin;

import com.lightinit.hsdataplatform.model.ResultState;
import com.lightinit.hsdataplatform.model.admin.NameAndValueModel;
import com.lightinit.hsdataplatform.service.admin.IResourceAndUserCountService;
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("/admin/resourceAndUserCount")
public class ResourceAndUserCountController {
    @Autowired
    private IResourceAndUserCountService resourceAndUserCountService;

    @RequestMapping("index.htm")
    public ModelAndView index () {
        ModelAndView modelAndView = new ModelAndView("/admin/resourceAndUserCount/index");
        return modelAndView;
    }

    @RequestMapping("list.action")
    @ResponseBody
    public List<NameAndValueModel> list() {
        List<NameAndValueModel> list = resourceAndUserCountService.queryList();
        return list;
    }
    @RequestMapping("list2.action")
    @ResponseBody
    public List<NameAndValueModel> list2() {
        List<NameAndValueModel> list = resourceAndUserCountService.queryList2();
        return list;
    }
    @RequestMapping("list3.action")
    @ResponseBody
    public List<NameAndValueModel> list3() {
        List<NameAndValueModel> list = resourceAndUserCountService.queryList3();
        return list;
    }

    @RequestMapping("list4.action")
    @ResponseBody
    public List<NameAndValueModel> list4() {
        List<NameAndValueModel> list = resourceAndUserCountService.queryList4();
        return list;
    }
}
