package com.ssj.service.weixin.problem.service.impl;

import com.ssj.bean.weixin.problem.domain.ArticeMatter;
import com.ssj.dao.weixin.problem.dao.ArticeMatterDao;
import com.ssj.dao.weixin.problem.dao.YdzQueryDao;
import com.ssj.framework.core.common.service.BaseServiceImpl;
import com.ssj.service.weixin.problem.service.ArticeMatterService;
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.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

@Service
@Transactional
public class ArticeMatterServiceImpl extends BaseServiceImpl<ArticeMatter, String> implements ArticeMatterService{
	@Autowired
	private ArticeMatterDao  matterDao;
	@Autowired
	private YdzQueryDao  ydzQueryDao;
	@Override
	public PagingAndSortingRepository<ArticeMatter, String> getDao() {
		return matterDao;
	}
	@Override
	public Page<Map<String, Object>> findMatterPage(
			Map<String, Object> searchParams, Pageable pageable) {
		return ydzQueryDao.findMatterPage(searchParams, pageable);
	}
	@Override
	public Integer countType() {
		 return (int) matterDao.count();
	}
	@Override
	public void updatenum(String id, Integer count) {
		matterDao.updatenum(id, count);
		
	}

}
