|
|
@@ -128,6 +128,27 @@
|
|
|
<update id="deleteApp">
|
|
|
update yt_app set enabled = 0 where app_id = #{appId}
|
|
|
</update>
|
|
|
+ <update id="deleteAppIds">
|
|
|
+ update yt_app set enabled = 0
|
|
|
+ where app_id in <foreach collection="ids" item="id" open="(" separator="," close=")" >#{id}</foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="deleteRisks">
|
|
|
+ delete from yt_risk_config where config_id in (
|
|
|
+ select yt_risk_template_config.config_id
|
|
|
+ from yt_risk_template_config
|
|
|
+ left join yt_risk_template on yt_risk_template_config.template_id = yt_risk_template.template_id
|
|
|
+ where yt_risk_template.app_id in <foreach collection="ids" item="appId" open="(" separator="," close=")">#{appId}</foreach>
|
|
|
+ );
|
|
|
+ delete from yt_risk_template_config where template_id in (
|
|
|
+ select yt_risk_template.template_id
|
|
|
+ from yt_risk_template
|
|
|
+ where yt_risk_template.app_id in <foreach collection="ids" item="appId" open="(" separator="," close=")">#{appId}</foreach>
|
|
|
+ );
|
|
|
+ delete from yt_cofig_app
|
|
|
+ where app_id in <foreach collection="ids" item="appId" open="(" separator="," close=")">#{appId}</foreach>;
|
|
|
+ delete from yt_risk_template
|
|
|
+ where app_id in <foreach collection="ids" item="appId" open="(" separator="," close=")">#{appId}</foreach>;
|
|
|
+ </delete>
|
|
|
<select id="selectPrimary" resultType="com.ytpm.agent.model.YtApp">
|
|
|
select
|
|
|
app_id,ditch_id, ditch_name, app_key, app_name,user_id, app_type, apk_url, qr_code, version_code, update_tips, enabled,superior_id
|