package com.hfkj.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * mapper扩展类
 */
public interface BsRebatePartMerMapperExt {
    
    @Select(" <script>" +
            " select " +
            " id merId," +
            " mer_no merNo," +
            " mer_name merName," +
            " mer_abbreviate merAbbreviate " +
            " from bs_mer where id not in (select mer_id from bs_rebate_part_mer where `status` <![CDATA[ <> 0 ]]> ) and mer_status = 1" +
            " <if test='param.merNo != null'> and mer_no LIKE CONCAT('%', #{param.merNo} , '%') </if>" +
            " <if test='param.merName != null'> and mer_name LIKE CONCAT('%', #{param.merName} , '%') </if>" +
            " <if test='param.merAbbreviate != null'> and mer_abbreviate LIKE CONCAT('%', #{param.merAbbreviate} , '%') </if>" +
            " ORDER BY create_time desc" +
            " </script>")
    List<Map<String,Object>> queryNotPartMer(@Param("param") Map<String,Object> param);
}
