Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smsManager
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cristian Mauricio Diaz Canales
smsManager
Commits
f4565104
Commit
f4565104
authored
Jun 13, 2019
by
Ana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corregir conflictos
parent
18d8efbe
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
51 additions
and
1290 deletions
+51
-1290
app/propel/generated-schemas/default_reversed_schema.xml
app/propel/generated-schemas/default_reversed_schema.xml
+0
-52
src/AppBundle/Model/Sms.php
src/AppBundle/Model/Sms.php
+41
-88
src/AppBundle/Model/map/BatchsmsTableMap.php
src/AppBundle/Model/map/BatchsmsTableMap.php
+0
-20
src/AppBundle/Model/map/SmsTableMap.php
src/AppBundle/Model/map/SmsTableMap.php
+0
-20
src/AppBundle/Model/map/UsuarioMcafeeTableMap.php
src/AppBundle/Model/map/UsuarioMcafeeTableMap.php
+0
-4
src/AppBundle/Model/om/BaseBatchsms.php
src/AppBundle/Model/om/BaseBatchsms.php
+0
-33
src/AppBundle/Model/om/BaseBatchsmsQuery.php
src/AppBundle/Model/om/BaseBatchsmsQuery.php
+0
-68
src/AppBundle/Model/om/BaseSms.php
src/AppBundle/Model/om/BaseSms.php
+0
-33
src/AppBundle/Model/om/BaseSmsQuery.php
src/AppBundle/Model/om/BaseSmsQuery.php
+0
-68
src/AppBundle/Model/om/BaseUsuarioMcafee.php
src/AppBundle/Model/om/BaseUsuarioMcafee.php
+3
-395
src/AppBundle/Model/om/BaseUsuarioMcafeePeer.php
src/AppBundle/Model/om/BaseUsuarioMcafeePeer.php
+2
-20
src/AppBundle/Model/om/BaseUsuarioMcafeeQuery.php
src/AppBundle/Model/om/BaseUsuarioMcafeeQuery.php
+0
-86
src/AppBundle/Resources/config/default_reversed_schema.xml
src/AppBundle/Resources/config/default_reversed_schema.xml
+0
-380
src/BackendBundle/Command/McafeeEnviarSmsCommand.php
src/BackendBundle/Command/McafeeEnviarSmsCommand.php
+5
-23
No files found.
app/propel/generated-schemas/default_reversed_schema.xml
View file @
f4565104
...
...
@@ -176,23 +176,6 @@
<parameter
name=
"Engine"
value=
"InnoDB"
/>
</vendor>
</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"
>
<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"
/>
...
...
@@ -345,12 +328,6 @@
<index
name=
"indice_umc_movistar_any"
>
<index-column
name=
"umc_movistar_any"
/>
</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"
>
<parameter
name=
"Engine"
value=
"InnoDB"
/>
</vendor>
...
...
@@ -392,35 +369,6 @@
<index
name=
"ccid"
>
<index-column
name=
"Ccid"
/>
</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"
>
<parameter
name=
"Engine"
value=
"InnoDB"
/>
</vendor>
...
...
src/AppBundle/Model/Sms.php
View file @
f4565104
...
...
@@ -28,10 +28,7 @@ class Sms extends BaseSms
//$FROM_EMAIL = 'no-reply@seguridadtotalmcafee.cl';
//$FROM_EMAIL = 'fcastro@gearlabs.cl';
$envioEmail
=
null
;
<<<<<<<
HEAD
=======
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
$tag
=
'[enviarSms]'
;
$log
->
debug
(
$tag
.
"entrando... tipoSms:
$tipoSms
| campana:
$campana
| movil:
$movil
| umcId:"
.
$usuarioMcafee
->
getUmcId
());
try
{
...
...
@@ -52,43 +49,22 @@ class Sms extends BaseSms
$sms
->
setSmsTransIdCliente
(
$transIdCliente
);
$sms
->
setSmsEliminado
(
EnvioEmail
::
ELIMINADO_FALSE
);
$sms
->
save
();
<<<<<<<
HEAD
$urlDescarga
=
Sms
::
acortarUrl
(
$url
);
// $urlDescarga = Sms::acortar_url($url);
//$urlDescarga = $url;
//$urlDescarga = Sms::acortarUrl($url);
$urlDescarga
=
$url
;
$mensaje
=
$mensaje
.
$urlDescarga
;
$post
[
'to'
]
=
array
(
$movil
);
=======
$url
=
str_replace
(
'#CAMPANA'
,
$campana
,
$url
);
$url
=
str_replace
(
'#STRUSUARIO'
,
$usuarioMcafee
->
getUmcParametroEncriptado
(),
$url
);
$url
=
str_replace
(
'#SMSID'
,
$sms
->
getSmsId
(),
$url
);
$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
;
$post
[
'to'
]
=
array
(
$movil
);
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
/* $post['to'] = array($movil);
$post['text'] = $mensaje;
$post['from'] = 'McAfee';
$user ='GearLabs';
...
...
@@ -109,20 +85,12 @@ class Sms extends BaseSms
print_r($result);
//print_r($result['error']['code']);
$log
->
debug
(
$tag
.
'enviando mensaje...'
.
$urlDescarga
);
<<<<<<<
HEAD
/***************************************/
/* $request = '{
=======
$log->debug($tag.'enviando mensaje...'. $urlDescarga);*/
/***************************************/
/* $request = '{
>>>>>>> 1631fbd75af5098b86e14ff858d86fbf3506daf8
$request
=
'{
"api_key":"9df2cfda7cc871680ede6ec24b4a479d",
"report_url":"http://servidoctor.com/callback/script",
"concat":1,
...
...
@@ -130,19 +98,11 @@ class Sms extends BaseSms
{
"from":"McAfee",
"to":"584165388803",
<<<<<<< HEAD
"text": "Descarga y participa por un SMART TV DE 50 pulgadas: https://cutt.ly/0i41nK",
=======
"text": "Descarga y participa por un SMART TV DE 50 pulgadas: http://bit.ly/2wHyOwK",
>>>>>>> 1631fbd75af5098b86e14ff858d86fbf3506daf8
"send_at":"2018-02-18 17:30:00"
}
]
}'
;
<<<<<<< HEAD
=======
>>>>>>> 1631fbd75af5098b86e14ff858d86fbf3506daf8
$headers
=
array
(
'Content-Type: application/json'
);
...
...
@@ -159,7 +119,7 @@ class Sms extends BaseSms
if
(
curl_errno
(
$ch
)
!=
0
){
die
(
"curl error: "
.
curl_errno
(
$ch
));
} */
}
/***************************************/
if
(
$result
[
'error'
][
'code'
]
==
0
){
...
...
@@ -194,20 +154,13 @@ class Sms extends BaseSms
}
<<<<<<<
HEAD
/* public static function acortar_url($url) {
=======
public static function acortar_url($url) {
>>>>>>> 1631fbd75af5098b86e14ff858d86fbf3506daf8
$usuario = "gearlabs";
$apikey = "R_8bf0031b8f644fec93997b7b23568b76";
$temp = "http://api.bit.ly/v3/shorten?login=".$usuario."&apiKey=".$apikey."&uri=".$url."&format=txt";
return file_get_contents($temp);
<<<<<<< HEAD
}*/
=======
}
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
public
static
function
acortarUrl
(
$data
){
$url
=
"http://url.gearlabs.cl/acortar"
;
...
...
src/AppBundle/Model/map/BatchsmsTableMap.php
View file @
f4565104
...
...
@@ -71,24 +71,4 @@ class BatchsmsTableMap extends TableMap
$this
->
addRelation
(
'Sms'
,
'AppBundle\\Model\\Sms'
,
RelationMap
::
ONE_TO_MANY
,
array
(
'batchsms_id'
=>
'batchsms_id'
,
),
null
,
null
,
'Smss'
);
}
// buildRelations()
<<<<<<<
HEAD
=======
/**
*
* 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()
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
}
// BatchsmsTableMap
src/AppBundle/Model/map/SmsTableMap.php
View file @
f4565104
...
...
@@ -69,24 +69,4 @@ class SmsTableMap extends TableMap
$this
->
addRelation
(
'UsuarioMcafee'
,
'AppBundle\\Model\\UsuarioMcafee'
,
RelationMap
::
MANY_TO_ONE
,
array
(
'umc_id'
=>
'umc_id'
,
),
null
,
null
);
}
// buildRelations()
<<<<<<<
HEAD
=======
/**
*
* 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()
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
}
// SmsTableMap
src/AppBundle/Model/map/UsuarioMcafeeTableMap.php
View file @
f4565104
...
...
@@ -74,10 +74,6 @@ class UsuarioMcafeeTableMap extends TableMap
$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
(
'McafeeTransaccionPendiente'
,
'AppBundle\\Model\\McafeeTransaccionPendiente'
,
RelationMap
::
ONE_TO_MANY
,
array
(
'umc_id'
=>
'umc_id'
,
),
null
,
null
,
'McafeeTransaccionPendientes'
);
<<<<<<<
HEAD
=======
$this
->
addRelation
(
'McafeeUltimoProcesoNormalizacion'
,
'AppBundle\\Model\\McafeeUltimoProcesoNormalizacion'
,
RelationMap
::
ONE_TO_MANY
,
array
(
'umc_id'
=>
'ultimo_umc_id'
,
),
null
,
null
,
'McafeeUltimoProcesoNormalizacions'
);
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
$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'
);
}
// buildRelations()
...
...
src/AppBundle/Model/om/BaseBatchsms.php
View file @
f4565104
...
...
@@ -1023,24 +1023,8 @@ abstract class BaseBatchsms extends BaseObject implements Persistent
$ret
=
$this
->
preSave
(
$con
);
if
(
$isInsert
)
{
$ret
=
$ret
&&
$this
->
preInsert
(
$con
);
<<<<<<<
HEAD
}
else
{
$ret
=
$ret
&&
$this
->
preUpdate
(
$con
);
=======
// timestampable behavior
if
(
!
$this
->
isColumnModified
(
BatchsmsPeer
::
CREATED_AT
))
{
$this
->
setCreatedAt
(
time
());
}
if
(
!
$this
->
isColumnModified
(
BatchsmsPeer
::
UPDATED_AT
))
{
$this
->
setUpdatedAt
(
time
());
}
}
else
{
$ret
=
$ret
&&
$this
->
preUpdate
(
$con
);
// timestampable behavior
if
(
$this
->
isModified
()
&&
!
$this
->
isColumnModified
(
BatchsmsPeer
::
UPDATED_AT
))
{
$this
->
setUpdatedAt
(
time
());
}
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
}
if
(
$ret
)
{
$affectedRows
=
$this
->
doSave
(
$con
);
...
...
@@ -2156,21 +2140,4 @@ abstract class BaseBatchsms extends BaseObject implements Persistent
return
$this
->
alreadyInSave
;
}
<<<<<<<
HEAD
=======
// 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
;
}
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
}
src/AppBundle/Model/om/BaseBatchsmsQuery.php
View file @
f4565104
...
...
@@ -1130,72 +1130,4 @@ abstract class BaseBatchsmsQuery extends ModelCriteria
return
$this
;
}
<<<<<<<
HEAD
=======
// 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
);
}
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
}
src/AppBundle/Model/om/BaseSms.php
View file @
f4565104
...
...
@@ -980,24 +980,8 @@ abstract class BaseSms extends BaseObject implements Persistent
$ret
=
$this
->
preSave
(
$con
);
if
(
$isInsert
)
{
$ret
=
$ret
&&
$this
->
preInsert
(
$con
);
<<<<<<<
HEAD
}
else
{
$ret
=
$ret
&&
$this
->
preUpdate
(
$con
);
=======
// timestampable behavior
if
(
!
$this
->
isColumnModified
(
SmsPeer
::
CREATED_AT
))
{
$this
->
setCreatedAt
(
time
());
}
if
(
!
$this
->
isColumnModified
(
SmsPeer
::
UPDATED_AT
))
{
$this
->
setUpdatedAt
(
time
());
}
}
else
{
$ret
=
$ret
&&
$this
->
preUpdate
(
$con
);
// timestampable behavior
if
(
$this
->
isModified
()
&&
!
$this
->
isColumnModified
(
SmsPeer
::
UPDATED_AT
))
{
$this
->
setUpdatedAt
(
time
());
}
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
}
if
(
$ret
)
{
$affectedRows
=
$this
->
doSave
(
$con
);
...
...
@@ -1907,21 +1891,4 @@ abstract class BaseSms extends BaseObject implements Persistent
return
$this
->
alreadyInSave
;
}
<<<<<<<
HEAD
=======
// 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
;
}
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
}
src/AppBundle/Model/om/BaseSmsQuery.php
View file @
f4565104
...
...
@@ -1016,72 +1016,4 @@ abstract class BaseSmsQuery extends ModelCriteria
return
$this
;
}
<<<<<<<
HEAD
=======
// 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
);
}
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
}
src/AppBundle/Model/om/BaseUsuarioMcafee.php
View file @
f4565104
This diff is collapsed.
Click to expand it.
src/AppBundle/Model/om/BaseUsuarioMcafeePeer.php
View file @
f4565104
This diff is collapsed.
Click to expand it.
src/AppBundle/Model/om/BaseUsuarioMcafeeQuery.php
View file @
f4565104
...
...
@@ -15,10 +15,6 @@ use \PropelPDO;
use
AppBundle\Model\EnvioEmail
;
use
AppBundle\Model\McafeeTransaccion
;
use
AppBundle\Model\McafeeTransaccionPendiente
;
<<<<<<<
HEAD
=======
use
AppBundle\Model\McafeeUltimoProcesoNormalizacion
;
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
use
AppBundle\Model\Sms
;
use
AppBundle\Model\Tracking
;
use
AppBundle\Model\UsuarioMcafee
;
...
...
@@ -90,10 +86,6 @@ use AppBundle\Model\UsuarioMcafeeQuery;
* @method UsuarioMcafeeQuery rightJoinSms($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Sms relation
* @method UsuarioMcafeeQuery innerJoinSms($relationAlias = null) Adds a INNER JOIN clause to the query using the Sms relation
*
* @method UsuarioMcafeeQuery leftJoinSms($relationAlias = null) Adds a LEFT JOIN clause to the query using the Sms relation
* @method UsuarioMcafeeQuery rightJoinSms($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Sms relation
* @method UsuarioMcafeeQuery innerJoinSms($relationAlias = null) Adds a INNER JOIN clause to the query using the Sms relation
*
* @method UsuarioMcafeeQuery leftJoinTracking($relationAlias = null) Adds a LEFT JOIN clause to the query using the Tracking relation
* @method UsuarioMcafeeQuery rightJoinTracking($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Tracking relation
* @method UsuarioMcafeeQuery innerJoinTracking($relationAlias = null) Adds a INNER JOIN clause to the query using the Tracking relation
...
...
@@ -248,11 +240,7 @@ abstract class BaseUsuarioMcafeeQuery extends ModelCriteria
*/
protected
function
findPkSimple
(
$key
,
$con
)
{
<<<<<<<
HEAD
$sql
=
'SELECT `umc_id`, `umc_mcafee_tipo_producto`, `umc_mcafee_affid`, `umc_mcafee_ccid`, `umc_mcafee_email`, `umc_mcafee_sku`, `umc_mcafee_keycard`, `umc_mcafee_status`, `umc_movistar_activo`, `umc_movistar_any`, `umc_movistar_email`, `umc_movistar_rut`, `umc_parametro_encriptado`, `umc_permite_email`, `umc_fecha_desuscripcion_email`, `umc_movil`, `umc_customer_id`, `umc_eliminado`, `umc_permite_sms`, `created_at`, `updated_at` FROM `usuario_mcafee` WHERE `umc_id` = :p0'
;
=======
$sql
=
'SELECT `umc_id`, `umc_mcafee_tipo_producto`, `umc_mcafee_affid`, `umc_mcafee_ccid`, `umc_mcafee_email`, `umc_mcafee_sku`, `umc_mcafee_keycard`, `umc_mcafee_status`, `umc_movistar_activo`, `umc_movistar_any`, `umc_movistar_email`, `umc_movistar_rut`, `umc_parametro_encriptado`, `umc_permite_email`, `umc_fecha_desuscripcion_email`, `umc_movil`, `umc_fijo`, `umc_customer_id`, `umc_eliminado`, `umc_permite_sms`, `created_at`, `updated_at` FROM `usuario_mcafee` WHERE `umc_id` = :p0'
;
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
try
{
$stmt
=
$con
->
prepare
(
$sql
);
$stmt
->
bindValue
(
':p0'
,
$key
,
PDO
::
PARAM_INT
);
...
...
@@ -1319,80 +1307,6 @@ abstract class BaseUsuarioMcafeeQuery extends ModelCriteria
->
useQuery
(
$relationAlias
?
$relationAlias
:
'Sms'
,
'\AppBundle\Model\SmsQuery'
);
}
/**
* Filter the query by a related Sms object
*
* @param Sms|PropelObjectCollection $sms the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return UsuarioMcafeeQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public
function
filterBySms
(
$sms
,
$comparison
=
null
)
{
if
(
$sms
instanceof
Sms
)
{
return
$this
->
addUsingAlias
(
UsuarioMcafeePeer
::
UMC_ID
,
$sms
->
getUmcId
(),
$comparison
);
}
elseif
(
$sms
instanceof
PropelObjectCollection
)
{
return
$this
->
useSmsQuery
()
->
filterByPrimaryKeys
(
$sms
->
getPrimaryKeys
())
->
endUse
();
}
else
{
throw
new
PropelException
(
'filterBySms() only accepts arguments of type Sms or PropelCollection'
);
}
}
/**
* Adds a JOIN clause to the query using the Sms relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return UsuarioMcafeeQuery The current query, for fluid interface
*/
public
function
joinSms
(
$relationAlias
=
null
,
$joinType
=
Criteria
::
LEFT_JOIN
)
{
$tableMap
=
$this
->
getTableMap
();
$relationMap
=
$tableMap
->
getRelation
(
'Sms'
);
// create a ModelJoin object for this join
$join
=
new
ModelJoin
();
$join
->
setJoinType
(
$joinType
);
$join
->
setRelationMap
(
$relationMap
,
$this
->
useAliasInSQL
?
$this
->
getModelAlias
()
:
null
,
$relationAlias
);
if
(
$previousJoin
=
$this
->
getPreviousJoin
())
{
$join
->
setPreviousJoin
(
$previousJoin
);
}
// add the ModelJoin to the current object
if
(
$relationAlias
)
{
$this
->
addAlias
(
$relationAlias
,
$relationMap
->
getRightTable
()
->
getName
());
$this
->
addJoinObject
(
$join
,
$relationAlias
);
}
else
{
$this
->
addJoinObject
(
$join
,
'Sms'
);
}
return
$this
;
}
/**
* Use the Sms relation Sms object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \AppBundle\Model\SmsQuery A secondary query class using the current class as primary query
*/
public
function
useSmsQuery
(
$relationAlias
=
null
,
$joinType
=
Criteria
::
LEFT_JOIN
)
{
return
$this
->
joinSms
(
$relationAlias
,
$joinType
)
->
useQuery
(
$relationAlias
?
$relationAlias
:
'Sms'
,
'\AppBundle\Model\SmsQuery'
);
}
/**
* Filter the query by a related Tracking object
*
...
...
src/AppBundle/Resources/config/default_reversed_schema.xml
View file @
f4565104
This diff is collapsed.
Click to expand it.
src/BackendBundle/Command/McafeeEnviarSmsCommand.php
View file @
f4565104
...
...
@@ -36,13 +36,8 @@ class McafeeEnviarSmsCommand extends ContainerAwareCommand
$log
->
debug
(
'************************Iniciando McafeeEnviarSmsCommand ************************'
);
$tt
=
new
TiempoTranscurrido
();
<<<<<<<
HEAD
//$fp = fopen("C:\ana3\movistarChile\prueba.csv", "r");
$fp
=
fopen
(
"/opt/sdp/intelsecuritymovistar/etc/sms/3_36460.csv"
,
"r"
);
=======
//$fp = fopen("/opt/sdp/intelsecuritymovistar/etc/sms/3_36460.csv", "r");
$fp
=
fopen
(
"C:\ana3\movistarChile\prueba.csv"
,
"r"
);
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
if
(
!
$fp
)
{
$log
->
warning
(
'Error al intentar abrir el archivo'
);
...
...
@@ -51,15 +46,6 @@ class McafeeEnviarSmsCommand extends ContainerAwareCommand
}
$urlBase
=
'https://www.seguridadtotalmcafee.cl'
;
<<<<<<<
HEAD
//$urlDescarga = $urlBase.'/#ROUTING/#CAMPANA/#STRUSUARIO/#PROCEDENCIA/#SMSID';
=======
$urlDescarga
=
$urlBase
.
'/#ROUTING/#CAMPANA/#STRUSUARIO/#PROCEDENCIA/#SMSID'
;
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
$tDesOK
=
0
;
$tDesNOOK
=
0
;
$tEnviadoOK
=
0
;
...
...
@@ -73,7 +59,9 @@ class McafeeEnviarSmsCommand extends ContainerAwareCommand
$count
=
1
;
$TOTAL
=
0
;
$batchsms
=
new
Batchsms
();
$batchsms
->
setBatchsmsEliminado
(
Batchsms
::
ELIMINADO_FALSE
);
$batchsms
->
save
();
...
...
@@ -133,16 +121,10 @@ class McafeeEnviarSmsCommand extends ContainerAwareCommand
$mensaje
=
"Descarga y participa por un SMART TV DE 50: "
;
<<<<<<<
HEAD
$urlDescarga
=
$usuarioMcafee
->
getUmcMcafeeKeycard
();
=======
>>>>>>>
1631
fbd75af5098b86e14ff858d86fbf3506daf8
$sms
=
Sms
::
enviarSms
(
$urlDescarga
,
$movil
,
$usuarioMcafee
,
$batchsms
,
$campana
,
$mensaje
,
Sms
::
TIPO_MASIVO
,
null
,
$log
,
$this
->
getContainer
());
if
(
$sms
){
$tEnviadoOK
++
;
$cont
=
$cont
+
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment