package com.xhkjedu.slive.service.liveplay;

import com.xhkjedu.slive.mapper.liveplay.CourseSectionHistoryMapper;
import com.xhkjedu.slive.model.liveplay.LCourseSectionHistory;
import com.xhkjedu.utils.N_Utils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author ywx
 * @classname CourseSectionHistoryService
 * @description 
 * @date 2021/08/31 17:05
 **/
@Service
@Slf4j
public class CourseSectionHistoryService {
    @Resource
    private CourseSectionHistoryMapper courseSectionHistoryMapper;

    //添加
    public void save(LCourseSectionHistory model) {
        model.setEntertime(N_Utils.getSecondTimestamp());
        courseSectionHistoryMapper.insertSelective(model);
    }

    //列表
    public List<Map> listBySectionId(Integer sectionid) {
        return courseSectionHistoryMapper.listBySectionId(sectionid);
    }
}
