<?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="cn.com.ctop.kuaishou.modules.ai.mapper.AiKuaishouAdvertiserStrategyMapper">

    <select id="queryList" resultType="cn.com.ctop.kuaishou.modules.ai.entity.AiKuaishouAdvertiserStrategy">
        SELECT *
        FROM ctop_ai_kuaishou_advertiser_strategy
        <where>
            <if test="accountId != null">
                and account_id = #{accountId}
            </if>
            <if test="userIds != null and userIds.size() > 0">
                and user_id in
                <foreach item="id" index="index" collection="userIds"
                         open="(" separator="," close=")">
                    #{id}
                </foreach>
            </if>
        </where>
        order by create_time desc
    </select>

</mapper>
