package com.liquidnet.client.admin.web.controller.zhengzai.kylin;

import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.client.admin.zhengzai.kylin.domain.KylinPerformances;
import com.liquidnet.client.admin.zhengzai.kylin.service.IKylinPerformancesService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author AnJiabin <anjiabin@zhengzai.tv>
 * @version V1.0
 * @Description: TODO
 * @class: PerformanceCalendar
 * @Package com.liquidnet.client.admin.web.controller.zhengzai.kylin
 * @Copyright: LightNet @ Copyright (c) 2021
 * @date 2021/5/24 19:58
 */
@Controller
@RequestMapping("/kylin/performanceCalendar")
public class PerformanceCalendarController extends BaseController{
    private String prefix = "zhengzai/kylin/performanceCalendar";

    @Autowired
    private IKylinPerformancesService kylinPerformancesService;

    @RequiresPermissions("kylin:performanceCalendar:view")
    @GetMapping()
    public String performances()
    {
        return prefix + "/performanceCalendar";
    }

    /**
     * 查询演出列表
     */
    @RequiresPermissions("kylin:performanceCalendar:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(KylinPerformances kylinPerformances)
    {
        startPage();
        List<KylinPerformances> list = kylinPerformancesService.selectKylinPerformancesList(kylinPerformances);
        return getDataTable(list);
    }
}
