|
@@ -113,15 +113,8 @@
|
|
FROM
|
|
FROM
|
|
(
|
|
(
|
|
SELECT
|
|
SELECT
|
|
- account_id accountId,
|
|
|
|
- (
|
|
|
|
- SELECT
|
|
|
|
- auth_name
|
|
|
|
- FROM
|
|
|
|
- ctop_user_allocation
|
|
|
|
- WHERE
|
|
|
|
- account_id = t1.account_id
|
|
|
|
- ) authName,
|
|
|
|
|
|
+ t1.account_id accountId,
|
|
|
|
+ t2.auth_name authName,
|
|
stat_date statDate,
|
|
stat_date statDate,
|
|
campaign_name campaignName,
|
|
campaign_name campaignName,
|
|
unit_name unitName,
|
|
unit_name unitName,
|
|
@@ -185,22 +178,18 @@
|
|
|
|
|
|
FROM
|
|
FROM
|
|
ctop_kuaishou_report_daily_group t1
|
|
ctop_kuaishou_report_daily_group t1
|
|
|
|
+ INNER JOIN ctop_user_allocation t2 on t1.account_id=t2.account_id
|
|
<where>
|
|
<where>
|
|
<if test="date != null">
|
|
<if test="date != null">
|
|
and stat_date = #{date}
|
|
and stat_date = #{date}
|
|
</if>
|
|
</if>
|
|
|
|
|
|
<if test="accountIds != null">
|
|
<if test="accountIds != null">
|
|
- and account_id in
|
|
|
|
- <foreach collection="accountIds" item="item" separator=","
|
|
|
|
- open="(" close=")">
|
|
|
|
- #{item}
|
|
|
|
- </foreach>
|
|
|
|
-
|
|
|
|
|
|
+ and t1.account_id =#{accountIds}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
GROUP BY unit_id
|
|
GROUP BY unit_id
|
|
- order by account_id
|
|
|
|
|
|
+ order by t1.account_id
|
|
|
|
|
|
) t1
|
|
) t1
|
|
</select>
|
|
</select>
|