|
@@ -15,37 +15,7 @@
|
|
|
)t
|
|
|
LEFT JOIN ctop_user_allocation c on t.advertiser_id = c.account_id
|
|
|
where uploadYears = #{uploadYears}
|
|
|
-
|
|
|
- /* 账户流水信息 修改---------
|
|
|
- SELECT
|
|
|
- t.*,
|
|
|
- IFNULL((SELECT c.auth_name from ctop_user_allocation c where t.advertiser_id = c.account_id ),(SELECT c.account_name from ctop_cwjs_settlement_info c where t.advertiser_id = c.account_id )) as accountName
|
|
|
- FROM
|
|
|
- (
|
|
|
- SELECT
|
|
|
- id,
|
|
|
- advertiser_id,
|
|
|
- date,
|
|
|
- DATE_FORMAT( date, '%Y-%m' ) AS uploadYears,
|
|
|
- balance,
|
|
|
- cash_cost,
|
|
|
- cost,
|
|
|
- frozen,
|
|
|
- income,
|
|
|
- reward_cost,
|
|
|
- shared_wallet_cost,
|
|
|
- transfer_in,
|
|
|
- transfer_out,
|
|
|
- create_time
|
|
|
- FROM
|
|
|
- ctop_account_transaction_day
|
|
|
- WHERE cash_cost >0
|
|
|
- and advertiser_id = #{accountId}
|
|
|
- ) t
|
|
|
- WHERE
|
|
|
- uploadYears = #{uploadYears}
|
|
|
ORDER BY date
|
|
|
- limit 31*/
|
|
|
</select>
|
|
|
|
|
|
<!-- 查询 头条 账户id-->
|
|
@@ -74,6 +44,61 @@
|
|
|
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <!-- 查询 账户id 消耗不为0-->
|
|
|
+ <select id="getAccountIdBytedanceRepeat" resultType="java.lang.String">
|
|
|
+ SELECT
|
|
|
+ advertiser_id
|
|
|
+ FROM
|
|
|
+ ctop_account_transaction_day
|
|
|
+ WHERE
|
|
|
+ cost > 0
|
|
|
+ <if test="uploadYears !=null and uploadYears != ''">
|
|
|
+ AND DATE_FORMAT( date, '%Y-%m' ) = #{uploadYears}
|
|
|
+ </if>
|
|
|
+ <if test="accountIds !=null and accountIds != ''">
|
|
|
+ AND advertiser_id in
|
|
|
+ <foreach collection="accountIds" item="item" separator=","
|
|
|
+ open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ GROUP BY
|
|
|
+ advertiser_id
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 查询 账户id 消耗不为0-->
|
|
|
+ <select id="getAccountIdKuaiShouRepeat" resultType="java.lang.String">
|
|
|
+ SELECT
|
|
|
+ account_id AS accountId
|
|
|
+ FROM
|
|
|
+ ctop_kuaishou_daily_agent
|
|
|
+ WHERE
|
|
|
+ total_charged_in_yuan > 0
|
|
|
+ <if test="uploadYears !=null and uploadYears != ''">
|
|
|
+ AND DATE_FORMAT( date_time, '%Y-%m' ) = #{uploadYears}
|
|
|
+ </if>
|
|
|
+ <if test="accountIds !=null and accountIds != ''">
|
|
|
+ AND account_id in
|
|
|
+ <foreach collection="accountIds" item="item" separator=","
|
|
|
+ open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ GROUP BY
|
|
|
+ account_id
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<!-- 查询 头条 账户 图片-->
|
|
|
<select id="getAccountImagesBytedance" resultType="java.lang.String">
|
|
|
SELECT
|
|
@@ -155,7 +180,7 @@
|
|
|
FROM
|
|
|
ctop_kuaishou_daily_agent
|
|
|
WHERE
|
|
|
- and total_charged_in_yuan >0
|
|
|
+ total_charged_in_yuan >0
|
|
|
and account_id = #{accountId}
|
|
|
) t
|
|
|
WHERE
|