package com.lightinit.hsdatashow.controller.admin;

import com.lightinit.hsdatashow.model.admin.CulturalFalitiesListModel;
import com.lightinit.hsdatashow.model.admin.EducationalPortraitListModel;
import com.lightinit.hsdatashow.model.admin.SpreadListModel;
import com.lightinit.hsdatashow.service.admin.IPublicService;
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;

@Controller
@RequestMapping(value = "/admin/publish")
public class PublishController {
    @Autowired
    private IPublicService publicService;

    @RequestMapping(value = "/index.htm")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("admin/publish/index") ;
        return modelAndView ;
    }
    @RequestMapping(value = "/getComprehensive.action")
    @ResponseBody
    public SpreadListModel getComprehensive(){
        SpreadListModel model = publicService.getComprehensive();
        return model;
    }
    @RequestMapping(value = "/getPublicSentiment.action")
    @ResponseBody
    public CulturalFalitiesListModel getPublicSentiment(){
        CulturalFalitiesListModel model = publicService.getPublicSentiment();
        return model;
    }
    @RequestMapping(value = "/getPublicSentiment1.action")
    @ResponseBody
    public CulturalFalitiesListModel getPublicSentiment1(){
        CulturalFalitiesListModel model = publicService.getPublicSentiment1();
        return model;
    }

}
