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 BsTransferAccountsMapperExt {

    @Select(" <script>" +
            " SELECT mer_no merNo," +
            " sum(rebate_activity_actual_price) totalPrice " +
            " FROM bs_trade_order where rebate_activity_part = 1 " +
            " <![CDATA[ and pay_time >= #{startTime} ]]>" +
            " <![CDATA[ and pay_time <= #{endTime} ]]>" +
            " and `status` = 3" +
            " GROUP BY mer_no" +
            " </script>")
    List<Map<String,Object>> queryTradeRebate(@Param("startTime") String startTime, @Param("endTime") String endTime);

}
