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

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.transaction.annotation.Transactional;

import com.alibaba.dubbo.config.annotation.Service;
import com.ssj.bean.sys.schoolmatecircle.domain.SchoolmateLike;
import com.ssj.dao.sys.schoolmatecircle.dao.SchoolmateLikeDao;
import com.ssj.framework.core.common.service.BaseServiceImpl;
import com.ssj.service.sys.schoolmatecircle.service.SchoolmateLikeService;

import java.util.List;

/**
 * @author Mount Liu
 * @date 2018/8/15
 */
@Service(version = "1.0")
@Transactional
public class SchoolmateLikeServiceImpl extends BaseServiceImpl<SchoolmateLike, String> implements SchoolmateLikeService {

    private   Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private SchoolmateLikeDao dao;

    @Override
    public PagingAndSortingRepository<SchoolmateLike, String> getDao() {
        return dao;
    }

    @Override
    public List<SchoolmateLike> findAllByHeadIdAndUserId(String headId, String userId) {
        return dao.findAllByHeadIdAndUserId(headId, userId);
    }
}
