package com.fzm.mall.server.front.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fzm.mall.server.front.user.model.OprationPopularizeCommission;
import com.fzm.mall.server.front.user.mapper.OprationPopularizeCommissionMapper;
import com.fzm.mall.server.front.user.service.IOprationPopularizeCommissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 运营中心-推广佣金 服务实现类
 * </p>
 *
 * @author fzm
 * @since 2021-09-14
 */
@Service
public class OprationPopularizeCommissionServiceImpl extends ServiceImpl<OprationPopularizeCommissionMapper, OprationPopularizeCommission> implements IOprationPopularizeCommissionService {

    @Override
    public OprationPopularizeCommission getByLevel(Integer level) {
        QueryWrapper<OprationPopularizeCommission> q = new QueryWrapper<>();
        q.eq("member_level",level);
        return getOne(q);
    }
}
