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.domain.Page;
import org.springframework.data.domain.Pageable;
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.SchoolmateComment;
import com.ssj.dao.sys.schoolmatecircle.dao.SchoolmateCircleQueryDao;
import com.ssj.dao.sys.schoolmatecircle.dao.SchoolmateCommentDao;
import com.ssj.framework.core.common.service.BaseServiceImpl;
import com.ssj.service.sys.schoolmatecircle.service.SchoolmateCommentService;

import java.util.Map;

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

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

    @Autowired
    private SchoolmateCommentDao dao;

    @Autowired
    private SchoolmateCircleQueryDao schoolmateCircleQueryDao;

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

    @Override
    public Page<Map<String, Object>> findFirstCommentByPage(Map<String, Object> params, Pageable sp) {
        return schoolmateCircleQueryDao.findFirstCommentByPage(params,sp);
    }

    @Override
    public Page<Map<String, Object>> findCommentByPage(Map<String, Object> params, Pageable sp) {
        return schoolmateCircleQueryDao.findCommentByPage(params,sp);
    }


}
