package com.xhkjedu.slive.service.liveplay;

import com.xhkjedu.slive.mapper.liveplay.CourseSectionAskteacherMapper;
import com.xhkjedu.slive.model.liveplay.LCourseSectionAskteacher;
import com.xhkjedu.utils.N_Utils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author ywx
 * @classname CSAskTeacherService
 * @description 
 * @date 2021/6/16 10:35
 **/
@Service
public class CSAskTeacherService {
    @Resource
    private CourseSectionAskteacherMapper courseSectionAskteacherMapper;

    //添加
    public void save(LCourseSectionAskteacher ask) {
        ask.setCreatetime(N_Utils.getSecondTimestamp());
        /*courseSectionAskteacherMapper.insertUseGeneratedKeys(ask);
        return ask.getId();*/
        courseSectionAskteacherMapper.insertSelective(ask);
    }

    //设置答案
    public void setAnswer(LCourseSectionAskteacher ask) {
        courseSectionAskteacherMapper.setAnswer(ask);
    }
}
