package cn.wisenergy.mapper;

import cn.wisenergy.model.app.MemberPercent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author 86187
 */
public interface MemberPercentMapper extends BaseMapper<MemberPercent> {
    /**
     *
     * @param memberpercent 入参
     * @return 1
     */
    int add(MemberPercent memberpercent);

    /**
     * 编辑
     * @param memberpercent 入参
     * @return 1
     */
    int edit(MemberPercent memberpercent);

    /**
     * 删除
     * @param id 主键id
     * @return 1
     */
    int delById(@Param("id") Integer id);

    /**
     * 获取会员等级对应的返佣比例
     * @param userLevel 会员等级
     * @return 返佣比例
     */
    MemberPercent getByLevel(@Param("userLevel") Integer userLevel);

    MemberPercent getByLevelAndType(@Param("userLevel") Integer userLevel,@Param("type") Integer type);

}
