Commit 5c8fbb49 authored by Cristian Mauricio Diaz Canales's avatar Cristian Mauricio Diaz Canales 💬

Merge branch 'cambios' into 'master'

Cambios

See merge request jcarrill/intelsecuritymovistar!3
parents 1631fbd7 38d056bd
...@@ -176,23 +176,6 @@ ...@@ -176,23 +176,6 @@
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
</table> </table>
<table name="mcafee_ultimo_proceso_creacion" phpName="McafeeUltimoProcesoCreacion" idMethod="native">
<column name="muc_id" phpName="MucId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="ultimo_umn_id" phpName="UltimoUmnId" type="INTEGER" required="false"/>
<column name="muc_cantidad_procesados" phpName="MucCantidadProcesados" type="INTEGER" required="false"/>
<column name="muc_cantidad_pendientes" phpName="MucCantidadPendientes" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
<foreign-key foreignTable="usuarios_mcafee_movistar_nuevos" name="fk_idx_usuario_movistar_nuevo" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="ultimo_umn_id" foreign="id"/>
</foreign-key>
<index name="fk_idx_usuario_movistar_nuevo_idx">
<index-column name="ultimo_umn_id"/>
</index>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="mcafee_ultimo_proceso_migracion" phpName="McafeeUltimoProcesoMigracion" idMethod="native"> <table name="mcafee_ultimo_proceso_migracion" phpName="McafeeUltimoProcesoMigracion" idMethod="native">
<column name="mup_id" phpName="MupId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/> <column name="mup_id" phpName="MupId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="ultimo_umc_id" phpName="UltimoUmcId" type="INTEGER" required="true"/> <column name="ultimo_umc_id" phpName="UltimoUmcId" type="INTEGER" required="true"/>
...@@ -210,23 +193,6 @@ ...@@ -210,23 +193,6 @@
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
</table> </table>
<table name="mcafee_ultimo_proceso_normalizacion" phpName="McafeeUltimoProcesoNormalizacion" idMethod="native">
<column name="mun_id" phpName="MunId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="ultimo_umc_id" phpName="UltimoUmcId" type="INTEGER" required="false"/>
<column name="mun_cantidad_procesados" phpName="MunCantidadProcesados" type="INTEGER" required="false"/>
<column name="mun_cantidad_pendientes" phpName="MunCantidadPendientes" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
<foreign-key foreignTable="usuario_mcafee" name="fk_ultimo_umc_id_normla" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="ultimo_umc_id" foreign="umc_id"/>
</foreign-key>
<index name="fk_ultimo_umc_id_normla_idx">
<index-column name="ultimo_umc_id"/>
</index>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="notificacion_email" phpName="NotificacionEmail" idMethod="native"> <table name="notificacion_email" phpName="NotificacionEmail" idMethod="native">
<column name="nem_id" phpName="NemId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/> <column name="nem_id" phpName="NemId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="eem_id" phpName="EemId" type="INTEGER" required="false"/> <column name="eem_id" phpName="EemId" type="INTEGER" required="false"/>
...@@ -354,7 +320,6 @@ ...@@ -354,7 +320,6 @@
<column name="umc_permite_email" phpName="UmcPermiteEmail" type="BOOLEAN" size="1" required="false" defaultValue="true"/> <column name="umc_permite_email" phpName="UmcPermiteEmail" type="BOOLEAN" size="1" required="false" defaultValue="true"/>
<column name="umc_fecha_desuscripcion_email" phpName="UmcFechaDesuscripcionEmail" type="TIMESTAMP" required="false"/> <column name="umc_fecha_desuscripcion_email" phpName="UmcFechaDesuscripcionEmail" type="TIMESTAMP" required="false"/>
<column name="umc_movil" phpName="UmcMovil" type="VARCHAR" size="200" required="false"/> <column name="umc_movil" phpName="UmcMovil" type="VARCHAR" size="200" required="false"/>
<column name="umc_fijo" phpName="UmcFijo" type="VARCHAR" size="200" required="false"/>
<column name="umc_customer_id" phpName="UmcCustomerId" type="VARCHAR" size="250" required="false"/> <column name="umc_customer_id" phpName="UmcCustomerId" type="VARCHAR" size="250" required="false"/>
<column name="umc_eliminado" phpName="UmcEliminado" type="BOOLEAN" size="1" required="false"/> <column name="umc_eliminado" phpName="UmcEliminado" type="BOOLEAN" size="1" required="false"/>
<column name="umc_permite_sms" phpName="UmcPermiteSms" type="BOOLEAN" size="1" required="true" defaultValue="true"/> <column name="umc_permite_sms" phpName="UmcPermiteSms" type="BOOLEAN" size="1" required="true" defaultValue="true"/>
...@@ -363,12 +328,6 @@ ...@@ -363,12 +328,6 @@
<index name="indice_umc_movistar_any"> <index name="indice_umc_movistar_any">
<index-column name="umc_movistar_any"/> <index-column name="umc_movistar_any"/>
</index> </index>
<index name="indice_fecha_creacion">
<index-column name="created_at"/>
</index>
<index name="indice_mcafee_mail">
<index-column name="umc_mcafee_email"/>
</index>
<vendor type="mysql"> <vendor type="mysql">
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
...@@ -410,35 +369,6 @@ ...@@ -410,35 +369,6 @@
<index name="ccid"> <index name="ccid">
<index-column name="Ccid"/> <index-column name="Ccid"/>
</index> </index>
<index name="correo">
<index-column name="Email_Address"/>
</index>
<index name="activty">
<index-column name="License_Activity"/>
</index>
<index name="tipo">
<index-column name="Device_Type"/>
</index>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="usuarios_mcafee_movistar_nuevos" phpName="UsuariosMcafeeMovistarNuevos" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="id_mov" phpName="IdMov" type="INTEGER" required="true" defaultValue="0"/>
<column name="area_tel" phpName="AreaTel" type="INTEGER" required="false"/>
<column name="rut" phpName="Rut" type="INTEGER" required="false"/>
<column name="nombres" phpName="Nombres" type="VARCHAR" size="45" required="false"/>
<column name="correo" phpName="Correo" type="VARCHAR" size="64" required="false"/>
<column name="fono_contacto_fijo_1" phpName="FonoContactoFijo1" type="INTEGER" required="false"/>
<column name="fono_contacto_fijo_2" phpName="FonoContactoFijo2" type="INTEGER" required="false"/>
<column name="fono_contacto_movil_1" phpName="FonoContactoMovil1" type="INTEGER" required="false"/>
<column name="fono_contacto_movil_2" phpName="FonoContactoMovil2" type="INTEGER" required="false"/>
<column name="ps_6094" phpName="Ps6094" type="INTEGER" required="false"/>
<column name="ps_5679" phpName="Ps5679" type="INTEGER" required="false"/>
<column name="ps_2989" phpName="Ps2989" type="INTEGER" required="false"/>
<column name="ps_6753" phpName="Ps6753" type="INTEGER" required="false"/>
<column name="ps_6759" phpName="Ps6759" type="INTEGER" required="false"/>
<vendor type="mysql"> <vendor type="mysql">
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
......
<?php <?php
namespace AppBundle\Model; namespace AppBundle\Model;
use AppBundle\Model\om\BaseSms; use AppBundle\Model\om\BaseSms;
use Monolog\Logger; use Monolog\Logger;
use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\Container;
...@@ -9,7 +8,7 @@ use AppBundle\Lib\Utiles; ...@@ -9,7 +8,7 @@ use AppBundle\Lib\Utiles;
class Sms extends BaseSms class Sms extends BaseSms
{ {
const ELIMINADO_TRUE=TRUE; const ELIMINADO_TRUE=TRUE;
const ELIMINADO_FALSE=FALSE; const ELIMINADO_FALSE=FALSE;
const ESTADO_PREENVIO=0; const ESTADO_PREENVIO=0;
...@@ -23,12 +22,12 @@ class Sms extends BaseSms ...@@ -23,12 +22,12 @@ class Sms extends BaseSms
const TIPO_UNITARIO = 2; const TIPO_UNITARIO = 2;
public static function enviarSms($url, $movil, UsuarioMcafee $usuarioMcafee, Batchsms $batchsms=null, $campana=0, $mensaje, $tipoSms, $transIdCliente=null, Logger $log, Container $container) { public static function enviarSms($url, $movil, UsuarioMcafee $usuarioMcafee, Batchsms $batchsms=null, $campana=0, $mensaje, $tipoSms, $transIdCliente=null, Logger $log, Container $container) {
//$FROM_EMAIL = 'no-reply@seguridadtotalmcafee.cl'; //$FROM_EMAIL = 'no-reply@seguridadtotalmcafee.cl';
//$FROM_EMAIL = 'fcastro@gearlabs.cl'; //$FROM_EMAIL = 'fcastro@gearlabs.cl';
$envioEmail = null; $envioEmail = null;
$tag = '[enviarSms]'; $tag = '[enviarSms]';
$log->debug($tag."entrando... tipoSms:$tipoSms | campana:$campana | movil:$movil | umcId:".$usuarioMcafee->getUmcId()); $log->debug($tag."entrando... tipoSms:$tipoSms | campana:$campana | movil:$movil | umcId:".$usuarioMcafee->getUmcId());
try{ try{
...@@ -37,7 +36,7 @@ class Sms extends BaseSms ...@@ -37,7 +36,7 @@ class Sms extends BaseSms
$log->debug($tag.'generando sms...'); $log->debug($tag.'generando sms...');
$sms = new Sms(); $sms = new Sms();
if($sms != null) if($sms != null)
$sms->setBatchsmsId($batchsms->getBatchsmsId()); $sms->setBatchsmsId($batchsms->getBatchsmsId());
$sms->setSmsTipo($tipoSms); $sms->setSmsTipo($tipoSms);
$sms->setUsuarioMcafee($usuarioMcafee); $sms->setUsuarioMcafee($usuarioMcafee);
$sms->setSmsEstado(EnvioEmail::ESTADO_PREENVIO); $sms->setSmsEstado(EnvioEmail::ESTADO_PREENVIO);
...@@ -49,22 +48,17 @@ class Sms extends BaseSms ...@@ -49,22 +48,17 @@ class Sms extends BaseSms
$sms->setSmsTransIdCliente ($transIdCliente); $sms->setSmsTransIdCliente ($transIdCliente);
$sms->setSmsEliminado(EnvioEmail::ELIMINADO_FALSE); $sms->setSmsEliminado(EnvioEmail::ELIMINADO_FALSE);
$sms->save(); $sms->save();
//$urlDescarga = Sms::acortarUrl($url);
//$urlDescarga = $url;
$mensaje=$mensaje . $urlDescarga;
$url = str_replace('#CAMPANA', $campana,$url);
$url = str_replace('#STRUSUARIO', $usuarioMcafee->getUmcParametroEncriptado(),$url);
$url = str_replace('#SMSID', $sms->getSmsId(),$url); $post['to'] = array($movil);
$url = str_replace('#PROCEDENCIA', Tracking::PROCEDENCIA_SMS,$url);
$urlAperturaTrack = str_replace('#ROUTING', 'SMStrack',$url);
$urlAperturaWeb = str_replace('#ROUTING', 'SMStracktemplate',$url);
$urlDescarga = str_replace('#ROUTING', 'descargar',$url);
//$urlDescarga = Sms::acortarUrl($urlDescarga);
$urlDescarga = Sms::acortar_url($urlDescarga);
$mensaje=$mensaje . $urlDescarga; $mensaje=$mensaje . $urlDescarga;
...@@ -94,39 +88,37 @@ class Sms extends BaseSms ...@@ -94,39 +88,37 @@ class Sms extends BaseSms
/***************************************/ /***************************************/
/* $request = '{ /* $request = '{
"api_key":"9df2cfda7cc871680ede6ec24b4a479d", "api_key":"9df2cfda7cc871680ede6ec24b4a479d",
"report_url":"http://servidoctor.com/callback/script", "report_url":"http://servidoctor.com/callback/script",
"concat":1, "concat":1,
"messages":[ "messages":[
{ {
"from":"McAfee", "from":"McAfee",
"to":"584165388803", "to":"584165388803",
"text": "Descarga y participa por un SMART TV DE 50 pulgadas: http://bit.ly/2wHyOwK", "text": "Descarga y participa por un SMART TV DE 50 pulgadas: https://cutt.ly/0i41nK",
"send_at":"2018-02-18 17:30:00" "send_at":"2018-02-18 17:30:00"
} }
] ]
}'; }';
$headers = array('Content-Type: application/json'); $headers = array('Content-Type: application/json');
$ch = curl_init('https://api.gateway360.com/api/3.0/sms/send'); $ch = curl_init('https://api.gateway360.com/api/3.0/sms/send');
curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request); curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($ch); $result = curl_exec($ch);
print_r('RESULTADO2 '.$result); print_r('RESULTADO2 '.$result);
if (curl_errno($ch) != 0 ){ if (curl_errno($ch) != 0 ){
die("curl error: ".curl_errno($ch)); die("curl error: ".curl_errno($ch));
} */ } */
/***************************************/ /***************************************/
if($result['error']['code']==0){ if($result['error']['code']==0){
...@@ -161,12 +153,13 @@ class Sms extends BaseSms ...@@ -161,12 +153,13 @@ class Sms extends BaseSms
} }
public static function acortar_url($url) { /* public static function acortar_url($url) {
$usuario = "gearlabs"; $usuario = "gearlabs";
$apikey = "R_8bf0031b8f644fec93997b7b23568b76"; $apikey = "R_8bf0031b8f644fec93997b7b23568b76";
$temp = "http://api.bit.ly/v3/shorten?login=".$usuario."&apiKey=".$apikey."&uri=".$url."&format=txt"; $temp = "http://api.bit.ly/v3/shorten?login=".$usuario."&apiKey=".$apikey."&uri=".$url."&format=txt";
return file_get_contents($temp); return file_get_contents($temp);
} }*/
public static function acortarUrl($data){ public static function acortarUrl($data){
$url = "http://url.gearlabs.cl/acortar"; $url = "http://url.gearlabs.cl/acortar";
......
...@@ -61,21 +61,4 @@ class BackendUsuarioTableMap extends TableMap ...@@ -61,21 +61,4 @@ class BackendUsuarioTableMap extends TableMap
$this->addRelation('BackendusuarioBackendrol', 'AppBundle\\Model\\BackendusuarioBackendrol', RelationMap::ONE_TO_MANY, array('bus_id' => 'bus_id', ), null, null, 'BackendusuarioBackendrols'); $this->addRelation('BackendusuarioBackendrol', 'AppBundle\\Model\\BackendusuarioBackendrol', RelationMap::ONE_TO_MANY, array('bus_id' => 'bus_id', ), null, null, 'BackendusuarioBackendrols');
} // buildRelations() } // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // BackendUsuarioTableMap } // BackendUsuarioTableMap
...@@ -54,25 +54,8 @@ class BackendusuarioBackendrolTableMap extends TableMap ...@@ -54,25 +54,8 @@ class BackendusuarioBackendrolTableMap extends TableMap
*/ */
public function buildRelations() public function buildRelations()
{ {
$this->addRelation('BackendUsuario', 'AppBundle\\Model\\BackendUsuario', RelationMap::MANY_TO_ONE, array('bus_id' => 'bus_id', ), null, null);
$this->addRelation('BackendRol', 'AppBundle\\Model\\BackendRol', RelationMap::MANY_TO_ONE, array('bro_id' => 'bro_id', ), null, null); $this->addRelation('BackendRol', 'AppBundle\\Model\\BackendRol', RelationMap::MANY_TO_ONE, array('bro_id' => 'bro_id', ), null, null);
$this->addRelation('BackendUsuario', 'AppBundle\\Model\\BackendUsuario', RelationMap::MANY_TO_ONE, array('bus_id' => 'bus_id', ), null, null);
} // buildRelations() } // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // BackendusuarioBackendrolTableMap } // BackendusuarioBackendrolTableMap
...@@ -71,21 +71,4 @@ class BatchsmsTableMap extends TableMap ...@@ -71,21 +71,4 @@ class BatchsmsTableMap extends TableMap
$this->addRelation('Sms', 'AppBundle\\Model\\Sms', RelationMap::ONE_TO_MANY, array('batchsms_id' => 'batchsms_id', ), null, null, 'Smss'); $this->addRelation('Sms', 'AppBundle\\Model\\Sms', RelationMap::ONE_TO_MANY, array('batchsms_id' => 'batchsms_id', ), null, null, 'Smss');
} // buildRelations() } // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // BatchsmsTableMap } // BatchsmsTableMap
...@@ -71,21 +71,4 @@ class EmailingTableMap extends TableMap ...@@ -71,21 +71,4 @@ class EmailingTableMap extends TableMap
$this->addRelation('EnvioEmail', 'AppBundle\\Model\\EnvioEmail', RelationMap::ONE_TO_MANY, array('ema_id' => 'ema_id', ), null, null, 'EnvioEmails'); $this->addRelation('EnvioEmail', 'AppBundle\\Model\\EnvioEmail', RelationMap::ONE_TO_MANY, array('ema_id' => 'ema_id', ), null, null, 'EnvioEmails');
} // buildRelations() } // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // EmailingTableMap } // EmailingTableMap
...@@ -72,21 +72,4 @@ class EnvioEmailTableMap extends TableMap ...@@ -72,21 +72,4 @@ class EnvioEmailTableMap extends TableMap
$this->addRelation('Tracking', 'AppBundle\\Model\\Tracking', RelationMap::ONE_TO_MANY, array('eem_id' => 'eem_id', ), null, null, 'Trackings'); $this->addRelation('Tracking', 'AppBundle\\Model\\Tracking', RelationMap::ONE_TO_MANY, array('eem_id' => 'eem_id', ), null, null, 'Trackings');
} // buildRelations() } // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // EnvioEmailTableMap } // EnvioEmailTableMap
...@@ -60,21 +60,4 @@ class McafeeTransaccionPendienteTableMap extends TableMap ...@@ -60,21 +60,4 @@ class McafeeTransaccionPendienteTableMap extends TableMap
$this->addRelation('UsuarioMcafee', 'AppBundle\\Model\\UsuarioMcafee', RelationMap::MANY_TO_ONE, array('umc_id' => 'umc_id', ), null, null); $this->addRelation('UsuarioMcafee', 'AppBundle\\Model\\UsuarioMcafee', RelationMap::MANY_TO_ONE, array('umc_id' => 'umc_id', ), null, null);
} // buildRelations() } // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // McafeeTransaccionPendienteTableMap } // McafeeTransaccionPendienteTableMap
...@@ -66,21 +66,4 @@ class McafeeTransaccionTableMap extends TableMap ...@@ -66,21 +66,4 @@ class McafeeTransaccionTableMap extends TableMap
$this->addRelation('UsuarioMcafee', 'AppBundle\\Model\\UsuarioMcafee', RelationMap::MANY_TO_ONE, array('umc_id' => 'umc_id', ), null, null); $this->addRelation('UsuarioMcafee', 'AppBundle\\Model\\UsuarioMcafee', RelationMap::MANY_TO_ONE, array('umc_id' => 'umc_id', ), null, null);
} // buildRelations() } // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // McafeeTransaccionTableMap } // McafeeTransaccionTableMap
...@@ -59,21 +59,4 @@ class McafeeUltimoProcesoMigracionTableMap extends TableMap ...@@ -59,21 +59,4 @@ class McafeeUltimoProcesoMigracionTableMap extends TableMap
$this->addRelation('UsuariosMcafeeMovistarMigrar', 'AppBundle\\Model\\UsuariosMcafeeMovistarMigrar', RelationMap::MANY_TO_ONE, array('ultimo_umc_id' => 'id', ), null, null); $this->addRelation('UsuariosMcafeeMovistarMigrar', 'AppBundle\\Model\\UsuariosMcafeeMovistarMigrar', RelationMap::MANY_TO_ONE, array('ultimo_umc_id' => 'id', ), null, null);
} // buildRelations() } // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // McafeeUltimoProcesoMigracionTableMap } // McafeeUltimoProcesoMigracionTableMap
...@@ -76,21 +76,4 @@ class NotificacionEmailTableMap extends TableMap ...@@ -76,21 +76,4 @@ class NotificacionEmailTableMap extends TableMap
$this->addRelation('EnvioEmail', 'AppBundle\\Model\\EnvioEmail', RelationMap::MANY_TO_ONE, array('eem_id' => 'eem_id', ), null, null); $this->addRelation('EnvioEmail', 'AppBundle\\Model\\EnvioEmail', RelationMap::MANY_TO_ONE, array('eem_id' => 'eem_id', ), null, null);
} // buildRelations() } // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // NotificacionEmailTableMap } // NotificacionEmailTableMap
...@@ -69,21 +69,4 @@ class SmsTableMap extends TableMap ...@@ -69,21 +69,4 @@ class SmsTableMap extends TableMap
$this->addRelation('UsuarioMcafee', 'AppBundle\\Model\\UsuarioMcafee', RelationMap::MANY_TO_ONE, array('umc_id' => 'umc_id', ), null, null); $this->addRelation('UsuarioMcafee', 'AppBundle\\Model\\UsuarioMcafee', RelationMap::MANY_TO_ONE, array('umc_id' => 'umc_id', ), null, null);
} // buildRelations() } // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // SmsTableMap } // SmsTableMap
...@@ -69,21 +69,4 @@ class TrackingTableMap extends TableMap ...@@ -69,21 +69,4 @@ class TrackingTableMap extends TableMap
$this->addRelation('UsuarioMcafee', 'AppBundle\\Model\\UsuarioMcafee', RelationMap::MANY_TO_ONE, array('umc_id' => 'umc_id', ), null, null); $this->addRelation('UsuarioMcafee', 'AppBundle\\Model\\UsuarioMcafee', RelationMap::MANY_TO_ONE, array('umc_id' => 'umc_id', ), null, null);
} // buildRelations() } // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // TrackingTableMap } // TrackingTableMap
...@@ -58,7 +58,6 @@ class UsuarioMcafeeTableMap extends TableMap ...@@ -58,7 +58,6 @@ class UsuarioMcafeeTableMap extends TableMap
$this->addColumn('umc_permite_email', 'UmcPermiteEmail', 'BOOLEAN', false, 1, true); $this->addColumn('umc_permite_email', 'UmcPermiteEmail', 'BOOLEAN', false, 1, true);
$this->addColumn('umc_fecha_desuscripcion_email', 'UmcFechaDesuscripcionEmail', 'TIMESTAMP', false, null, null); $this->addColumn('umc_fecha_desuscripcion_email', 'UmcFechaDesuscripcionEmail', 'TIMESTAMP', false, null, null);
$this->addColumn('umc_movil', 'UmcMovil', 'VARCHAR', false, 200, null); $this->addColumn('umc_movil', 'UmcMovil', 'VARCHAR', false, 200, null);
$this->addColumn('umc_fijo', 'UmcFijo', 'VARCHAR', false, 200, null);
$this->addColumn('umc_customer_id', 'UmcCustomerId', 'VARCHAR', false, 250, null); $this->addColumn('umc_customer_id', 'UmcCustomerId', 'VARCHAR', false, 250, null);
$this->addColumn('umc_eliminado', 'UmcEliminado', 'BOOLEAN', false, 1, null); $this->addColumn('umc_eliminado', 'UmcEliminado', 'BOOLEAN', false, 1, null);
$this->addColumn('umc_permite_sms', 'UmcPermiteSms', 'BOOLEAN', true, 1, true); $this->addColumn('umc_permite_sms', 'UmcPermiteSms', 'BOOLEAN', true, 1, true);
...@@ -75,26 +74,8 @@ class UsuarioMcafeeTableMap extends TableMap ...@@ -75,26 +74,8 @@ class UsuarioMcafeeTableMap extends TableMap
$this->addRelation('EnvioEmail', 'AppBundle\\Model\\EnvioEmail', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'EnvioEmails'); $this->addRelation('EnvioEmail', 'AppBundle\\Model\\EnvioEmail', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'EnvioEmails');
$this->addRelation('McafeeTransaccion', 'AppBundle\\Model\\McafeeTransaccion', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'McafeeTransaccions'); $this->addRelation('McafeeTransaccion', 'AppBundle\\Model\\McafeeTransaccion', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'McafeeTransaccions');
$this->addRelation('McafeeTransaccionPendiente', 'AppBundle\\Model\\McafeeTransaccionPendiente', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'McafeeTransaccionPendientes'); $this->addRelation('McafeeTransaccionPendiente', 'AppBundle\\Model\\McafeeTransaccionPendiente', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'McafeeTransaccionPendientes');
$this->addRelation('McafeeUltimoProcesoNormalizacion', 'AppBundle\\Model\\McafeeUltimoProcesoNormalizacion', RelationMap::ONE_TO_MANY, array('umc_id' => 'ultimo_umc_id', ), null, null, 'McafeeUltimoProcesoNormalizacions');
$this->addRelation('Sms', 'AppBundle\\Model\\Sms', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'Smss'); $this->addRelation('Sms', 'AppBundle\\Model\\Sms', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'Smss');
$this->addRelation('Tracking', 'AppBundle\\Model\\Tracking', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'Trackings'); $this->addRelation('Tracking', 'AppBundle\\Model\\Tracking', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'Trackings');
} // buildRelations() } // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // UsuarioMcafeeTableMap } // UsuarioMcafeeTableMap
...@@ -43,7 +43,7 @@ class UsuariosMcafeeMovistarMigrarTableMap extends TableMap ...@@ -43,7 +43,7 @@ class UsuariosMcafeeMovistarMigrarTableMap extends TableMap
$this->setUseIdGenerator(true); $this->setUseIdGenerator(true);
// columns // columns
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null); $this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('id_mov', 'IdMov', 'INTEGER', false, null, 0); $this->addColumn('id_mov', 'IdMov', 'INTEGER', true, null, 0);
$this->addColumn('area_tel', 'AreaTel', 'INTEGER', false, null, null); $this->addColumn('area_tel', 'AreaTel', 'INTEGER', false, null, null);
$this->addColumn('rut', 'Rut', 'INTEGER', false, null, null); $this->addColumn('rut', 'Rut', 'INTEGER', false, null, null);
$this->addColumn('nombres', 'Nombres', 'VARCHAR', false, 45, null); $this->addColumn('nombres', 'Nombres', 'VARCHAR', false, 45, null);
......
...@@ -659,19 +659,8 @@ abstract class BaseBackendUsuario extends BaseObject implements Persistent ...@@ -659,19 +659,8 @@ abstract class BaseBackendUsuario extends BaseObject implements Persistent
$ret = $this->preSave($con); $ret = $this->preSave($con);
if ($isInsert) { if ($isInsert) {
$ret = $ret && $this->preInsert($con); $ret = $ret && $this->preInsert($con);
// timestampable behavior
if (!$this->isColumnModified(BackendUsuarioPeer::CREATED_AT)) {
$this->setCreatedAt(time());
}
if (!$this->isColumnModified(BackendUsuarioPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} else { } else {
$ret = $ret && $this->preUpdate($con); $ret = $ret && $this->preUpdate($con);
// timestampable behavior
if ($this->isModified() && !$this->isColumnModified(BackendUsuarioPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} }
if ($ret) { if ($ret) {
$affectedRows = $this->doSave($con); $affectedRows = $this->doSave($con);
...@@ -1620,18 +1609,4 @@ abstract class BaseBackendUsuario extends BaseObject implements Persistent ...@@ -1620,18 +1609,4 @@ abstract class BaseBackendUsuario extends BaseObject implements Persistent
return $this->alreadyInSave; return $this->alreadyInSave;
} }
// timestampable behavior
/**
* Mark the current object so that the update date doesn't get updated during next save
*
* @return BackendUsuario The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
$this->modifiedColumns[] = BackendUsuarioPeer::UPDATED_AT;
return $this;
}
} }
...@@ -631,69 +631,4 @@ abstract class BaseBackendUsuarioQuery extends ModelCriteria ...@@ -631,69 +631,4 @@ abstract class BaseBackendUsuarioQuery extends ModelCriteria
return $this; return $this;
} }
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return BackendUsuarioQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(BackendUsuarioPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return BackendUsuarioQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(BackendUsuarioPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return BackendUsuarioQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(BackendUsuarioPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return BackendUsuarioQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(BackendUsuarioPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return BackendUsuarioQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(BackendUsuarioPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return BackendUsuarioQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(BackendUsuarioPeer::CREATED_AT);
}
} }
...@@ -1023,19 +1023,8 @@ abstract class BaseBatchsms extends BaseObject implements Persistent ...@@ -1023,19 +1023,8 @@ abstract class BaseBatchsms extends BaseObject implements Persistent
$ret = $this->preSave($con); $ret = $this->preSave($con);
if ($isInsert) { if ($isInsert) {
$ret = $ret && $this->preInsert($con); $ret = $ret && $this->preInsert($con);
// timestampable behavior
if (!$this->isColumnModified(BatchsmsPeer::CREATED_AT)) {
$this->setCreatedAt(time());
}
if (!$this->isColumnModified(BatchsmsPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} else { } else {
$ret = $ret && $this->preUpdate($con); $ret = $ret && $this->preUpdate($con);
// timestampable behavior
if ($this->isModified() && !$this->isColumnModified(BatchsmsPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} }
if ($ret) { if ($ret) {
$affectedRows = $this->doSave($con); $affectedRows = $this->doSave($con);
...@@ -2151,18 +2140,4 @@ abstract class BaseBatchsms extends BaseObject implements Persistent ...@@ -2151,18 +2140,4 @@ abstract class BaseBatchsms extends BaseObject implements Persistent
return $this->alreadyInSave; return $this->alreadyInSave;
} }
// timestampable behavior
/**
* Mark the current object so that the update date doesn't get updated during next save
*
* @return Batchsms The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
$this->modifiedColumns[] = BatchsmsPeer::UPDATED_AT;
return $this;
}
} }
...@@ -1130,69 +1130,4 @@ abstract class BaseBatchsmsQuery extends ModelCriteria ...@@ -1130,69 +1130,4 @@ abstract class BaseBatchsmsQuery extends ModelCriteria
return $this; return $this;
} }
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return BatchsmsQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(BatchsmsPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return BatchsmsQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(BatchsmsPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return BatchsmsQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(BatchsmsPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return BatchsmsQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(BatchsmsPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return BatchsmsQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(BatchsmsPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return BatchsmsQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(BatchsmsPeer::CREATED_AT);
}
} }
...@@ -1023,19 +1023,8 @@ abstract class BaseEmailing extends BaseObject implements Persistent ...@@ -1023,19 +1023,8 @@ abstract class BaseEmailing extends BaseObject implements Persistent
$ret = $this->preSave($con); $ret = $this->preSave($con);
if ($isInsert) { if ($isInsert) {
$ret = $ret && $this->preInsert($con); $ret = $ret && $this->preInsert($con);
// timestampable behavior
if (!$this->isColumnModified(EmailingPeer::CREATED_AT)) {
$this->setCreatedAt(time());
}
if (!$this->isColumnModified(EmailingPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} else { } else {
$ret = $ret && $this->preUpdate($con); $ret = $ret && $this->preUpdate($con);
// timestampable behavior
if ($this->isModified() && !$this->isColumnModified(EmailingPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} }
if ($ret) { if ($ret) {
$affectedRows = $this->doSave($con); $affectedRows = $this->doSave($con);
...@@ -2151,18 +2140,4 @@ abstract class BaseEmailing extends BaseObject implements Persistent ...@@ -2151,18 +2140,4 @@ abstract class BaseEmailing extends BaseObject implements Persistent
return $this->alreadyInSave; return $this->alreadyInSave;
} }
// timestampable behavior
/**
* Mark the current object so that the update date doesn't get updated during next save
*
* @return Emailing The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
$this->modifiedColumns[] = EmailingPeer::UPDATED_AT;
return $this;
}
} }
...@@ -1130,69 +1130,4 @@ abstract class BaseEmailingQuery extends ModelCriteria ...@@ -1130,69 +1130,4 @@ abstract class BaseEmailingQuery extends ModelCriteria
return $this; return $this;
} }
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return EmailingQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(EmailingPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return EmailingQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(EmailingPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return EmailingQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(EmailingPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return EmailingQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(EmailingPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return EmailingQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(EmailingPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return EmailingQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(EmailingPeer::CREATED_AT);
}
} }
...@@ -1053,19 +1053,8 @@ abstract class BaseEnvioEmail extends BaseObject implements Persistent ...@@ -1053,19 +1053,8 @@ abstract class BaseEnvioEmail extends BaseObject implements Persistent
$ret = $this->preSave($con); $ret = $this->preSave($con);
if ($isInsert) { if ($isInsert) {
$ret = $ret && $this->preInsert($con); $ret = $ret && $this->preInsert($con);
// timestampable behavior
if (!$this->isColumnModified(EnvioEmailPeer::CREATED_AT)) {
$this->setCreatedAt(time());
}
if (!$this->isColumnModified(EnvioEmailPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} else { } else {
$ret = $ret && $this->preUpdate($con); $ret = $ret && $this->preUpdate($con);
// timestampable behavior
if ($this->isModified() && !$this->isColumnModified(EnvioEmailPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} }
if ($ret) { if ($ret) {
$affectedRows = $this->doSave($con); $affectedRows = $this->doSave($con);
...@@ -2574,18 +2563,4 @@ abstract class BaseEnvioEmail extends BaseObject implements Persistent ...@@ -2574,18 +2563,4 @@ abstract class BaseEnvioEmail extends BaseObject implements Persistent
return $this->alreadyInSave; return $this->alreadyInSave;
} }
// timestampable behavior
/**
* Mark the current object so that the update date doesn't get updated during next save
*
* @return EnvioEmail The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
$this->modifiedColumns[] = EnvioEmailPeer::UPDATED_AT;
return $this;
}
} }
...@@ -1207,69 +1207,4 @@ abstract class BaseEnvioEmailQuery extends ModelCriteria ...@@ -1207,69 +1207,4 @@ abstract class BaseEnvioEmailQuery extends ModelCriteria
return $this; return $this;
} }
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return EnvioEmailQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(EnvioEmailPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return EnvioEmailQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(EnvioEmailPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return EnvioEmailQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(EnvioEmailPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return EnvioEmailQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(EnvioEmailPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return EnvioEmailQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(EnvioEmailPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return EnvioEmailQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(EnvioEmailPeer::CREATED_AT);
}
} }
...@@ -817,19 +817,8 @@ abstract class BaseMcafeeTransaccion extends BaseObject implements Persistent ...@@ -817,19 +817,8 @@ abstract class BaseMcafeeTransaccion extends BaseObject implements Persistent
$ret = $this->preSave($con); $ret = $this->preSave($con);
if ($isInsert) { if ($isInsert) {
$ret = $ret && $this->preInsert($con); $ret = $ret && $this->preInsert($con);
// timestampable behavior
if (!$this->isColumnModified(McafeeTransaccionPeer::CREATED_AT)) {
$this->setCreatedAt(time());
}
if (!$this->isColumnModified(McafeeTransaccionPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} else { } else {
$ret = $ret && $this->preUpdate($con); $ret = $ret && $this->preUpdate($con);
// timestampable behavior
if ($this->isModified() && !$this->isColumnModified(McafeeTransaccionPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} }
if ($ret) { if ($ret) {
$affectedRows = $this->doSave($con); $affectedRows = $this->doSave($con);
...@@ -1633,18 +1622,4 @@ abstract class BaseMcafeeTransaccion extends BaseObject implements Persistent ...@@ -1633,18 +1622,4 @@ abstract class BaseMcafeeTransaccion extends BaseObject implements Persistent
return $this->alreadyInSave; return $this->alreadyInSave;
} }
// timestampable behavior
/**
* Mark the current object so that the update date doesn't get updated during next save
*
* @return McafeeTransaccion The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
$this->modifiedColumns[] = McafeeTransaccionPeer::UPDATED_AT;
return $this;
}
} }
...@@ -583,19 +583,8 @@ abstract class BaseMcafeeTransaccionPendiente extends BaseObject implements Pers ...@@ -583,19 +583,8 @@ abstract class BaseMcafeeTransaccionPendiente extends BaseObject implements Pers
$ret = $this->preSave($con); $ret = $this->preSave($con);
if ($isInsert) { if ($isInsert) {
$ret = $ret && $this->preInsert($con); $ret = $ret && $this->preInsert($con);
// timestampable behavior
if (!$this->isColumnModified(McafeeTransaccionPendientePeer::CREATED_AT)) {
$this->setCreatedAt(time());
}
if (!$this->isColumnModified(McafeeTransaccionPendientePeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} else { } else {
$ret = $ret && $this->preUpdate($con); $ret = $ret && $this->preUpdate($con);
// timestampable behavior
if ($this->isModified() && !$this->isColumnModified(McafeeTransaccionPendientePeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} }
if ($ret) { if ($ret) {
$affectedRows = $this->doSave($con); $affectedRows = $this->doSave($con);
...@@ -1297,18 +1286,4 @@ abstract class BaseMcafeeTransaccionPendiente extends BaseObject implements Pers ...@@ -1297,18 +1286,4 @@ abstract class BaseMcafeeTransaccionPendiente extends BaseObject implements Pers
return $this->alreadyInSave; return $this->alreadyInSave;
} }
// timestampable behavior
/**
* Mark the current object so that the update date doesn't get updated during next save
*
* @return McafeeTransaccionPendiente The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
$this->modifiedColumns[] = McafeeTransaccionPendientePeer::UPDATED_AT;
return $this;
}
} }
...@@ -643,69 +643,4 @@ abstract class BaseMcafeeTransaccionPendienteQuery extends ModelCriteria ...@@ -643,69 +643,4 @@ abstract class BaseMcafeeTransaccionPendienteQuery extends ModelCriteria
return $this; return $this;
} }
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return McafeeTransaccionPendienteQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(McafeeTransaccionPendientePeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return McafeeTransaccionPendienteQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(McafeeTransaccionPendientePeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return McafeeTransaccionPendienteQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(McafeeTransaccionPendientePeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return McafeeTransaccionPendienteQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(McafeeTransaccionPendientePeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return McafeeTransaccionPendienteQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(McafeeTransaccionPendientePeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return McafeeTransaccionPendienteQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(McafeeTransaccionPendientePeer::CREATED_AT);
}
} }
...@@ -828,69 +828,4 @@ abstract class BaseMcafeeTransaccionQuery extends ModelCriteria ...@@ -828,69 +828,4 @@ abstract class BaseMcafeeTransaccionQuery extends ModelCriteria
return $this; return $this;
} }
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return McafeeTransaccionQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(McafeeTransaccionPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return McafeeTransaccionQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(McafeeTransaccionPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return McafeeTransaccionQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(McafeeTransaccionPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return McafeeTransaccionQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(McafeeTransaccionPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return McafeeTransaccionQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(McafeeTransaccionPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return McafeeTransaccionQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(McafeeTransaccionPeer::CREATED_AT);
}
} }
...@@ -544,19 +544,8 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe ...@@ -544,19 +544,8 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe
$ret = $this->preSave($con); $ret = $this->preSave($con);
if ($isInsert) { if ($isInsert) {
$ret = $ret && $this->preInsert($con); $ret = $ret && $this->preInsert($con);
// timestampable behavior
if (!$this->isColumnModified(McafeeUltimoProcesoMigracionPeer::CREATED_AT)) {
$this->setCreatedAt(time());
}
if (!$this->isColumnModified(McafeeUltimoProcesoMigracionPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} else { } else {
$ret = $ret && $this->preUpdate($con); $ret = $ret && $this->preUpdate($con);
// timestampable behavior
if ($this->isModified() && !$this->isColumnModified(McafeeUltimoProcesoMigracionPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} }
if ($ret) { if ($ret) {
$affectedRows = $this->doSave($con); $affectedRows = $this->doSave($con);
...@@ -1241,18 +1230,4 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe ...@@ -1241,18 +1230,4 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe
return $this->alreadyInSave; return $this->alreadyInSave;
} }
// timestampable behavior
/**
* Mark the current object so that the update date doesn't get updated during next save
*
* @return McafeeUltimoProcesoMigracion The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
$this->modifiedColumns[] = McafeeUltimoProcesoMigracionPeer::UPDATED_AT;
return $this;
}
} }
...@@ -597,69 +597,4 @@ abstract class BaseMcafeeUltimoProcesoMigracionQuery extends ModelCriteria ...@@ -597,69 +597,4 @@ abstract class BaseMcafeeUltimoProcesoMigracionQuery extends ModelCriteria
return $this; return $this;
} }
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return McafeeUltimoProcesoMigracionQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(McafeeUltimoProcesoMigracionPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return McafeeUltimoProcesoMigracionQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(McafeeUltimoProcesoMigracionPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return McafeeUltimoProcesoMigracionQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(McafeeUltimoProcesoMigracionPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return McafeeUltimoProcesoMigracionQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(McafeeUltimoProcesoMigracionPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return McafeeUltimoProcesoMigracionQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(McafeeUltimoProcesoMigracionPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return McafeeUltimoProcesoMigracionQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(McafeeUltimoProcesoMigracionPeer::CREATED_AT);
}
} }
...@@ -1339,19 +1339,8 @@ abstract class BaseNotificacionEmail extends BaseObject implements Persistent ...@@ -1339,19 +1339,8 @@ abstract class BaseNotificacionEmail extends BaseObject implements Persistent
$ret = $this->preSave($con); $ret = $this->preSave($con);
if ($isInsert) { if ($isInsert) {
$ret = $ret && $this->preInsert($con); $ret = $ret && $this->preInsert($con);
// timestampable behavior
if (!$this->isColumnModified(NotificacionEmailPeer::CREATED_AT)) {
$this->setCreatedAt(time());
}
if (!$this->isColumnModified(NotificacionEmailPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} else { } else {
$ret = $ret && $this->preUpdate($con); $ret = $ret && $this->preUpdate($con);
// timestampable behavior
if ($this->isModified() && !$this->isColumnModified(NotificacionEmailPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} }
if ($ret) { if ($ret) {
$affectedRows = $this->doSave($con); $affectedRows = $this->doSave($con);
...@@ -2325,18 +2314,4 @@ abstract class BaseNotificacionEmail extends BaseObject implements Persistent ...@@ -2325,18 +2314,4 @@ abstract class BaseNotificacionEmail extends BaseObject implements Persistent
return $this->alreadyInSave; return $this->alreadyInSave;
} }
// timestampable behavior
/**
* Mark the current object so that the update date doesn't get updated during next save
*
* @return NotificacionEmail The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
$this->modifiedColumns[] = NotificacionEmailPeer::UPDATED_AT;
return $this;
}
} }
...@@ -1199,69 +1199,4 @@ abstract class BaseNotificacionEmailQuery extends ModelCriteria ...@@ -1199,69 +1199,4 @@ abstract class BaseNotificacionEmailQuery extends ModelCriteria
return $this; return $this;
} }
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return NotificacionEmailQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(NotificacionEmailPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return NotificacionEmailQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(NotificacionEmailPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return NotificacionEmailQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(NotificacionEmailPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return NotificacionEmailQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(NotificacionEmailPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return NotificacionEmailQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(NotificacionEmailPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return NotificacionEmailQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(NotificacionEmailPeer::CREATED_AT);
}
} }
...@@ -980,19 +980,8 @@ abstract class BaseSms extends BaseObject implements Persistent ...@@ -980,19 +980,8 @@ abstract class BaseSms extends BaseObject implements Persistent
$ret = $this->preSave($con); $ret = $this->preSave($con);
if ($isInsert) { if ($isInsert) {
$ret = $ret && $this->preInsert($con); $ret = $ret && $this->preInsert($con);
// timestampable behavior
if (!$this->isColumnModified(SmsPeer::CREATED_AT)) {
$this->setCreatedAt(time());
}
if (!$this->isColumnModified(SmsPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} else { } else {
$ret = $ret && $this->preUpdate($con); $ret = $ret && $this->preUpdate($con);
// timestampable behavior
if ($this->isModified() && !$this->isColumnModified(SmsPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} }
if ($ret) { if ($ret) {
$affectedRows = $this->doSave($con); $affectedRows = $this->doSave($con);
...@@ -1902,18 +1891,4 @@ abstract class BaseSms extends BaseObject implements Persistent ...@@ -1902,18 +1891,4 @@ abstract class BaseSms extends BaseObject implements Persistent
return $this->alreadyInSave; return $this->alreadyInSave;
} }
// timestampable behavior
/**
* Mark the current object so that the update date doesn't get updated during next save
*
* @return Sms The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
$this->modifiedColumns[] = SmsPeer::UPDATED_AT;
return $this;
}
} }
...@@ -1016,69 +1016,4 @@ abstract class BaseSmsQuery extends ModelCriteria ...@@ -1016,69 +1016,4 @@ abstract class BaseSmsQuery extends ModelCriteria
return $this; return $this;
} }
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return SmsQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(SmsPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return SmsQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(SmsPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return SmsQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(SmsPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return SmsQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(SmsPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return SmsQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(SmsPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return SmsQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(SmsPeer::CREATED_AT);
}
} }
...@@ -918,19 +918,8 @@ abstract class BaseTracking extends BaseObject implements Persistent ...@@ -918,19 +918,8 @@ abstract class BaseTracking extends BaseObject implements Persistent
$ret = $this->preSave($con); $ret = $this->preSave($con);
if ($isInsert) { if ($isInsert) {
$ret = $ret && $this->preInsert($con); $ret = $ret && $this->preInsert($con);
// timestampable behavior
if (!$this->isColumnModified(TrackingPeer::CREATED_AT)) {
$this->setCreatedAt(time());
}
if (!$this->isColumnModified(TrackingPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} else { } else {
$ret = $ret && $this->preUpdate($con); $ret = $ret && $this->preUpdate($con);
// timestampable behavior
if ($this->isModified() && !$this->isColumnModified(TrackingPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} }
if ($ret) { if ($ret) {
$affectedRows = $this->doSave($con); $affectedRows = $this->doSave($con);
...@@ -1840,18 +1829,4 @@ abstract class BaseTracking extends BaseObject implements Persistent ...@@ -1840,18 +1829,4 @@ abstract class BaseTracking extends BaseObject implements Persistent
return $this->alreadyInSave; return $this->alreadyInSave;
} }
// timestampable behavior
/**
* Mark the current object so that the update date doesn't get updated during next save
*
* @return Tracking The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
$this->modifiedColumns[] = TrackingPeer::UPDATED_AT;
return $this;
}
} }
...@@ -988,69 +988,4 @@ abstract class BaseTrackingQuery extends ModelCriteria ...@@ -988,69 +988,4 @@ abstract class BaseTrackingQuery extends ModelCriteria
return $this; return $this;
} }
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return TrackingQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(TrackingPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return TrackingQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(TrackingPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return TrackingQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(TrackingPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return TrackingQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(TrackingPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return TrackingQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(TrackingPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return TrackingQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(TrackingPeer::CREATED_AT);
}
} }
...@@ -36,19 +36,15 @@ class McafeeEnviarSmsCommand extends ContainerAwareCommand ...@@ -36,19 +36,15 @@ class McafeeEnviarSmsCommand extends ContainerAwareCommand
$log->debug('************************Iniciando McafeeEnviarSmsCommand ************************'); $log->debug('************************Iniciando McafeeEnviarSmsCommand ************************');
$tt = new TiempoTranscurrido(); $tt = new TiempoTranscurrido();
$fp = fopen("C:\ana3\movistarChile\prueba.csv", "r"); $fp = fopen("/opt/sdp/intelsecuritymovistar/etc/sms/3_36460.csv", "r");
//$fp = fopen("C:\ana3\movistarChile\prueba.csv", "r");
if (!$fp) { if (!$fp) {
$log->warning('Error al intentar abrir el archivo'); $log->warning('Error al intentar abrir el archivo');
$output->writeln('Error al intentar abrir el archivo.'); $output->writeln('Error al intentar abrir el archivo.');
return; return;
} }
$urlBase = 'https://www.seguridadtotalmcafee.cl';
$urlDescarga = $urlBase.'/#ROUTING/#CAMPANA/#STRUSUARIO/#PROCEDENCIA/#SMSID';
$tDesOK = 0; $tDesOK = 0;
$tDesNOOK = 0; $tDesNOOK = 0;
...@@ -63,7 +59,9 @@ class McafeeEnviarSmsCommand extends ContainerAwareCommand ...@@ -63,7 +59,9 @@ class McafeeEnviarSmsCommand extends ContainerAwareCommand
$count = 1; $count = 1;
$TOTAL = 0; $TOTAL = 0;
$batchsms = new Batchsms(); $batchsms = new Batchsms();
$batchsms->setBatchsmsEliminado(Batchsms::ELIMINADO_FALSE); $batchsms->setBatchsmsEliminado(Batchsms::ELIMINADO_FALSE);
$batchsms->save(); $batchsms->save();
...@@ -123,12 +121,10 @@ class McafeeEnviarSmsCommand extends ContainerAwareCommand ...@@ -123,12 +121,10 @@ class McafeeEnviarSmsCommand extends ContainerAwareCommand
$mensaje="Descarga y participa por un SMART TV DE 50: "; $mensaje="Descarga y participa por un SMART TV DE 50: ";
$urlDescarga = $usuarioMcafee->getUmcMcafeeKeycard();
$sms = Sms::enviarSms($urlDescarga, $movil, $usuarioMcafee, $batchsms, $campana, $mensaje, Sms::TIPO_MASIVO,null,$log, $this->getContainer()); $sms = Sms::enviarSms($urlDescarga, $movil, $usuarioMcafee, $batchsms, $campana, $mensaje, Sms::TIPO_MASIVO,null,$log, $this->getContainer());
if($sms){ if($sms){
$tEnviadoOK++; $tEnviadoOK++;
$cont = $cont+1; $cont = $cont+1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment