package cn.com.qmth.stmms.biz.mark.service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.com.qmth.stmms.biz.common.BaseQueryService;
import cn.com.qmth.stmms.biz.mark.dao.MarkSpecialTagDao;
import cn.com.qmth.stmms.biz.mark.model.MarkSpecialTag;
import cn.com.qmth.stmms.biz.mark.service.MarkSpecialTagService;

/**
 * @ClassName MarkSpecialTagServiceImpl
 * @Description TODO
 * @Author nikang
 * @Date 2018/9/4 20:48
 * @Version 1.0
 */
@Service
public class MarkSpecialTagServiceImpl extends BaseQueryService<MarkSpecialTag> implements MarkSpecialTagService {

    @Autowired
    MarkSpecialTagDao markSpecialTagDao;

    @Transactional
    @Override
    public MarkSpecialTag save(MarkSpecialTag tag) {
        return markSpecialTagDao.save(tag);
    }

    @Transactional
    @Override
    public void deleteByLibraryId(Integer libraryId) {
        markSpecialTagDao.deleteByLibraryId(libraryId);
    }

    @Override
    public List<MarkSpecialTag> findByLibraryId(Integer libraryId) {
        return markSpecialTagDao.findByLibraryIdOrderByIdAsc(libraryId);
    }
}
