package com.ssj.service.sys.knowledge.service.impl;

import com.ssj.bean.sys.knowledge.domain.KnowDimension;
import com.ssj.dao.sys.knowledge.dao.KnowDimensionDao;
import com.ssj.framework.core.common.service.BaseServiceImpl;
import com.ssj.service.sys.knowledge.service.KnowDimensionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service
public class KnowDimensionServiceImpl extends BaseServiceImpl<KnowDimension, String> implements KnowDimensionService {

    @Autowired
    private KnowDimensionDao knowDimensionDao;

    @Override
    public PagingAndSortingRepository<KnowDimension, String> getDao() {
        return knowDimensionDao;
    }

    @Override
    public List<KnowDimension> findBySubjectAndType(String subject, int type) {
        return knowDimensionDao.findByCourseNameAndType(subject, type);
    }
}
