|
|
@@ -158,12 +158,20 @@
|
|
|
</select>
|
|
|
<select id="getByUserIds" resultType="com.ytpm.app.model.YtDyzAdRecord">
|
|
|
select
|
|
|
- record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
|
|
|
+ record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
|
|
|
from yt_dyz_ad_record
|
|
|
where user_id in
|
|
|
- <foreach collection="userIds.split(',')" open="(" close=")" separator="," item="item">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
+ <foreach collection="userIds.split(',')" open="(" close=")" separator="," item="item">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ union
|
|
|
+ select
|
|
|
+ record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
|
|
|
+ from yt_dyz_ad_record_visitor
|
|
|
+ where ad_source_type != 1 and user_id in
|
|
|
+ <foreach collection="userIds.split(',')" open="(" close=")" separator="," item="item">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
order by finish_time
|
|
|
</select>
|
|
|
<select id="getHourRevenue" resultType="com.ytpm.middle.view.AppRevenueHourVO">
|
|
|
@@ -234,4 +242,16 @@
|
|
|
and finish_time <![CDATA[<=]]> #{lastDay}
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getRecordMonthCount" resultType="java.lang.Integer">
|
|
|
+ SELECT count(record_id) as counts
|
|
|
+ FROM yt_dyz_ad_record
|
|
|
+ where user_id= #{userId} and revenue > 0
|
|
|
+ <if test="adSourceType != null and adSourceType!=888">
|
|
|
+ and ad_source_type = #{adSourceType}
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ and finish_time > #{startTime}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|