package com.ym.mec.education.controller;

import com.ym.mec.education.base.BaseResponse;
import com.ym.mec.education.base.PageResponse;
import com.ym.mec.education.req.VipGroupReq;
import com.ym.mec.education.service.IVipGroupService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: mec
 * @description: 小课(VIP课)
 * @author: xw
 * @create: 2019-09-30 20:16
 */
@RestController
@RequestMapping("api/vipGroup")
@Api(tags = "小课")
public class VipGroupController {

    @Autowired
    private IVipGroupService vipGroupService;

    @PostMapping("/info")
    @ApiOperation("小课详情-头信息")
    public BaseResponse info(@RequestBody VipGroupReq vipGroupReq) {
        return vipGroupService.getInfo(vipGroupReq);
    }
    @PostMapping("/courseList")
    @ApiOperation("小课详情-课表")
    public PageResponse courseList(@RequestBody VipGroupReq vipGroupReq){

        return vipGroupService.courseList(vipGroupReq);

    }

    @PostMapping("/attendanceList")
    @ApiOperation("小课详情-点名记录")
    public PageResponse attendanceList(@RequestBody VipGroupReq vipGroupReq){

        return vipGroupService.attendanceList(vipGroupReq);

    }
}
