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

import com.ssj.dao.sys.fx.dao.FxQueryDao;
import com.ssj.service.conch.parents.v1.dto.PositionSchoolV1Dto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.alibaba.dubbo.config.annotation.Service;
import com.ssj.bean.sys.fx.domain.MerchantArea;
import com.ssj.dao.sys.fx.dao.MerchantAreaDao;
import com.ssj.framework.core.common.service.BaseServiceImpl;
import com.ssj.service.sys.fx.service.MerchantAreaService;

import java.util.List;


@Service(version="1.0")
public class MerchantAreaServiceImpl extends BaseServiceImpl<MerchantArea, String> implements MerchantAreaService {

	
	private   Logger logger = LoggerFactory.getLogger(this.getClass());
	
	@Autowired
	private MerchantAreaDao dao;

    @Autowired
    private FxQueryDao queryDao;

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


    @Override
    public List<PositionSchoolV1Dto> findSchoolList(String libId) {
        return queryDao.findSchoolList(libId);
    }
    
    @Override
    public List<MerchantArea> findSchoolByMerchantList(String merchantId) {
        return dao.findSchoolByMerchantList(merchantId);
    }

    @Override
    public MerchantArea findBySchoolIdAndMerchant(String areaId, String merchantId) {
        return dao.findBySchoolIdAndMerchant(areaId,merchantId);
    }

    @Override
    public int findLibCountBySchoolName(String schoolName) {
        return dao.findLibCountBySchoolName(schoolName);
    }

}


