package cn.pluss.platform.fans.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.Fans;
import cn.pluss.platform.vo.FansConsumVO;
import cn.pluss.platform.fans.FansService;
import cn.pluss.platform.mapper.FansMapper;

@Transactional
@Service("fansService")
public class FansServiceImpl  implements FansService{

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


    @Autowired
	  private FansMapper fansMapper;

    @Override
    public Fans queryFans(Fans fans){
        return fansMapper.queryFans(fans);
    }

    @Override
    public List<Fans> queryFansList(Fans fans){
        return fansMapper.queryFansList(fans);
    }
    @Override
    public void saveFans(Fans fans){
          fansMapper.saveFans(fans);
    }
    @Override
    public void updateFans(Fans fans){
        fansMapper.updateFans(fans);
    }
    @Override
    public void deleteFans(Fans fans){
        fansMapper.deleteFans(fans);
    }
    @Override
    public List<Fans> queryFansPage(Map map){
        return fansMapper.queryFansPage(map);
    }
    @Override
    public Integer queryFansPageCount(Map map){
        return fansMapper.queryFansPageCount(map);
    }
	@Override
	public Integer queryFansNoPageCount(Map map){
		return fansMapper.queryFansNoPageCount(map);
	}
    @Override
    public void saveFansBatch(List<Fans> fansList) {
         fansMapper.saveFansBatch(fansList);
    }

	@Override
	public Double sumConsumMoneyByMerchantCode(Map map) {
		return fansMapper.sumConsumMoneyByMerchantCode(map);
	}

	@Override
	public List<Fans> queryNowDateFansList(Map map) {
		return fansMapper.queryNowDateFansList(map);
	}

	@Override
	public List<Fans> queryFansPageManage(Map map) {
		return fansMapper.queryFansPageManage(map);
	}

	@Override
	public Integer queryFansPageCountManage(Map map) {
		return fansMapper.queryFansPageCountManage(map);
	}

	@Override
	public Fans queryLastFansByUserId(String userId) {
		return fansMapper.queryLastFansByUserId(userId);
	}

	@Override
	public List<FansConsumVO> queryFansConsumPage(Map<String, Object> map) {
		return fansMapper.queryFansConsumPage(map);
	}

	@Override
	public List<FansConsumVO> queryFansNoConsumPage(Map<String, Object> map) {
		return fansMapper.queryFansNoConsumPage(map);
	}

	@Override
	public Integer queryFansConsumPageCount(Map<String, Object> map) {
		return fansMapper.queryFansConsumPageCount(map);
	}
	@Override
	public Integer queryFansNoConsumPageCount(Map<String, Object> map) {
		return fansMapper.queryFansNoConsumPageCount(map);
	}

	@Override
	public Double queryFansSumConsumMoney(Map<String, Object> map) {
		return fansMapper.queryFansSumConsumMoney(map);
	}

	@Override
	public Double queryFansSumShareMoney(Map<String, Object> map) {
		return fansMapper.queryFansSumShareMoney(map);
	}

	@Override
	public Double queryFansTodayCount(Fans fans) {
		return fansMapper.queryFansTodayCount(fans);
	}

	/**
	 * @description:根据订单号查询粉丝消费记录
	 * @date: 2021/9/1 13:33
	 * @param orderNumber:
	 * @return cn.pluss.platform.entity.Fans
	 */
	@Override
	public Fans getByLockOrderNumber(String orderNumber) {
		return fansMapper.getByLockOrderNumber(orderNumber);
	}
}

