package com.hai.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

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

/**
 * mapper扩展类
 */
public interface HighActivityPartakeRuleMapperExt {

    @Select(
            " SELECT" +
            " activity_info_id activityInfoId," +
            " partake_mode partakeMode," +
            " product_type productType " +
            " FROM" +
            " high_activity_partake_rule " +
            " WHERE" +
            " activity_info_id = #{activityId} " +
            " AND STATUS = 1 " +
            " GROUP BY" +
            " partake_mode," +
            " product_type"
    )
    List<Map<String, Object>> countRule(@Param("activityId") Long activityId);

}
