<?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.batch.mapper.MaterialRefuseMapper">

    <select id="selectRefuseCreativeByAccountId" resultType="com.alibaba.fastjson.JSONObject">
        select
         t1.account_id accountId,
         t1.campaign_id campaignId,
         t1.unit_id unitId,
         t1.creative_id creativeId,
         t1.creative_name creativeName,
         t2.url videoUrl,
         t1.cover_url coverUrl,
         t1.review_detail reviewDetail,
         t1.description description
    from
        ctop_kuaishou_creative t1
       left join ctop_kuaishou_video_get t2
       on t1.account_id = t2.account_id
       and t1.photo_id = t2.photo_id
       where  t1.account_id = #{accountId}
       and status = 42
       order by t1.creative_id desc
    </select>

</mapper>