package cn.pluss.platform.mapper;

import cn.pluss.platform.entity.OpenAccountRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.Map;

/**
 * <p>
 * 用户开户奖励明细 Mapper 接口
 * </p>
 *
 * @author crystal
 * @since 2022-06-14
 */
public interface OpenAccountRecordMapper extends BaseMapper<OpenAccountRecord> {

    @Select("SELECT * FROM tb_pluss_open_account_record WHERE orderNumber = #{orderNumber} and `type` = #{type}")
    OpenAccountRecord getByOrderNumberAndType(@Param("orderNumber") String orderNumber, @Param("type") String type);

    Map<String, BigDecimal> countData(OpenAccountRecord condition);
}
