<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.sweet.mapper.SweetIntegralActivityDrawMapper">

    <select id="selectExcelList" resultType="com.liquidnet.service.sweet.dto.SweetActivityDrawListDao">
        select a.*
        from sweet_integral_activity_draw as a
        left join sweet_integral_activity_prize as b on b.prize_id = a.prize_id
        left join sweet_integral_activity as c on a.integral_activity_id = c.integral_activity_id
        <where>
            <if test="integralActivityId != null  and integralActivityId != ''">
                and a.integral_activity_id = #{integralActivityId}
            </if>
        </where>
        ORDER BY a.mid DESC
    </select>
</mapper>
