|
@@ -29,116 +29,238 @@
|
|
where operator_id = #{operatorId} and t_operator.id = t_adv_agent.operator_id
|
|
where operator_id = #{operatorId} and t_operator.id = t_adv_agent.operator_id
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <update id="addCorrelation1" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
|
|
+ <update id="addCorrelation11" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_account
|
|
|
|
+ set
|
|
|
|
+ t_account.operator_id= #{operatorId}
|
|
|
|
+ where
|
|
|
|
+ t_account.agent_id = #{agentId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <update id="addCorrelation12" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_adv_agent a
|
|
|
|
+ set
|
|
|
|
+ a.operator_id=#{operatorId}
|
|
|
|
+ where
|
|
|
|
+ a.id = #{agentId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <update id="addCorrelation13" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_advertiser b
|
|
|
|
+ set
|
|
|
|
+ b.operator_id=#{operatorId},b.updated = NOW()
|
|
|
|
+ where
|
|
|
|
+ b.agent_id = #{agentId}
|
|
|
|
+ </update>
|
|
|
|
+ <update id="addCorrelation14" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_order c
|
|
|
|
+ set
|
|
|
|
+ c.operator_id=#{operatorId},c.updated = NOW()
|
|
|
|
+ where
|
|
|
|
+ c.agent_id = #{agentId}
|
|
|
|
+ </update>
|
|
|
|
+ <update id="addCorrelation15" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_campaign d
|
|
|
|
+ set
|
|
|
|
+ d.operator_id=#{operatorId},d.updated = NOW()
|
|
|
|
+ where
|
|
|
|
+ d.agent_id = #{agentId}
|
|
|
|
+ </update>
|
|
|
|
+ <update id="addCorrelation16" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
update
|
|
update
|
|
- t_account,
|
|
|
|
- t_adv_agent a,
|
|
|
|
- t_advertiser b,
|
|
|
|
- t_order c,
|
|
|
|
- t_campaign d,
|
|
|
|
t_adgroup e
|
|
t_adgroup e
|
|
-
|
|
|
|
set
|
|
set
|
|
- t_account.operator_id= #{operatorId},
|
|
|
|
- a.operator_id=#{operatorId},
|
|
|
|
- b.operator_id=#{operatorId},b.updated = NOW(),
|
|
|
|
- c.operator_id=#{operatorId},c.updated = NOW(),
|
|
|
|
- d.operator_id=#{operatorId},d.updated = NOW(),
|
|
|
|
e.operator_id=#{operatorId},e.updated = NOW()
|
|
e.operator_id=#{operatorId},e.updated = NOW()
|
|
-
|
|
|
|
where
|
|
where
|
|
- t_account.agent_id = #{agentId}
|
|
|
|
- and a.id = #{agentId}
|
|
|
|
- and b.agent_id = #{agentId}
|
|
|
|
- and c.agent_id = #{agentId}
|
|
|
|
- and d.agent_id = #{agentId}
|
|
|
|
- and e.agent_id = #{agentId}
|
|
|
|
|
|
+ e.agent_id = #{agentId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
- <update id="addCorrelation2" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
|
|
+ <update id="addCorrelation21" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_rpt_adv_banner f
|
|
|
|
+ set
|
|
|
|
+ f.operator_id=#{operatorId}
|
|
|
|
+ where
|
|
|
|
+ f.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
+ </update>
|
|
|
|
+ <update id="addCorrelation22" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
update
|
|
update
|
|
- t_rpt_adv_banner f,
|
|
|
|
- t_rpt_adv_location g,
|
|
|
|
- t_rpt_adv_os h,
|
|
|
|
- t_rpt_adv_place i,
|
|
|
|
|
|
+ t_rpt_adv_location g
|
|
|
|
+ set
|
|
|
|
+ g.operator_id=#{operatorId}
|
|
|
|
+ where
|
|
|
|
|
|
- t_rpt_advertiser k,
|
|
|
|
|
|
+ g.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </update>
|
|
|
|
+ <update id="addCorrelation23" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+
|
|
|
|
+ t_rpt_adv_os h
|
|
|
|
+ set
|
|
|
|
+ h.operator_id=#{operatorId}
|
|
|
|
+ where
|
|
|
|
+ h.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
+ </update>
|
|
|
|
+ <update id="addCorrelation24" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_rpt_adv_place i
|
|
|
|
+ set
|
|
|
|
+ i.operator_id=#{operatorId}
|
|
|
|
+ where
|
|
|
|
+ i.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
+ </update>
|
|
|
|
+ <update id="addCorrelation25" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_rpt_advertiser k
|
|
|
|
+ set
|
|
|
|
+ k.operator_id=#{operatorId}
|
|
|
|
+ where
|
|
|
|
+ k.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
+ </update>
|
|
|
|
+ <update id="addCorrelation26" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
t_rpt_advertiser_hour l
|
|
t_rpt_advertiser_hour l
|
|
|
|
+ set
|
|
|
|
+ l.operator_id=#{operatorId}
|
|
|
|
+ where
|
|
|
|
+ l.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <update id="deleteCorrelation11" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_account
|
|
|
|
|
|
set
|
|
set
|
|
- f.operator_id=#{operatorId},
|
|
|
|
- g.operator_id=#{operatorId},
|
|
|
|
- h.operator_id=#{operatorId},
|
|
|
|
- i.operator_id=#{operatorId},
|
|
|
|
|
|
+ t_account.operator_id= 0
|
|
|
|
|
|
- k.operator_id=#{operatorId},
|
|
|
|
- l.operator_id=#{operatorId}
|
|
|
|
-
|
|
|
|
where
|
|
where
|
|
- f.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
- and g.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
- and h.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
- and i.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
|
|
+ t_account.agent_id = #{agentId}
|
|
|
|
+
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <update id="deleteCorrelation12" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_adv_agent a
|
|
|
|
+ set
|
|
|
|
+ a.operator_id=0
|
|
|
|
+ where
|
|
|
|
+ a.id = #{agentId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <update id="deleteCorrelation13" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_advertiser b
|
|
|
|
+ set
|
|
|
|
+
|
|
|
|
+ b.operator_id=0,b.updated = NOW()
|
|
|
|
|
|
- and k.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
- and l.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
|
|
+ where
|
|
|
|
+
|
|
|
|
+ b.agent_id = #{agentId}
|
|
|
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
- <update id="deleteCorrelation1" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
|
|
+ <update id="deleteCorrelation14" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
update
|
|
update
|
|
- t_account,
|
|
|
|
- t_adv_agent a,
|
|
|
|
- t_advertiser b,
|
|
|
|
- t_order c,
|
|
|
|
- t_campaign d,
|
|
|
|
- t_adgroup e
|
|
|
|
|
|
+
|
|
|
|
+ t_order c
|
|
|
|
|
|
set
|
|
set
|
|
- t_account.operator_id= 0,
|
|
|
|
- a.operator_id=0,
|
|
|
|
- b.operator_id=0,b.updated = NOW(),
|
|
|
|
- c.operator_id=0,c.updated = NOW(),
|
|
|
|
- d.operator_id=0,d.updated = NOW(),
|
|
|
|
- e.operator_id=0,e.updated = NOW()
|
|
|
|
|
|
+
|
|
|
|
+ c.operator_id=0,c.updated = NOW()
|
|
|
|
|
|
where
|
|
where
|
|
- t_account.agent_id = #{agentId}
|
|
|
|
- and a.id = #{agentId}
|
|
|
|
- and b.agent_id = #{agentId}
|
|
|
|
- and c.agent_id = #{agentId}
|
|
|
|
- and d.agent_id = #{agentId}
|
|
|
|
- and e.agent_id = #{agentId}
|
|
|
|
|
|
+
|
|
|
|
+ c.agent_id = #{agentId}
|
|
|
|
+
|
|
</update>
|
|
</update>
|
|
|
|
|
|
- <update id="deleteCorrelation2" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
|
|
+ <update id="deleteCorrelation15" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
update
|
|
update
|
|
- t_rpt_adv_banner f,
|
|
|
|
- t_rpt_adv_location g,
|
|
|
|
- t_rpt_adv_os h,
|
|
|
|
- t_rpt_adv_place i,
|
|
|
|
|
|
|
|
- t_rpt_advertiser k,
|
|
|
|
- t_rpt_advertiser_hour l
|
|
|
|
|
|
+ t_campaign d
|
|
|
|
|
|
set
|
|
set
|
|
- f.operator_id=0,
|
|
|
|
- g.operator_id=0,
|
|
|
|
- h.operator_id=0,
|
|
|
|
- i.operator_id=0,
|
|
|
|
|
|
|
|
- k.operator_id=0,
|
|
|
|
- l.operator_id=0
|
|
|
|
|
|
+ d.operator_id=0,d.updated = NOW()
|
|
|
|
+
|
|
|
|
+ where
|
|
|
|
+
|
|
|
|
+ d.agent_id = #{agentId}
|
|
|
|
+
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <update id="deleteCorrelation16" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_adgroup e
|
|
|
|
+ set
|
|
|
|
+ e.operator_id=0,e.updated = NOW()
|
|
|
|
+ where
|
|
|
|
+ e.agent_id = #{agentId}
|
|
|
|
+ </update>
|
|
|
|
|
|
|
|
+ <update id="deleteCorrelation21" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_rpt_adv_banner f
|
|
|
|
+
|
|
|
|
+ set
|
|
|
|
+ f.operator_id=0
|
|
where
|
|
where
|
|
f.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
f.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
- and g.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
- and h.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
- and i.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
|
|
|
|
- and k.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
- and l.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
|
|
+ </update>
|
|
|
|
+ <update id="deleteCorrelation22" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+
|
|
|
|
+ t_rpt_adv_location g
|
|
|
|
+ set
|
|
|
|
+
|
|
|
|
+ g.operator_id=0
|
|
|
|
+
|
|
|
|
|
|
|
|
+ where
|
|
|
|
+
|
|
|
|
+ g.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
+
|
|
|
|
+ </update>
|
|
|
|
+ <update id="deleteCorrelation23" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_rpt_adv_os h
|
|
|
|
+ set
|
|
|
|
+ h.operator_id=0
|
|
|
|
+ where
|
|
|
|
+ h.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
+ </update>
|
|
|
|
+ <update id="deleteCorrelation24" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_rpt_adv_place i
|
|
|
|
+ set
|
|
|
|
+ i.operator_id=0
|
|
|
|
+ where
|
|
|
|
+ i.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
+ </update>
|
|
|
|
+ <update id="deleteCorrelation25" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_rpt_advertiser k
|
|
|
|
+ set
|
|
|
|
+ k.operator_id=0
|
|
|
|
+ where
|
|
|
|
+ k.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
|
|
+ </update>
|
|
|
|
+ <update id="deleteCorrelation26" parameterType="com.cloudcross.ssp.model.Correlation">
|
|
|
|
+ update
|
|
|
|
+ t_rpt_advertiser_hour l
|
|
|
|
+ set
|
|
|
|
+ l.operator_id=0
|
|
|
|
+ where
|
|
|
|
+ l.advertiser_id in (select id from t_advertiser where agent_id = #{agentId})
|
|
</update>
|
|
</update>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|