package com.yonge.cooleshow.biz.dal.service.impl;

import com.yonge.cooleshow.biz.dal.entity.MusicSheetAccompaniment;
import com.yonge.cooleshow.biz.dal.dao.MusicSheetAccompanimentDao;
import com.yonge.cooleshow.biz.dal.service.MusicSheetAccompanimentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * MusicSheetAccompanimentService服务实现类
 * @author yzp
 * @date 2022-03-26 00:01:37
 * @version v1.0
 **/
@Service
public class MusicSheetAccompanimentServiceImpl extends ServiceImpl<MusicSheetAccompanimentDao,MusicSheetAccompaniment> implements MusicSheetAccompanimentService {

    private final static Logger log = LoggerFactory.getLogger(MusicSheetAccompanimentServiceImpl.class);

    @Autowired
    private MusicSheetAccompanimentDao musicSheetAccompanimentDao;

    @Override
    public MusicSheetAccompanimentDao getDao() {
        return musicSheetAccompanimentDao;
    }

    @Override
    public List<MusicSheetAccompaniment> getByMusicSheetId(Long musicSheetId) {

        return this.lambdaQuery()
                .eq(MusicSheetAccompaniment::getMusicSheetId,musicSheetId)
                .list();
    }

    @Override
    public void delByMusicSheetId(Long musicSheetId) {
        musicSheetAccompanimentDao.delByMusicSheetId(musicSheetId);
    }
}