package cn.pluss.platform.fansConsumReturn.impl;

import java.util.List;
import java.util.Map;
import org.springframework.transaction.annotation.Transactional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.pluss.platform.entity.FansConsumReturn;
import cn.pluss.platform.vo.FansInfoCountVO;
import cn.pluss.platform.fansConsumReturn.FansConsumReturnService;
import cn.pluss.platform.mapper.FansConsumReturnMapper;

@Transactional
@Service("fansConsumReturnService")
public class FansConsumReturnServiceImpl  implements FansConsumReturnService{

	 private static final Logger logger = LoggerFactory.getLogger( FansConsumReturnServiceImpl.class);


    @Autowired
	  private FansConsumReturnMapper fansConsumReturnMapper;

    @Override
    public FansConsumReturn queryFansConsumReturn(FansConsumReturn fansConsumReturn){
        return fansConsumReturnMapper.queryFansConsumReturn(fansConsumReturn);
    }

    @Override
    public List<FansConsumReturn> queryFansConsumReturnList(FansConsumReturn fansConsumReturn){
        return fansConsumReturnMapper.queryFansConsumReturnList(fansConsumReturn);
    }
    @Override
    public void saveFansConsumReturn(FansConsumReturn fansConsumReturn){
          fansConsumReturnMapper.saveFansConsumReturn(fansConsumReturn);
    }
    @Override
    public void updateFansConsumReturn(FansConsumReturn fansConsumReturn){
        fansConsumReturnMapper.updateFansConsumReturn(fansConsumReturn);
    }
    @Override
    public void deleteFansConsumReturn(FansConsumReturn fansConsumReturn){
        fansConsumReturnMapper.deleteFansConsumReturn(fansConsumReturn);
    }
    @Override
    public List<FansConsumReturn> queryFansConsumReturnPage(Map map){
        return fansConsumReturnMapper.queryFansConsumReturnPage(map);
    }
    @Override
    public Integer queryFansConsumReturnPageCount(Map map){
        return fansConsumReturnMapper.queryFansConsumReturnPageCount(map);
    }
    @Override
    public void saveFansConsumReturnBatch(List<FansConsumReturn> fansConsumReturnList) {
         fansConsumReturnMapper.saveFansConsumReturnBatch(fansConsumReturnList);
    }

	@Override
	public FansInfoCountVO sumFansConsumReturnInfo(String merchantCode) {
		return fansConsumReturnMapper.sumFansConsumReturnInfo(merchantCode);
	}

	@Override
	public Double sumFansAllowCashMoney(Map map) {
		return fansConsumReturnMapper.sumFansAllowCashMoney(map)==null?0d:fansConsumReturnMapper.sumFansAllowCashMoney(map);
	}

	@Override
	public Double sumNowDayShareMoney(Map map) {
		return fansConsumReturnMapper.sumNowDayShareMoney(map)==null ?0d:fansConsumReturnMapper.sumNowDayShareMoney(map);
	}

	@Override
	public Double sumAllShareMoney(Map map) {
		return fansConsumReturnMapper.sumAllShareMoney(map)==null ?0d:fansConsumReturnMapper.sumAllShareMoney(map);
	}

	@Override
	public Double sumFansNotAllowCashMoney(Map map) {
		return fansConsumReturnMapper.sumFansNotAllowCashMoney(map)==null ?0d:fansConsumReturnMapper.sumFansNotAllowCashMoney(map);
	}

	@Override
	public Double sumShareMoney() {
		return fansConsumReturnMapper.sumShareMoney();
	}
	
	@Override
	public Double sumNowReturnMoney() {
		return fansConsumReturnMapper.sumNowReturnMoney();
	}

	@Override
	public Double sumReturnMoneyByTime(Map map) {
		return fansConsumReturnMapper.sumReturnMoneyByTime(map)==null ? 0d : fansConsumReturnMapper.sumReturnMoneyByTime(map);
	}
}

