package com.platform.yijia.service.impl;

import com.platform.yijia.dao.CustomerGradeMapper;
import com.platform.yijia.pojo.CustomerManage;
import com.platform.yijia.service.CustomerGradeServices;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service("customerGradeServices")
public class CustomerGradeServiceImpl implements CustomerGradeServices {

    @Resource
    private CustomerGradeMapper customerGradeMapper;


    //查询直降
    @Override
    public List<Map> getCustomerGradeList(Map map) {
        return customerGradeMapper.getCustomerGradeList(map);
    }

    //查询立减满减
    @Override
    public List<Map> getCustomerMarkertPlanList(Map map) {
        return customerGradeMapper.getCustomerMarkertPlanList(map);
    }

    //查询客户等级信息
    @Override
    public List<Map<String, Object>> getCustomerGradeInfo(Map map) {
        return customerGradeMapper.getCustomerGradeInfo(map);
    }

    //获取客户优惠等级信息
    @Override
    public List<Map<String, Object>> getCustomerGradeInfoByYouHui(Map map) {
        return customerGradeMapper.getCustomerGradeInfoByYouHui(map);
    }

    //根据手机号和油站ID判断该用户是否已在客户表
    @Override
    public List<CustomerManage> isExistCustomerByStationIdAndPhoneNumber(CustomerManage customerManage) {
        return customerGradeMapper.isExistCustomerByStationIdAndPhoneNumber(customerManage);
    }

    //营销立减
    @Override
    public List<Map> getMarkertPlanListByDiscountPlanType() {
        return customerGradeMapper.getMarkertPlanListByDiscountPlanType();
    }
}
