<?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="org.jeecg.modules.third.mapper.ThirdConfigAdvertiserMapper">

    <select id="getAdvertiserListByAppId" resultType="java.lang.String">
     select advertiser_name
      from ctop_thirt_config_advertiser
     where  app_id = #{appId}
     group by advertiser_name
    </select>

    <select id="getAdvertiserCost" resultType="com.alibaba.fastjson.JSONObject">
        SELECT sum(t2.charge) as 'charge',
        stat_date as 'statDate'
        from ctop_kuaishou_advertiser_base_info t1
        LEFT JOIN ctop_kuaishou_report_daily_account t2
        ON t1.account_id = t2.account_id
        WHERE t1.corporation_name = #{advertiserName}
        and t2.stat_date &gt;= #{startDate}
        AND t2.stat_date &lt;= #{endDate}
        GROUP BY t2.stat_date
    </select>

</mapper>