`id`, `tenant_id`, `parent_tenant_id`,`title`, `type`, `sub_type`, `status`, `create_date`, `update_date`, `cover_img`, `target_id`, `ext_info`
where 1 = 1
and `id` = #{id}
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `title` like concat('%', #{title},'%')
and `type` = #{type}
and `sub_type` = #{subType}
and `status` = #{status}
and `create_date` = #{createDate}
and `update_date` = #{updateDate}
and `cover_img` = #{coverImg}
and `target_id` = #{targetId}
and id in
#{idItem}
order by ${sortColumns}
update wx_screen_ad sa
set sa.status = #{status}, sa.update_date = #{updateDate}
where sa.target_id = #{targetId}
and sa.`tenant_id` = #{tenantId}
and sa.`parent_tenant_id` = #{parentTenantId}
update wx_screen_ad sa, wx_coupon_channel cc
SET sa.status = 1, sa.update_date = now()
where sa.status = 0
and sa.target_id = cc.id
and cc.status = 1