package com.nmgs.mapper;

import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.nmgs.entity.PayIntegrationNumber;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PayIntegrationNumberMapper extends MppBaseMapper<PayIntegrationNumber> {


    /**
     * 获取配置信息
     * @return
     */
    List<PayIntegrationNumber> getPayIntegrationNumberList();

    /**
     * 获取最大id
     * @return
     */
    Integer getMaxId();


    /**
     * 根据类型获取配置的积分
     * @param type
     * @return
     */
    @Select("SELECT pay.ID,pay.VALUE,pay.type FROM pay_integration_number_table pay where pay.type=#{type}")
    PayIntegrationNumber getAuScore(@Param("type") String type);
}
