Avance comando de creacion usuarios-

tiene codigo de exit dado que no se cual es la respuesta correcta
parent 078dc990
......@@ -153,6 +153,23 @@
<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"/>
......@@ -290,6 +307,12 @@
<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>
......@@ -331,6 +354,35 @@
<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>
......
......@@ -17,5 +17,9 @@ class DefaultController extends Controller
return $this->render('default/index.html.twig', array(
'base_dir' => realpath($this->container->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
));
}
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseMcafeeUltimoProcesoCreacion;
class McafeeUltimoProcesoCreacion extends BaseMcafeeUltimoProcesoCreacion
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseMcafeeUltimoProcesoCreacionPeer;
class McafeeUltimoProcesoCreacionPeer extends BaseMcafeeUltimoProcesoCreacionPeer
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseMcafeeUltimoProcesoCreacionQuery;
class McafeeUltimoProcesoCreacionQuery extends BaseMcafeeUltimoProcesoCreacionQuery
{
}
......@@ -24,6 +24,14 @@ class UsuarioMcafee extends BaseUsuarioMcafee {
return Utiles::base64url_encode($crypt->AES_Encode($strAencriptar));
}
/**
* Genera el identificador del perfil de usuario que es enviado a McAfee
*/
public function generarCostumerId() {
$cId = 'GL_'.$this->getUmcId() . '_' . $this->getUmcFijo();
return $cId;
}
public function getTipoServicio() {
if ($this->getUmcMcafeeTipoProducto() == self::TIPO_MULTIDEVICE) {
return "Servicio Multi-Dispositivo";
......
<?php
namespace AppBundle\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'mcafee_ultimo_proceso_creacion' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package propel.generator.src.AppBundle.Model.map
*/
class McafeeUltimoProcesoCreacionTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'src.AppBundle.Model.map.McafeeUltimoProcesoCreacionTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('mcafee_ultimo_proceso_creacion');
$this->setPhpName('McafeeUltimoProcesoCreacion');
$this->setClassname('AppBundle\\Model\\McafeeUltimoProcesoCreacion');
$this->setPackage('src.AppBundle.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('muc_id', 'MucId', 'INTEGER', true, null, null);
$this->addForeignKey('ultimo_umn_id', 'UltimoUmnId', 'INTEGER', 'usuarios_mcafee_movistar_nuevos', 'id', false, null, null);
$this->addColumn('muc_cantidad_procesados', 'MucCantidadProcesados', 'INTEGER', false, null, null);
$this->addColumn('muc_cantidad_pendientes', 'MucCantidadPendientes', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('UsuariosMcafeeMovistarNuevos', 'AppBundle\\Model\\UsuariosMcafeeMovistarNuevos', RelationMap::MANY_TO_ONE, array('ultimo_umn_id' => 'id', ), null, null);
} // 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()
} // McafeeUltimoProcesoCreacionTableMap
......@@ -65,6 +65,7 @@ class UsuariosMcafeeMovistarNuevosTableMap extends TableMap
*/
public function buildRelations()
{
$this->addRelation('McafeeUltimoProcesoCreacion', 'AppBundle\\Model\\McafeeUltimoProcesoCreacion', RelationMap::ONE_TO_MANY, array('id' => 'ultimo_umn_id', ), null, null, 'McafeeUltimoProcesoCreacions');
} // buildRelations()
} // UsuariosMcafeeMovistarNuevosTableMap
This diff is collapsed.
This diff is collapsed.
......@@ -5,11 +5,14 @@ namespace AppBundle\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use AppBundle\Model\McafeeUltimoProcesoCreacion;
use AppBundle\Model\UsuariosMcafeeMovistarNuevos;
use AppBundle\Model\UsuariosMcafeeMovistarNuevosPeer;
use AppBundle\Model\UsuariosMcafeeMovistarNuevosQuery;
......@@ -51,6 +54,10 @@ use AppBundle\Model\UsuariosMcafeeMovistarNuevosQuery;
* @method UsuariosMcafeeMovistarNuevosQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method UsuariosMcafeeMovistarNuevosQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method UsuariosMcafeeMovistarNuevosQuery leftJoinMcafeeUltimoProcesoCreacion($relationAlias = null) Adds a LEFT JOIN clause to the query using the McafeeUltimoProcesoCreacion relation
* @method UsuariosMcafeeMovistarNuevosQuery rightJoinMcafeeUltimoProcesoCreacion($relationAlias = null) Adds a RIGHT JOIN clause to the query using the McafeeUltimoProcesoCreacion relation
* @method UsuariosMcafeeMovistarNuevosQuery innerJoinMcafeeUltimoProcesoCreacion($relationAlias = null) Adds a INNER JOIN clause to the query using the McafeeUltimoProcesoCreacion relation
*
* @method UsuariosMcafeeMovistarNuevos findOne(PropelPDO $con = null) Return the first UsuariosMcafeeMovistarNuevos matching the query
* @method UsuariosMcafeeMovistarNuevos findOneOrCreate(PropelPDO $con = null) Return the first UsuariosMcafeeMovistarNuevos matching the query, or a new UsuariosMcafeeMovistarNuevos object populated from the query conditions when no match is found
*
......@@ -882,6 +889,80 @@ abstract class BaseUsuariosMcafeeMovistarNuevosQuery extends ModelCriteria
return $this->addUsingAlias(UsuariosMcafeeMovistarNuevosPeer::PS_6759, $ps6759, $comparison);
}
/**
* Filter the query by a related McafeeUltimoProcesoCreacion object
*
* @param McafeeUltimoProcesoCreacion|PropelObjectCollection $mcafeeUltimoProcesoCreacion the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return UsuariosMcafeeMovistarNuevosQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByMcafeeUltimoProcesoCreacion($mcafeeUltimoProcesoCreacion, $comparison = null)
{
if ($mcafeeUltimoProcesoCreacion instanceof McafeeUltimoProcesoCreacion) {
return $this
->addUsingAlias(UsuariosMcafeeMovistarNuevosPeer::ID, $mcafeeUltimoProcesoCreacion->getUltimoUmnId(), $comparison);
} elseif ($mcafeeUltimoProcesoCreacion instanceof PropelObjectCollection) {
return $this
->useMcafeeUltimoProcesoCreacionQuery()
->filterByPrimaryKeys($mcafeeUltimoProcesoCreacion->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByMcafeeUltimoProcesoCreacion() only accepts arguments of type McafeeUltimoProcesoCreacion or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the McafeeUltimoProcesoCreacion relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return UsuariosMcafeeMovistarNuevosQuery The current query, for fluid interface
*/
public function joinMcafeeUltimoProcesoCreacion($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('McafeeUltimoProcesoCreacion');
// 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, 'McafeeUltimoProcesoCreacion');
}
return $this;
}
/**
* Use the McafeeUltimoProcesoCreacion relation McafeeUltimoProcesoCreacion 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\McafeeUltimoProcesoCreacionQuery A secondary query class using the current class as primary query
*/
public function useMcafeeUltimoProcesoCreacionQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinMcafeeUltimoProcesoCreacion($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'McafeeUltimoProcesoCreacion', '\AppBundle\Model\McafeeUltimoProcesoCreacionQuery');
}
/**
* Exclude object from result
*
......
......@@ -135,6 +135,22 @@
<vendor type="mysql">
<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"/>
<behavior name="timestampable" />
<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"/>
......@@ -265,6 +281,15 @@
<column name="umc_eliminado" phpName="UmcEliminado" type="BOOLEAN" size="1" required="false"/>
<behavior name="timestampable" />
<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>
......@@ -306,6 +331,35 @@
<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>
......
......@@ -889,4 +889,42 @@ class HomeController extends Controller {
return $response;
}
public function testAction(Request $request){
print_r($this->acortarUrl(array("url" => "https://www.seguridadtotalmcafee.cl/descargar/7/MzUzODU0NDUzMDAwMDY3NTN8MDUxMDIyMzQzMTNATVVMVElERVZJQ0VNQ0FGRUUzLkNM/sms/78", "desc" => "")));
exit();
}
private function acortarUrl($data){
$url = "http://url.gearlabs.cl/acortar";
$httpStatus = null;
try {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
$output = curl_exec($ch);
$httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpStatus == 200) {
$arrayRetorno = json_decode($output, true);
return $arrayRetorno['shortLink'];
}
else {
return array('error' => 'httpStatus distinto de Response::HTTP_OK');
}
}
catch (\Exception $e) {
return array(
'error' => 'Error',
'detalle' => $e,
);
}
}
}
......@@ -100,5 +100,9 @@ backend_researcher_enviar_correo:
defaults: {_controller: BackendBundle:Research:enviarCorreo}
methods: [POST]
test:
path: /test
defaults: {_controller: BackendBundle:Home:test}
\ No newline at end of file
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