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
50387db8
Commit
50387db8
authored
Jul 12, 2019
by
Ana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cambios
parent
bc657c3f
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
352 additions
and
142 deletions
+352
-142
app/config/routing.yml
app/config/routing.yml
+4
-4
app/propel/generated-schemas/default_reversed_schema.xml
app/propel/generated-schemas/default_reversed_schema.xml
+4
-2
composer.json
composer.json
+3
-2
composer.lock
composer.lock
+5
-5
respuestas_sms.sql
respuestas_sms.sql
+3
-0
src/AppBundle/Model/map/RespuestasSmsTableMap.php
src/AppBundle/Model/map/RespuestasSmsTableMap.php
+3
-1
src/AppBundle/Model/om/BaseRespuestasSms.php
src/AppBundle/Model/om/BaseRespuestasSms.php
+147
-35
src/AppBundle/Model/om/BaseRespuestasSmsPeer.php
src/AppBundle/Model/om/BaseRespuestasSmsPeer.php
+24
-14
src/AppBundle/Model/om/BaseRespuestasSmsQuery.php
src/AppBundle/Model/om/BaseRespuestasSmsQuery.php
+91
-25
src/AppBundle/Resources/config/default_reversed_schema.xml
src/AppBundle/Resources/config/default_reversed_schema.xml
+4
-2
src/BackendBundle/Controller/EnvioSmsController.php
src/BackendBundle/Controller/EnvioSmsController.php
+52
-32
src/BackendBundle/Resources/config/routing.yml
src/BackendBundle/Resources/config/routing.yml
+12
-20
No files found.
app/config/routing.yml
View file @
50387db8
backend
:
backend
:
resource
:
"
@BackendBundle/Controller/"
resource
:
"
@BackendBundle/Resources/config/routing.yml"
type
:
annotation
prefix
:
/api
prefix
:
/api
NelmioApiDocBundle
:
NelmioApiDocBundle
:
resource
:
"
@NelmioApiDocBundle/Resources/config/routing.yml"
resource
:
"
@NelmioApiDocBundle/Resources/config/routing.yml"
prefix
:
/webCall/doc
prefix
:
/webCall/doc
\ No newline at end of file
app/propel/generated-schemas/default_reversed_schema.xml
View file @
50387db8
...
@@ -21,9 +21,11 @@
...
@@ -21,9 +21,11 @@
</vendor>
</vendor>
</table>
</table>
<table
name=
"respuestas_sms"
phpName=
"RespuestasSms"
idMethod=
"native"
>
<table
name=
"respuestas_sms"
phpName=
"RespuestasSms"
idMethod=
"native"
>
<column
name=
"res_id"
phpName=
"ResId"
type=
"INTEGER"
primaryKey=
"true"
required=
"true"
/>
<column
name=
"res_id"
phpName=
"ResId"
type=
"INTEGER"
primaryKey=
"true"
autoIncrement=
"true"
required=
"true"
/>
<column
name=
"res_campana"
phpName=
"ResCampana"
type=
"INTEGER"
required=
"true"
/>
<column
name=
"res_proveedor_sms"
phpName=
"ResProveedorSms"
type=
"INTEGER"
required=
"true"
/>
<column
name=
"res_proveedor_sms"
phpName=
"ResProveedorSms"
type=
"INTEGER"
required=
"true"
/>
<column
name=
"res_emisor"
phpName=
"ResEmisor"
type=
"INTEGER"
required=
"true"
/>
<column
name=
"res_emisor"
phpName=
"ResEmisor"
type=
"VARCHAR"
size=
"60"
required=
"true"
/>
<column
name=
"res_movil"
phpName=
"ResMovil"
type=
"VARCHAR"
size=
"60"
required=
"true"
/>
<column
name=
"res_mensaje"
phpName=
"ResMensaje"
type=
"LONGVARCHAR"
required=
"true"
/>
<column
name=
"res_mensaje"
phpName=
"ResMensaje"
type=
"LONGVARCHAR"
required=
"true"
/>
<column
name=
"res_http_code_respuesta_peticion"
phpName=
"ResHttpCodeRespuestaPeticion"
type=
"INTEGER"
required=
"true"
/>
<column
name=
"res_http_code_respuesta_peticion"
phpName=
"ResHttpCodeRespuestaPeticion"
type=
"INTEGER"
required=
"true"
/>
<column
name=
"created_at"
phpName=
"CreatedAt"
type=
"TIMESTAMP"
required=
"true"
defaultExpr=
"CURRENT_TIMESTAMP"
/>
<column
name=
"created_at"
phpName=
"CreatedAt"
type=
"TIMESTAMP"
required=
"true"
defaultExpr=
"CURRENT_TIMESTAMP"
/>
...
...
composer.json
View file @
50387db8
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
"
symfony/swiftmailer-bundle
"
:
"
~2.3
"
,
"
symfony/swiftmailer-bundle
"
:
"
~2.3
"
,
"
symfony/monolog-bundle
"
:
"
~2.4
"
,
"
symfony/monolog-bundle
"
:
"
~2.4
"
,
"
sensio/distribution-bundle
"
:
"
~5.0
"
,
"
sensio/distribution-bundle
"
:
"
~5.0
"
,
"
sensio/framework-extra-bundle
"
:
"
^
3.0.2
"
,
"
sensio/framework-extra-bundle
"
:
"
^
5.4
"
,
"
incenteev/composer-parameter-handler
"
:
"
~2.0
"
,
"
incenteev/composer-parameter-handler
"
:
"
~2.0
"
,
"
propel/propel-bundle
"
:
"
^1.5
"
,
"
propel/propel-bundle
"
:
"
^1.5
"
,
"
mobiledetect/mobiledetectlib
"
:
"
^2.8
"
,
"
mobiledetect/mobiledetectlib
"
:
"
^2.8
"
,
...
@@ -27,7 +27,8 @@
...
@@ -27,7 +27,8 @@
"
friendsofsymfony/rest-bundle
"
:
"
^2.1
"
,
"
friendsofsymfony/rest-bundle
"
:
"
^2.1
"
,
"
jms/serializer-bundle
"
:
"
^1.1
"
,
"
jms/serializer-bundle
"
:
"
^1.1
"
,
"
nelmio/api-doc-bundle
"
:
"
^2.13
"
,
"
nelmio/api-doc-bundle
"
:
"
^2.13
"
,
"
aws/aws-sdk-php
"
:
"
^3.101
"
"
aws/aws-sdk-php
"
:
"
^3.101
"
,
"
minime/annotations
"
:
"
^3.1
"
},
},
"require-dev"
:
{
"require-dev"
:
{
"
sensio/generator-bundle
"
:
"
~3.0
"
,
"
sensio/generator-bundle
"
:
"
~3.0
"
,
...
...
composer.lock
View file @
50387db8
...
@@ -8,16 +8,16 @@
...
@@ -8,16 +8,16 @@
"packages": [
"packages": [
{
{
"name": "aws/aws-sdk-php",
"name": "aws/aws-sdk-php",
"version": "3.107.
0
",
"version": "3.107.
1
",
"source": {
"source": {
"type": "git",
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "c
f0c0968f93748cbe35d6a78e7babc7b7460945f
"
"reference": "c
cd3d13ae49a45bdf6a394d701f207c276dbf05a
"
},
},
"dist": {
"dist": {
"type": "zip",
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c
f0c0968f93748cbe35d6a78e7babc7b7460945f
",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c
cd3d13ae49a45bdf6a394d701f207c276dbf05a
",
"reference": "c
f0c0968f93748cbe35d6a78e7babc7b7460945f
",
"reference": "c
cd3d13ae49a45bdf6a394d701f207c276dbf05a
",
"shasum": ""
"shasum": ""
},
},
"require": {
"require": {
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
"s3",
"s3",
"sdk"
"sdk"
],
],
"time": "2019-07-1
1T15:05:32
+00:00"
"time": "2019-07-1
2T18:07:41
+00:00"
},
},
{
{
"name": "doctrine/annotations",
"name": "doctrine/annotations",
...
...
respuestas_sms.sql
View file @
50387db8
...
@@ -47,6 +47,9 @@ CREATE TABLE `respuestas_sms` (
...
@@ -47,6 +47,9 @@ CREATE TABLE `respuestas_sms` (
--
--
ALTER
TABLE
`respuestas_sms`
ALTER
TABLE
`respuestas_sms`
ADD
PRIMARY
KEY
(
`res_id`
);
ADD
PRIMARY
KEY
(
`res_id`
);
ALTER
TABLE
`respuestas_sms`
ADD
`res_movil`
VARCHAR
(
60
)
NOT
NULL
AFTER
`res_emisor`
;
ALTER
TABLE
`respuestas_sms`
CHANGE
`res_id`
`res_id`
INT
(
11
)
NOT
NULL
AUTO_INCREMENT
;
COMMIT
;
COMMIT
;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */
;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */
;
...
...
src/AppBundle/Model/map/RespuestasSmsTableMap.php
View file @
50387db8
...
@@ -43,8 +43,10 @@ class RespuestasSmsTableMap extends TableMap
...
@@ -43,8 +43,10 @@ class RespuestasSmsTableMap extends TableMap
$this
->
setUseIdGenerator
(
false
);
$this
->
setUseIdGenerator
(
false
);
// columns
// columns
$this
->
addPrimaryKey
(
'res_id'
,
'ResId'
,
'INTEGER'
,
true
,
null
,
null
);
$this
->
addPrimaryKey
(
'res_id'
,
'ResId'
,
'INTEGER'
,
true
,
null
,
null
);
$this
->
addColumn
(
'res_campana'
,
'ResCampana'
,
'INTEGER'
,
true
,
null
,
null
);
$this
->
addColumn
(
'res_proveedor_sms'
,
'ResProveedorSms'
,
'INTEGER'
,
true
,
null
,
null
);
$this
->
addColumn
(
'res_proveedor_sms'
,
'ResProveedorSms'
,
'INTEGER'
,
true
,
null
,
null
);
$this
->
addColumn
(
'res_emisor'
,
'ResEmisor'
,
'INTEGER'
,
true
,
null
,
null
);
$this
->
addColumn
(
'res_emisor'
,
'ResEmisor'
,
'VARCHAR'
,
true
,
60
,
null
);
$this
->
addColumn
(
'res_movil'
,
'ResMovil'
,
'VARCHAR'
,
true
,
60
,
null
);
$this
->
addColumn
(
'res_mensaje'
,
'ResMensaje'
,
'LONGVARCHAR'
,
true
,
null
,
null
);
$this
->
addColumn
(
'res_mensaje'
,
'ResMensaje'
,
'LONGVARCHAR'
,
true
,
null
,
null
);
$this
->
addColumn
(
'res_http_code_respuesta_peticion'
,
'ResHttpCodeRespuestaPeticion'
,
'INTEGER'
,
true
,
null
,
null
);
$this
->
addColumn
(
'res_http_code_respuesta_peticion'
,
'ResHttpCodeRespuestaPeticion'
,
'INTEGER'
,
true
,
null
,
null
);
$this
->
addColumn
(
'created_at'
,
'CreatedAt'
,
'TIMESTAMP'
,
true
,
null
,
'CURRENT_TIMESTAMP'
);
$this
->
addColumn
(
'created_at'
,
'CreatedAt'
,
'TIMESTAMP'
,
true
,
null
,
'CURRENT_TIMESTAMP'
);
...
...
src/AppBundle/Model/om/BaseRespuestasSms.php
View file @
50387db8
This diff is collapsed.
Click to expand it.
src/AppBundle/Model/om/BaseRespuestasSmsPeer.php
View file @
50387db8
...
@@ -29,23 +29,29 @@ abstract class BaseRespuestasSmsPeer
...
@@ -29,23 +29,29 @@ abstract class BaseRespuestasSmsPeer
const
TM_CLASS
=
'AppBundle\\Model\\map\\RespuestasSmsTableMap'
;
const
TM_CLASS
=
'AppBundle\\Model\\map\\RespuestasSmsTableMap'
;
/** The total number of columns. */
/** The total number of columns. */
const
NUM_COLUMNS
=
7
;
const
NUM_COLUMNS
=
9
;
/** The number of lazy-loaded columns. */
/** The number of lazy-loaded columns. */
const
NUM_LAZY_LOAD_COLUMNS
=
0
;
const
NUM_LAZY_LOAD_COLUMNS
=
0
;
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const
NUM_HYDRATE_COLUMNS
=
7
;
const
NUM_HYDRATE_COLUMNS
=
9
;
/** the column name for the res_id field */
/** the column name for the res_id field */
const
RES_ID
=
'respuestas_sms.res_id'
;
const
RES_ID
=
'respuestas_sms.res_id'
;
/** the column name for the res_campana field */
const
RES_CAMPANA
=
'respuestas_sms.res_campana'
;
/** the column name for the res_proveedor_sms field */
/** the column name for the res_proveedor_sms field */
const
RES_PROVEEDOR_SMS
=
'respuestas_sms.res_proveedor_sms'
;
const
RES_PROVEEDOR_SMS
=
'respuestas_sms.res_proveedor_sms'
;
/** the column name for the res_emisor field */
/** the column name for the res_emisor field */
const
RES_EMISOR
=
'respuestas_sms.res_emisor'
;
const
RES_EMISOR
=
'respuestas_sms.res_emisor'
;
/** the column name for the res_movil field */
const
RES_MOVIL
=
'respuestas_sms.res_movil'
;
/** the column name for the res_mensaje field */
/** the column name for the res_mensaje field */
const
RES_MENSAJE
=
'respuestas_sms.res_mensaje'
;
const
RES_MENSAJE
=
'respuestas_sms.res_mensaje'
;
...
@@ -77,12 +83,12 @@ abstract class BaseRespuestasSmsPeer
...
@@ -77,12 +83,12 @@ abstract class BaseRespuestasSmsPeer
* e.g. RespuestasSmsPeer::$fieldNames[RespuestasSmsPeer::TYPE_PHPNAME][0] = 'Id'
* e.g. RespuestasSmsPeer::$fieldNames[RespuestasSmsPeer::TYPE_PHPNAME][0] = 'Id'
*/
*/
protected
static
$fieldNames
=
array
(
protected
static
$fieldNames
=
array
(
BasePeer
::
TYPE_PHPNAME
=>
array
(
'ResId'
,
'Res
ProveedorSms'
,
'ResEmisor
'
,
'ResMensaje'
,
'ResHttpCodeRespuestaPeticion'
,
'CreatedAt'
,
'UpdatedAt'
,
),
BasePeer
::
TYPE_PHPNAME
=>
array
(
'ResId'
,
'Res
Campana'
,
'ResProveedorSms'
,
'ResEmisor'
,
'ResMovil
'
,
'ResMensaje'
,
'ResHttpCodeRespuestaPeticion'
,
'CreatedAt'
,
'UpdatedAt'
,
),
BasePeer
::
TYPE_STUDLYPHPNAME
=>
array
(
'resId'
,
'res
ProveedorSms'
,
'resEmisor
'
,
'resMensaje'
,
'resHttpCodeRespuestaPeticion'
,
'createdAt'
,
'updatedAt'
,
),
BasePeer
::
TYPE_STUDLYPHPNAME
=>
array
(
'resId'
,
'res
Campana'
,
'resProveedorSms'
,
'resEmisor'
,
'resMovil
'
,
'resMensaje'
,
'resHttpCodeRespuestaPeticion'
,
'createdAt'
,
'updatedAt'
,
),
BasePeer
::
TYPE_COLNAME
=>
array
(
RespuestasSmsPeer
::
RES_ID
,
RespuestasSmsPeer
::
RES_
PROVEEDOR_SMS
,
RespuestasSmsPeer
::
RES_EMISOR
,
RespuestasSmsPeer
::
RES_MENSAJE
,
RespuestasSmsPeer
::
RES_HTTP_CODE_RESPUESTA_PETICION
,
RespuestasSmsPeer
::
CREATED_AT
,
RespuestasSmsPeer
::
UPDATED_AT
,
),
BasePeer
::
TYPE_COLNAME
=>
array
(
RespuestasSmsPeer
::
RES_ID
,
RespuestasSmsPeer
::
RES_
CAMPANA
,
RespuestasSmsPeer
::
RES_PROVEEDOR_SMS
,
RespuestasSmsPeer
::
RES_EMISOR
,
RespuestasSmsPeer
::
RES_MOVIL
,
RespuestasSmsPeer
::
RES_MENSAJE
,
RespuestasSmsPeer
::
RES_HTTP_CODE_RESPUESTA_PETICION
,
RespuestasSmsPeer
::
CREATED_AT
,
RespuestasSmsPeer
::
UPDATED_AT
,
),
BasePeer
::
TYPE_RAW_COLNAME
=>
array
(
'RES_ID'
,
'RES_
PROVEEDOR_SMS'
,
'RES_EMISOR
'
,
'RES_MENSAJE'
,
'RES_HTTP_CODE_RESPUESTA_PETICION'
,
'CREATED_AT'
,
'UPDATED_AT'
,
),
BasePeer
::
TYPE_RAW_COLNAME
=>
array
(
'RES_ID'
,
'RES_
CAMPANA'
,
'RES_PROVEEDOR_SMS'
,
'RES_EMISOR'
,
'RES_MOVIL
'
,
'RES_MENSAJE'
,
'RES_HTTP_CODE_RESPUESTA_PETICION'
,
'CREATED_AT'
,
'UPDATED_AT'
,
),
BasePeer
::
TYPE_FIELDNAME
=>
array
(
'res_id'
,
'res_
proveedor_sms'
,
'res_emisor
'
,
'res_mensaje'
,
'res_http_code_respuesta_peticion'
,
'created_at'
,
'updated_at'
,
),
BasePeer
::
TYPE_FIELDNAME
=>
array
(
'res_id'
,
'res_
campana'
,
'res_proveedor_sms'
,
'res_emisor'
,
'res_movil
'
,
'res_mensaje'
,
'res_http_code_respuesta_peticion'
,
'created_at'
,
'updated_at'
,
),
BasePeer
::
TYPE_NUM
=>
array
(
0
,
1
,
2
,
3
,
4
,
5
,
6
,
)
BasePeer
::
TYPE_NUM
=>
array
(
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
)
);
);
/**
/**
...
@@ -92,12 +98,12 @@ abstract class BaseRespuestasSmsPeer
...
@@ -92,12 +98,12 @@ abstract class BaseRespuestasSmsPeer
* e.g. RespuestasSmsPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
* e.g. RespuestasSmsPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
*/
protected
static
$fieldKeys
=
array
(
protected
static
$fieldKeys
=
array
(
BasePeer
::
TYPE_PHPNAME
=>
array
(
'ResId'
=>
0
,
'Res
ProveedorSms'
=>
1
,
'ResEmisor'
=>
2
,
'ResMensaje'
=>
3
,
'ResHttpCodeRespuestaPeticion'
=>
4
,
'CreatedAt'
=>
5
,
'UpdatedAt'
=>
6
,
),
BasePeer
::
TYPE_PHPNAME
=>
array
(
'ResId'
=>
0
,
'Res
Campana'
=>
1
,
'ResProveedorSms'
=>
2
,
'ResEmisor'
=>
3
,
'ResMovil'
=>
4
,
'ResMensaje'
=>
5
,
'ResHttpCodeRespuestaPeticion'
=>
6
,
'CreatedAt'
=>
7
,
'UpdatedAt'
=>
8
,
),
BasePeer
::
TYPE_STUDLYPHPNAME
=>
array
(
'resId'
=>
0
,
'res
ProveedorSms'
=>
1
,
'resEmisor'
=>
2
,
'resMensaje'
=>
3
,
'resHttpCodeRespuestaPeticion'
=>
4
,
'createdAt'
=>
5
,
'updatedAt'
=>
6
,
),
BasePeer
::
TYPE_STUDLYPHPNAME
=>
array
(
'resId'
=>
0
,
'res
Campana'
=>
1
,
'resProveedorSms'
=>
2
,
'resEmisor'
=>
3
,
'resMovil'
=>
4
,
'resMensaje'
=>
5
,
'resHttpCodeRespuestaPeticion'
=>
6
,
'createdAt'
=>
7
,
'updatedAt'
=>
8
,
),
BasePeer
::
TYPE_COLNAME
=>
array
(
RespuestasSmsPeer
::
RES_ID
=>
0
,
RespuestasSmsPeer
::
RES_
PROVEEDOR_SMS
=>
1
,
RespuestasSmsPeer
::
RES_EMISOR
=>
2
,
RespuestasSmsPeer
::
RES_MENSAJE
=>
3
,
RespuestasSmsPeer
::
RES_HTTP_CODE_RESPUESTA_PETICION
=>
4
,
RespuestasSmsPeer
::
CREATED_AT
=>
5
,
RespuestasSmsPeer
::
UPDATED_AT
=>
6
,
),
BasePeer
::
TYPE_COLNAME
=>
array
(
RespuestasSmsPeer
::
RES_ID
=>
0
,
RespuestasSmsPeer
::
RES_
CAMPANA
=>
1
,
RespuestasSmsPeer
::
RES_PROVEEDOR_SMS
=>
2
,
RespuestasSmsPeer
::
RES_EMISOR
=>
3
,
RespuestasSmsPeer
::
RES_MOVIL
=>
4
,
RespuestasSmsPeer
::
RES_MENSAJE
=>
5
,
RespuestasSmsPeer
::
RES_HTTP_CODE_RESPUESTA_PETICION
=>
6
,
RespuestasSmsPeer
::
CREATED_AT
=>
7
,
RespuestasSmsPeer
::
UPDATED_AT
=>
8
,
),
BasePeer
::
TYPE_RAW_COLNAME
=>
array
(
'RES_ID'
=>
0
,
'RES_
PROVEEDOR_SMS'
=>
1
,
'RES_EMISOR'
=>
2
,
'RES_MENSAJE'
=>
3
,
'RES_HTTP_CODE_RESPUESTA_PETICION'
=>
4
,
'CREATED_AT'
=>
5
,
'UPDATED_AT'
=>
6
,
),
BasePeer
::
TYPE_RAW_COLNAME
=>
array
(
'RES_ID'
=>
0
,
'RES_
CAMPANA'
=>
1
,
'RES_PROVEEDOR_SMS'
=>
2
,
'RES_EMISOR'
=>
3
,
'RES_MOVIL'
=>
4
,
'RES_MENSAJE'
=>
5
,
'RES_HTTP_CODE_RESPUESTA_PETICION'
=>
6
,
'CREATED_AT'
=>
7
,
'UPDATED_AT'
=>
8
,
),
BasePeer
::
TYPE_FIELDNAME
=>
array
(
'res_id'
=>
0
,
'res_
proveedor_sms'
=>
1
,
'res_emisor'
=>
2
,
'res_mensaje'
=>
3
,
'res_http_code_respuesta_peticion'
=>
4
,
'created_at'
=>
5
,
'updated_at'
=>
6
,
),
BasePeer
::
TYPE_FIELDNAME
=>
array
(
'res_id'
=>
0
,
'res_
campana'
=>
1
,
'res_proveedor_sms'
=>
2
,
'res_emisor'
=>
3
,
'res_movil'
=>
4
,
'res_mensaje'
=>
5
,
'res_http_code_respuesta_peticion'
=>
6
,
'created_at'
=>
7
,
'updated_at'
=>
8
,
),
BasePeer
::
TYPE_NUM
=>
array
(
0
,
1
,
2
,
3
,
4
,
5
,
6
,
)
BasePeer
::
TYPE_NUM
=>
array
(
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
)
);
);
/**
/**
...
@@ -172,16 +178,20 @@ abstract class BaseRespuestasSmsPeer
...
@@ -172,16 +178,20 @@ abstract class BaseRespuestasSmsPeer
{
{
if
(
null
===
$alias
)
{
if
(
null
===
$alias
)
{
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
RES_ID
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
RES_ID
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
RES_CAMPANA
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
RES_PROVEEDOR_SMS
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
RES_PROVEEDOR_SMS
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
RES_EMISOR
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
RES_EMISOR
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
RES_MOVIL
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
RES_MENSAJE
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
RES_MENSAJE
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
RES_HTTP_CODE_RESPUESTA_PETICION
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
RES_HTTP_CODE_RESPUESTA_PETICION
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
CREATED_AT
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
CREATED_AT
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
UPDATED_AT
);
$criteria
->
addSelectColumn
(
RespuestasSmsPeer
::
UPDATED_AT
);
}
else
{
}
else
{
$criteria
->
addSelectColumn
(
$alias
.
'.res_id'
);
$criteria
->
addSelectColumn
(
$alias
.
'.res_id'
);
$criteria
->
addSelectColumn
(
$alias
.
'.res_campana'
);
$criteria
->
addSelectColumn
(
$alias
.
'.res_proveedor_sms'
);
$criteria
->
addSelectColumn
(
$alias
.
'.res_proveedor_sms'
);
$criteria
->
addSelectColumn
(
$alias
.
'.res_emisor'
);
$criteria
->
addSelectColumn
(
$alias
.
'.res_emisor'
);
$criteria
->
addSelectColumn
(
$alias
.
'.res_movil'
);
$criteria
->
addSelectColumn
(
$alias
.
'.res_mensaje'
);
$criteria
->
addSelectColumn
(
$alias
.
'.res_mensaje'
);
$criteria
->
addSelectColumn
(
$alias
.
'.res_http_code_respuesta_peticion'
);
$criteria
->
addSelectColumn
(
$alias
.
'.res_http_code_respuesta_peticion'
);
$criteria
->
addSelectColumn
(
$alias
.
'.created_at'
);
$criteria
->
addSelectColumn
(
$alias
.
'.created_at'
);
...
...
src/AppBundle/Model/om/BaseRespuestasSmsQuery.php
View file @
50387db8
This diff is collapsed.
Click to expand it.
src/AppBundle/Resources/config/default_reversed_schema.xml
View file @
50387db8
...
@@ -20,9 +20,11 @@
...
@@ -20,9 +20,11 @@
</vendor>
</vendor>
</table>
</table>
<table
name=
"respuestas_sms"
phpName=
"RespuestasSms"
idMethod=
"native"
>
<table
name=
"respuestas_sms"
phpName=
"RespuestasSms"
idMethod=
"native"
>
<column
name=
"res_id"
phpName=
"ResId"
type=
"INTEGER"
primaryKey=
"true"
required=
"true"
/>
<column
name=
"res_id"
phpName=
"ResId"
type=
"INTEGER"
primaryKey=
"true"
autoIncrement=
"true"
required=
"true"
/>
<column
name=
"res_campana"
phpName=
"ResCampana"
type=
"INTEGER"
required=
"true"
/>
<column
name=
"res_proveedor_sms"
phpName=
"ResProveedorSms"
type=
"INTEGER"
required=
"true"
/>
<column
name=
"res_proveedor_sms"
phpName=
"ResProveedorSms"
type=
"INTEGER"
required=
"true"
/>
<column
name=
"res_emisor"
phpName=
"ResEmisor"
type=
"INTEGER"
required=
"true"
/>
<column
name=
"res_emisor"
phpName=
"ResEmisor"
type=
"VARCHAR"
size=
"60"
required=
"true"
/>
<column
name=
"res_movil"
phpName=
"ResMovil"
type=
"VARCHAR"
size=
"60"
required=
"true"
/>
<column
name=
"res_mensaje"
phpName=
"ResMensaje"
type=
"LONGVARCHAR"
required=
"true"
/>
<column
name=
"res_mensaje"
phpName=
"ResMensaje"
type=
"LONGVARCHAR"
required=
"true"
/>
<column
name=
"res_http_code_respuesta_peticion"
phpName=
"ResHttpCodeRespuestaPeticion"
type=
"INTEGER"
required=
"true"
/>
<column
name=
"res_http_code_respuesta_peticion"
phpName=
"ResHttpCodeRespuestaPeticion"
type=
"INTEGER"
required=
"true"
/>
<column
name=
"created_at"
phpName=
"CreatedAt"
type=
"TIMESTAMP"
required=
"true"
defaultExpr=
"CURRENT_TIMESTAMP"
/>
<column
name=
"created_at"
phpName=
"CreatedAt"
type=
"TIMESTAMP"
required=
"true"
defaultExpr=
"CURRENT_TIMESTAMP"
/>
...
...
src/BackendBundle/Controller/EnvioSmsController.php
View file @
50387db8
...
@@ -6,38 +6,42 @@ use FOS\RestBundle\Controller\FOSRestController;
...
@@ -6,38 +6,42 @@ use FOS\RestBundle\Controller\FOSRestController;
use
AppBundle\Lib\Utiles
;
use
AppBundle\Lib\Utiles
;
use
Symfony\Component\HttpFoundation\Response
;
use
Symfony\Component\HttpFoundation\Response
;
use
Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
;
use
Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
;
//use Symfony\Component\Routing\Annotation\Route;
use
AppBundle\Model\NotificaQuery
;
use
AppBundle\Model\NotificaQuery
;
use
AppBundle\Model\Notifica
;
use
AppBundle\Model\Notifica
;
use
AppBundle\Model\RespuestasSmsQuery
;
use
AppBundle\Model\RespuestasSms
;
require_once
__DIR__
.
'/../../../vendor/autoload.php'
;
require_once
__DIR__
.
'/../../../vendor/autoload.php'
;
use
FOS\RestBundle\View\View
;
use
FOS\RestBundle\View\View
;
use
Sensio\Bundle\FrameworkExtraBundle\Configuration\Method
;
//
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
class
EnvioSmsController
extends
FOSRestController
{
class
EnvioSmsController
extends
FOSRestController
{
/**
* @Route("/usuario/{id}", requirements={"id" = "\d+"}, defaults={"id" = 1})
//* @Route("/enviar")
* @Method({"GET"})
*/
public
function
indexAction
(
$id
)
{
public
function
indexAction
(
$id
)
{
$view
=
View
::
create
();
$view
=
View
::
create
();
$view
->
setData
(
array
(
"id"
=>
$id
,
"nombre"
=>
"Usuario no autorizado"
));
$view
->
setData
(
array
(
"id"
=>
$id
,
"nombre"
=>
"Usuario no autorizado"
));
return
$this
->
handleView
(
$view
);
return
$this
->
handleView
(
$view
);
}
}
/**
* @Route("/enviar")
//
* @Route("/enviar")
* @Method({"POST"})
//
* @Method({"POST"})
*/
public
function
enviarSmsAction
()
{
public
function
enviarSmsAction
()
{
print_r
(
'Enviando mensaje'
);
print_r
(
'Enviando mensaje'
);
$campana
=
$_POST
[
'campana'
];
$campana
=
$_POST
[
'campana'
];
$telefono
=
$_POST
[
'telefono'
];
$telefono
=
$_POST
[
'telefono'
];
$mensaje
=
$_POST
[
'mensaje'
];
$mensaje
=
$_POST
[
'mensaje'
];
$idmetodo
=
$_POST
[
'idmetodo'
];
$idmetodo
=
$_POST
[
'idmetodo'
];
$from
=
$_POST
[
'from'
];
$log
=
Utiles
::
setLog
(
'BackendBundle'
,
'backend/backend'
);
$log
=
Utiles
::
setLog
(
'BackendBundle'
,
'backend/backend'
);
$log
->
debug
(
count
(
NotificaQuery
::
create
()
->
filterByCampana
(
$campana
)
->
filterByTelefono
(
$telefono
)
->
find
()));
$log
->
debug
(
count
(
NotificaQuery
::
create
()
->
filterByCampana
(
$campana
)
->
filterByTelefono
(
$telefono
)
->
find
()));
...
@@ -55,7 +59,10 @@ class EnvioSmsController extends FOSRestController {
...
@@ -55,7 +59,10 @@ class EnvioSmsController extends FOSRestController {
$usuario
=
Utiles
::
getParametroConfiguracion
(
'nrsgateway_user'
);
$usuario
=
Utiles
::
getParametroConfiguracion
(
'nrsgateway_user'
);
$password
=
Utiles
::
getParametroConfiguracion
(
'nrsgateway_pws'
);
$password
=
Utiles
::
getParametroConfiguracion
(
'nrsgateway_pws'
);
$url
=
Utiles
::
getParametroConfiguracion
(
'nrsgateway_url'
);
$url
=
Utiles
::
getParametroConfiguracion
(
'nrsgateway_url'
);
return
$this
->
enviarMensaje
(
$campana
,
$telefono
,
$mensaje
,
$usuario
,
$password
,
$url
);
return
$this
->
enviarMensaje
(
$campana
,
$telefono
,
$mensaje
,
$usuario
,
$password
,
$url
,
$from
,
$idmetodo
);
}
else
{
//teltech
}
else
{
//teltech
if
(
$idmetodo
==
2
)
{
if
(
$idmetodo
==
2
)
{
...
@@ -63,21 +70,22 @@ class EnvioSmsController extends FOSRestController {
...
@@ -63,21 +70,22 @@ class EnvioSmsController extends FOSRestController {
$usuario
=
Utiles
::
getParametroConfiguracion
(
'teltech_user'
);
$usuario
=
Utiles
::
getParametroConfiguracion
(
'teltech_user'
);
$password
=
Utiles
::
getParametroConfiguracion
(
'teltech_pws'
);
$password
=
Utiles
::
getParametroConfiguracion
(
'teltech_pws'
);
$url
=
Utiles
::
getParametroConfiguracion
(
'teltech_url'
);
$url
=
Utiles
::
getParametroConfiguracion
(
'teltech_url'
);
return
$this
->
enviarMensaje
(
$campana
,
$telefono
,
$mensaje
,
$usuario
,
$password
,
$url
);
return
$this
->
enviarMensaje
(
$campana
,
$telefono
,
$mensaje
,
$usuario
,
$password
,
$url
,
$from
,
$idmetodo
);
}
else
{
//Amazon
}
else
{
//Amazon
$log
->
debug
(
'Selecciona Amazon'
);
$log
->
debug
(
'Selecciona Amazon'
);
return
$this
->
enviarMensajeAmazon
(
$telefono
,
$mensaje
);
return
$this
->
enviarMensajeAmazon
(
$telefono
,
$mensaje
,
$from
,
$idmetodo
);
}
}
}
}
}
}
private
function
enviarMensaje
(
$campana
,
$movil
,
$mensaje
,
$usuario
,
$password
,
$url
)
{
private
function
enviarMensaje
(
$campana
,
$movil
,
$mensaje
,
$usuario
,
$password
,
$url
,
$from
,
$proveedor
)
{
try
{
try
{
$log
=
Utiles
::
setLog
(
'BackendBundle'
,
'backend/backend'
);
$log
=
Utiles
::
setLog
(
'BackendBundle'
,
'backend/backend'
);
$post
[
'to'
]
=
array
(
$movil
);
$post
[
'to'
]
=
array
(
$movil
);
$post
[
'text'
]
=
$mensaje
;
$post
[
'text'
]
=
$mensaje
;
$post
[
'from'
]
=
$
movil
;
$post
[
'from'
]
=
$
from
;
$post
[
'dlr-url'
]
=
Utiles
::
getParametroConfiguracion
(
"url_base"
)
.
"/api/notifica/"
.
$campana
.
"/%P/%d"
;
$post
[
'dlr-url'
]
=
Utiles
::
getParametroConfiguracion
(
"url_base"
)
.
"/api/notifica/"
.
$campana
.
"/%P/%d"
;
...
@@ -101,20 +109,23 @@ class EnvioSmsController extends FOSRestController {
...
@@ -101,20 +109,23 @@ class EnvioSmsController extends FOSRestController {
$array
=
json_decode
(
$result
,
true
);
$array
=
json_decode
(
$result
,
true
);
$resp
=
""
;
$resp
=
""
;
$estado
=
""
;
if
(
isset
(
$array
[
'error'
][
'code'
]))
{
if
(
isset
(
$array
[
'error'
][
'code'
]))
{
$log
->
debug
(
'Api Devuelve error'
);
$log
->
debug
(
'Api Devuelve error'
);
$estado
=
$array
[
'error'
][
'code'
];
$resp
=
array
(
$resp
=
array
(
'success'
=>
false
,
'success'
=>
false
,
'statusCode'
=>
$array
[
'error'
][
'code'
]
'statusCode'
=>
$array
[
'error'
][
'code'
]
);
);
return
$resp
;
//
return $resp;
}
else
{
}
else
{
$log
->
debug
(
'Api envio exitoso'
);
$log
->
debug
(
'Api envio exitoso'
);
$notifica
=
NotificaQuery
::
create
()
->
filterByCampana
(
$campana
)
->
filterByTelefono
(
$movil
)
->
find
();
$notifica
=
NotificaQuery
::
create
()
->
filterByCampana
(
$campana
)
->
filterByTelefono
(
$movil
)
->
find
();
$resp
=
""
;
$resp
=
""
;
$estado
=
""
;
if
(
count
(
$notifica
)
>
0
)
{
if
(
count
(
$notifica
)
>
0
)
{
foreach
(
$notifica
as
$noti
)
{
foreach
(
$notifica
as
$noti
)
{
$estado
=
$noti
->
getEstado
();
$estado
=
$noti
->
getEstado
();
...
@@ -124,22 +135,34 @@ class EnvioSmsController extends FOSRestController {
...
@@ -124,22 +135,34 @@ class EnvioSmsController extends FOSRestController {
'statusCode'
=>
$estado
'statusCode'
=>
$estado
);
);
return
$resp
;
//
return $resp;
}
else
{
}
else
{
$estado
=
$array
[
'error'
][
'code'
];
$resp
=
array
(
$resp
=
array
(
'success'
=>
false
,
'success'
=>
false
,
'statusCode'
=>
$array
[
'error'
][
'code'
]
'statusCode'
=>
$array
[
'error'
][
'code'
]
);
);
return
$resp
;
//
return $resp;
}
}
}
}
$log
->
debug
(
'Grabar en respuestaSms'
);
$respuestaSms
=
new
RespuestasSms
();
$respuestaSms
->
setResCampana
(
$campana
);
$respuestaSms
->
setResProveedorSms
(
$proveedor
);
$respuestaSms
->
setResEmisor
(
$from
);
$respuestaSms
->
setResMovil
(
$movil
);
$respuestaSms
->
setResMensaje
(
$mensaje
);
$respuestaSms
->
setResHttpCodeRespuestaPeticion
(
$estado
);
$respuestaSms
->
save
();
return
$resp
;
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$log
=
Utiles
::
setLog
(
'exception'
);
$log
=
Utiles
::
setLog
(
'exception'
);
$log
->
debug
(
'exception: '
.
$e
);
$log
->
debug
(
'exception: '
.
$e
);
}
}
}
}
private
function
enviarMensajeAmazon
(
$telefono
,
$mensaje
)
{
private
function
enviarMensajeAmazon
(
$telefono
,
$mensaje
,
$from
,
$proveedor
)
{
$sdk
=
new
\Aws\Sns\SnsClient
([
$sdk
=
new
\Aws\Sns\SnsClient
([
'region'
=>
Utiles
::
getParametroConfiguracion
(
'region'
),
'region'
=>
Utiles
::
getParametroConfiguracion
(
'region'
),
...
@@ -151,7 +174,7 @@ class EnvioSmsController extends FOSRestController {
...
@@ -151,7 +174,7 @@ class EnvioSmsController extends FOSRestController {
'PhoneNumber'
=>
$telefono
,
'PhoneNumber'
=>
$telefono
,
'MessageAttributes'
=>
[
'AWS.SNS.SMS.SenderID'
=>
[
'MessageAttributes'
=>
[
'AWS.SNS.SMS.SenderID'
=>
[
'DataType'
=>
'String'
,
'DataType'
=>
'String'
,
'StringValue'
=>
'Mcafee'
'StringValue'
=>
$from
]
]
]]);
]]);
...
@@ -159,10 +182,9 @@ class EnvioSmsController extends FOSRestController {
...
@@ -159,10 +182,9 @@ class EnvioSmsController extends FOSRestController {
return
$messageId
;
return
$messageId
;
}
}
/**
* @Route("/buscarstatus")
// * @Route("/buscarstatus")
* @Method({"POST"})
// * @Method({"POST"})
*/
public
function
buscarStatusAction
()
{
public
function
buscarStatusAction
()
{
$time
=
intVal
(
strVal
(
time
()
-
3600
+
6
)
.
"000"
);
$time
=
intVal
(
strVal
(
time
()
-
3600
+
6
)
.
"000"
);
$messageId
=
$_POST
[
'messageid'
];
$messageId
=
$_POST
[
'messageid'
];
...
@@ -240,13 +262,11 @@ class EnvioSmsController extends FOSRestController {
...
@@ -240,13 +262,11 @@ class EnvioSmsController extends FOSRestController {
return
$resp
;
return
$resp
;
}
}
}
}
}
}
// * @Route("/notifica/{idenvio}/{tel}/{estado}")
/**
* @Route("/notifica/{idenvio}/{tel}/{estado}")
*/
public
function
notificaAction
(
$idenvio
,
$tel
,
$estado
)
{
public
function
notificaAction
(
$idenvio
,
$tel
,
$estado
)
{
$notifica
=
new
Notifica
();
$notifica
=
new
Notifica
();
$notifica
->
setCampana
(
$idenvio
);
$notifica
->
setCampana
(
$idenvio
);
...
...
src/BackendBundle/Resources/config/routing.yml
View file @
50387db8
backend_enviar
sms
:
backend_enviar
:
path
:
/
sms/
enviar
path
:
/enviar
defaults
:
{
_controller
:
BackendBundle
:
EnvioSms
:
enviarSms
}
defaults
:
{
_controller
:
BackendBundle
:
EnvioSms
:
enviarSms
}
methods
:
[
POST
]
methods
:
[
POST
]
requirements
:
caid
:
\d+
telefono
:
\d+
menvid
:
\d+
backend_buscar
sm
s
:
backend_buscar
Statu
s
:
path
:
/
sms/
buscarstatus
path
:
/buscarstatus
defaults
:
{
_controller
:
BackendBundle
:
EnvioSms
:
buscarStatus
}
defaults
:
{
_controller
:
BackendBundle
:
EnvioSms
:
buscarStatus
}
methods
:
[
POST
]
methods
:
[
POST
]
requirements
:
messageid
:
\d+
backend_notificar
:
backend_notifica
:
path
:
/sms/notificar/{idenvio}/{remitente}/{telefono}/{estado}
path
:
/notifica/{idenvio}/{tel}/{estado}
defaults
:
{
_controller
:
BackendBundle
:
EnvioSms
:
enviarSms
}
defaults
:
{
_controller
:
BackendBundle
:
EnvioSms
:
notifica
}
requirements
:
idenvio
:
\d+
remitente
:
\d+
telefono
:
\d+
\ No newline at end of file
estado
:
\d+
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