Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
musica_listas_backend
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
musica_listas_backend
Commits
bb8ed495
Commit
bb8ed495
authored
May 06, 2019
by
Cristian Mauricio Diaz Canales
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Segundo tipo wapush-masivo
parent
f1a10f12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
src/Command/EnviarWapushUsuariosCommand.php
src/Command/EnviarWapushUsuariosCommand.php
+14
-15
No files found.
src/Command/EnviarWapushUsuariosCommand.php
View file @
bb8ed495
...
...
@@ -57,9 +57,9 @@ class EnviarWapushUsuariosCommand extends Command {
if
(
$ejecutar
==
1
)
{
$suscripciones
=
$this
->
em
->
getRepository
(
PluSuscripcion
::
class
)
->
findBy
(
array
(
"susVigente"
=>
1
));
$log
->
debug
(
"suscripciones a procesar "
.
count
(
$suscripciones
));
//
try {
try
{
//Envio de recordatorio suscripcion a lista a los suscripsores
/*
foreach ($suscripciones as $index => $suscripcion):
foreach
(
$suscripciones
as
$index
=>
$suscripcion
)
:
$log
->
debug
(
"enviando mensaje de informacion de suscripcion a cuenta a MSISDN 56"
.
$suscripcion
->
getSusMsisdn
());
$retornoWapPush
=
EntelWapush
::
wsGenerarPeticionWapPush
(
$suscripcion
->
getSusId
(),
PluTipoWapush
::
TIPO_WP_OWN_MESSAGE
,
array
(
$suscripcion
->
getSusId
()));
$log
->
debug
(
"retorno wapush a "
.
$suscripcion
->
getSusMsisdn
()
.
" :
$retornoWapPush
"
);
...
...
@@ -68,9 +68,9 @@ class EnviarWapushUsuariosCommand extends Command {
}
else
{
$log
->
debug
(
'wappush NOOK a '
.
$suscripcion
->
getSusMsisdn
());
}
endforeach;*/
endforeach
;
//AVISO DE CONTENIDO GRATUITO MASIVO
...
...
@@ -82,32 +82,31 @@ class EnviarWapushUsuariosCommand extends Command {
if
(
$lista
->
getLisId
()
==
$suscripcion
->
getLisId
()
->
getLisId
())
{
$log
->
debug
(
"Suscripcion asociado a la lista :"
.
$lista
->
getLisId
());
$arraySuscripciones
[]
=
$suscripcion
->
getSusId
();
$arrayMsisdn
[]
=
$suscripcion
->
getSusMsisdn
();
$arrayMsisdn
[]
=
$suscripcion
->
getSusMsisdn
();
}
endforeach
;
if
(
count
(
$arraySuscripciones
)
>=
1
)
{
$retornoWapPush
=
EntelWapush
::
wsGenerarPeticionWapPush
(
0
,
PluTipoWapush
::
TIPO_WP_INFO_CONTENIDO_GRATUITO
,
$arraySuscripciones
);
$log
->
debug
(
"retorno wapush masivo lista "
.
$lista
->
getLisId
()
.
" :
$retornoWapPush
"
);
$retornoWapPush
=
EntelWapush
::
wsGenerarPeticionWapPush
(
0
,
PluTipoWapush
::
TIPO_WP_INFO_CONTENIDO_GRATUITO
,
$arraySuscripciones
);
$log
->
debug
(
"retorno wapush masivo lista "
.
$lista
->
getLisId
()
.
" :
$retornoWapPush
"
);
if
(
$retornoWapPush
==
200
)
{
$log
->
debug
(
"wapush masivo enviado a"
.
print_r
(
$arrayMsisdn
,
true
));
$log
->
debug
(
"wapush masivo enviado a"
.
print_r
(
$arrayMsisdn
,
true
));
}
else
{
$log
->
debug
(
'wappush masivo NOOK a '
.
print_r
(
$arrayMsisdn
,
true
)
);
$log
->
debug
(
'wappush masivo NOOK a '
.
print_r
(
$arrayMsisdn
,
true
)
);
}
}
endforeach
;
$nuevaFechaSiguienteEjecucion
=
new
PluEntelWapushProximaFecha
();
$nuevaFechaSiguienteEjecucion
->
setEwfFecha
(
$fechaSiguiente
->
modify
(
'+7 days'
));
$this
->
em
->
persist
(
$nuevaFechaSiguienteEjecucion
);
$this
->
em
->
flush
();
$log
->
debug
(
"la proxima fecha de ejecucion es "
.
$nuevaFechaSiguienteEjecucion
->
getEwfFecha
()
->
format
(
"Y-m-d"
));
//
} catch (\Exception $e) {
// $io->success(print_r($e,
true));
//
}
}
catch
(
\Exception
$e
)
{
$io
->
success
(
print_r
(
$e
,
true
));
}
}
$io
->
success
(
'Command Finalizado'
);
}
...
...
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