|
@@ -2020,7 +2020,7 @@
|
|
|
|
|
|
<select id="getBytedanceProjectList" resultType="Long">
|
|
|
SELECT
|
|
|
- project_id
|
|
|
+ project_id
|
|
|
FROM
|
|
|
application.bytedance_advertiser_report_hourly_dw
|
|
|
WHERE cost > 0
|
|
@@ -2042,7 +2042,7 @@
|
|
|
|
|
|
<select id="getKuaishouProjectList" resultType="Long">
|
|
|
SELECT
|
|
|
- project_id
|
|
|
+ project_id
|
|
|
FROM
|
|
|
application.kuaishou_account_report_daily_dw d
|
|
|
WHERE charge > 0
|
|
@@ -2063,12 +2063,11 @@
|
|
|
</select>
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- <select id="getKuaiShouOperateProjectInfoNew" resultType="org.jeecg.ctop.material.entity.vo.KuaiShouOperateProjectVo">
|
|
|
+ <select id="getKuaiShouOperateProjectInfoNew"
|
|
|
+ resultType="org.jeecg.ctop.material.entity.vo.KuaiShouOperateProjectVo">
|
|
|
SELECT
|
|
|
t1.project_name AS projectName,
|
|
|
- t1.project_id AS projectId,
|
|
|
+ t1.project_id AS projectId,
|
|
|
SUM(t1.charge) AS totalCost,
|
|
|
COUNT(DISTINCT t1.account_id) AS accountNum,
|
|
|
COUNT(DISTINCT t1.user_id) AS userNum,
|
|
@@ -2188,19 +2187,19 @@
|
|
|
FROM
|
|
|
application.today_material_upload_num
|
|
|
<where>
|
|
|
- <if test="startDate != null and startDate != '' ">
|
|
|
- and stat_date >= #{startDate}
|
|
|
- </if>
|
|
|
- <if test="endDate != null and endDate != '' ">
|
|
|
- and stat_date <= #{endDate}
|
|
|
- </if>
|
|
|
- <if test='projectIds!=null and projectIds.size()>0'>
|
|
|
- AND dimension IN
|
|
|
- <foreach collection="projectIds" item="item" separator=","
|
|
|
- open="(" close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
+ <if test="startDate != null and startDate != '' ">
|
|
|
+ and stat_date >= #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != '' ">
|
|
|
+ and stat_date <= #{endDate}
|
|
|
+ </if>
|
|
|
+ <if test='projectIds!=null and projectIds.size()>0'>
|
|
|
+ AND dimension IN
|
|
|
+ <foreach collection="projectIds" item="item" separator=","
|
|
|
+ open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
GROUP BY dimension
|
|
|
)t6 ON t1.project_id = t6.dimension
|
|
@@ -2212,7 +2211,7 @@
|
|
|
json_object('adSceneCost',IFNULL(SUM(charge),0),'adSceneName',ad_scene) as 'adSceneDate'
|
|
|
FROM
|
|
|
application.app_kuaishou_account_ad_scene_report_d
|
|
|
- WHERE ad_scene!='全部'
|
|
|
+ WHERE ad_scene!='全部'
|
|
|
<if test="startDate != null and startDate != '' ">
|
|
|
and stat_date >= #{startDate}
|
|
|
</if>
|
|
@@ -2254,8 +2253,11 @@
|
|
|
|
|
|
<select id="getSaleDirctorItsTeamMember" resultType="String">
|
|
|
select DISTINCT user_id as 'userId'
|
|
|
- from `application`.app_user_manage
|
|
|
+ from `application`.app_user_manage t1
|
|
|
+ LEFT JOIN sys_user t2 on t1.user_id = t2.id
|
|
|
where manage_id = #{userId}
|
|
|
+ and t1.type = 1
|
|
|
+ and t2.status = 1
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|