package com.xhkjedu.slive.controller.liveplay;

import com.xhkjedu.slive.model.liveplay.LCourseSectionAskstudent;
import com.xhkjedu.slive.service.liveplay.CSAskStudentService;
import com.xhkjedu.utils.N_Utils;
import com.xhkjedu.vo.ResultVo;
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;

import javax.annotation.Resource;

/**
 * @author ywx
 * @classname CSAskStudentController
 * @description 
 * @date 2021/6/16 11:02
 **/
@RestController
@RequestMapping("/csastudent")
public class CSAskStudentController {
    @Resource
    private CSAskStudentService csAskStudentService;

    @PostMapping("/add")
    public ResultVo add(@RequestBody LCourseSectionAskstudent ask) {
        N_Utils.validation(new Object[]{ask.getSatid(),"课节互动id",1,ask.getStudentid(),"学生id",1});
        csAskStudentService.save(ask);
        return new ResultVo(0, "保存成功");
    }
}
