#5 se agregan clases y logica de url terminos y condiciones en backend

parent 00afc120
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
<column name="cam_adwords" phpName="CamAdwords" type="VARCHAR" size="1000" required="false"/> <column name="cam_adwords" phpName="CamAdwords" type="VARCHAR" size="1000" required="false"/>
<column name="cam_pixel_facebook" phpName="CamPixelFacebook" type="VARCHAR" size="1000" required="false"/> <column name="cam_pixel_facebook" phpName="CamPixelFacebook" type="VARCHAR" size="1000" required="false"/>
<column name="cam_url_final_campania" phpName="CamUrlFinalCampania" type="VARCHAR" size="1000" required="false"/> <column name="cam_url_final_campania" phpName="CamUrlFinalCampania" type="VARCHAR" size="1000" required="false"/>
<column name="cam_url_terminos_condiciones_campania" phpName="CamUrlTerminosCondicionesCampania" type="VARCHAR" size="1000" required="false"/>
<column name="cam_tipo" phpName="CamTipo" type="INTEGER" size="6" required="false"/> <column name="cam_tipo" phpName="CamTipo" type="INTEGER" size="6" required="false"/>
<column name="cam_estado" phpName="CamEstado" type="INTEGER" size="6" required="false"/> <column name="cam_estado" phpName="CamEstado" type="INTEGER" size="6" required="false"/>
<column name="cam_eliminado" phpName="CamEliminado" type="INTEGER" size="6" required="false"/> <column name="cam_eliminado" phpName="CamEliminado" type="INTEGER" size="6" required="false"/>
...@@ -67,12 +68,24 @@ ...@@ -67,12 +68,24 @@
<column name="cam_json_estructura" phpName="CamJsonEstructura" type="LONGVARCHAR" required="false"/> <column name="cam_json_estructura" phpName="CamJsonEstructura" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/> <column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/> <column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
<foreign-key foreignTable="operador" name="fk_operador_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="ope_id" foreign="ope_id"/>
</foreign-key>
<foreign-key foreignTable="servicio" name="fk_servicio_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="ser_id" foreign="ser_id"/>
</foreign-key>
<foreign-key foreignTable="template" name="fk_template_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT"> <foreign-key foreignTable="template" name="fk_template_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="tem_id" foreign="tem_id"/> <reference local="tem_id" foreign="tem_id"/>
</foreign-key> </foreign-key>
<index name="fk_template_pk_fk_idx"> <index name="fk_template_pk_fk_idx">
<index-column name="tem_id"/> <index-column name="tem_id"/>
</index> </index>
<index name="fk_operador_pk_fk_idx">
<index-column name="ope_id"/>
</index>
<index name="fk_servicio_pk_fk_idx">
<index-column name="ser_id"/>
</index>
<vendor type="mysql"> <vendor type="mysql">
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
...@@ -195,6 +208,12 @@ ...@@ -195,6 +208,12 @@
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
</table> </table>
<table name="operador" phpName="Operador" idMethod="native">
<column name="ope_id" phpName="OpeId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="parametro_configuracion" phpName="ParametroConfiguracion" idMethod="native"> <table name="parametro_configuracion" phpName="ParametroConfiguracion" idMethod="native">
<column name="pco_id" phpName="PcoId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/> <column name="pco_id" phpName="PcoId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="pco_nombre" phpName="PcoNombre" type="VARCHAR" size="250" required="false"/> <column name="pco_nombre" phpName="PcoNombre" type="VARCHAR" size="250" required="false"/>
...@@ -213,6 +232,12 @@ ...@@ -213,6 +232,12 @@
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
</table> </table>
<table name="servicio" phpName="Servicio" idMethod="native">
<column name="ser_id" phpName="SerId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="template" phpName="Template" idMethod="native"> <table name="template" phpName="Template" idMethod="native">
<column name="tem_id" phpName="TemId" type="INTEGER" primaryKey="true" required="true"/> <column name="tem_id" phpName="TemId" type="INTEGER" primaryKey="true" required="true"/>
<column name="tem_nombre" phpName="TemNombre" type="VARCHAR" size="1000" required="false"/> <column name="tem_nombre" phpName="TemNombre" type="VARCHAR" size="1000" required="false"/>
......
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseOperador;
class Operador extends BaseOperador
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseOperadorPeer;
class OperadorPeer extends BaseOperadorPeer
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseOperadorQuery;
class OperadorQuery extends BaseOperadorQuery
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseServicio;
class Servicio extends BaseServicio
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseServicioPeer;
class ServicioPeer extends BaseServicioPeer
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseServicioQuery;
class ServicioQuery extends BaseServicioQuery
{
}
...@@ -43,8 +43,8 @@ class CampaniaTableMap extends TableMap ...@@ -43,8 +43,8 @@ class CampaniaTableMap extends TableMap
$this->setUseIdGenerator(true); $this->setUseIdGenerator(true);
// columns // columns
$this->addPrimaryKey('cam_id', 'CamId', 'INTEGER', true, null, null); $this->addPrimaryKey('cam_id', 'CamId', 'INTEGER', true, null, null);
$this->addColumn('ope_id', 'OpeId', 'INTEGER', false, null, null); $this->addForeignKey('ope_id', 'OpeId', 'INTEGER', 'operador', 'ope_id', false, null, null);
$this->addColumn('ser_id', 'SerId', 'INTEGER', false, null, null); $this->addForeignKey('ser_id', 'SerId', 'INTEGER', 'servicio', 'ser_id', false, null, null);
$this->addForeignKey('tem_id', 'TemId', 'INTEGER', 'template', 'tem_id', false, null, null); $this->addForeignKey('tem_id', 'TemId', 'INTEGER', 'template', 'tem_id', false, null, null);
$this->addColumn('cam_unique_key', 'CamUniqueKey', 'LONGVARCHAR', false, null, null); $this->addColumn('cam_unique_key', 'CamUniqueKey', 'LONGVARCHAR', false, null, null);
$this->addColumn('cam_nombre', 'CamNombre', 'VARCHAR', false, 1000, null); $this->addColumn('cam_nombre', 'CamNombre', 'VARCHAR', false, 1000, null);
...@@ -52,6 +52,7 @@ class CampaniaTableMap extends TableMap ...@@ -52,6 +52,7 @@ class CampaniaTableMap extends TableMap
$this->addColumn('cam_adwords', 'CamAdwords', 'VARCHAR', false, 1000, null); $this->addColumn('cam_adwords', 'CamAdwords', 'VARCHAR', false, 1000, null);
$this->addColumn('cam_pixel_facebook', 'CamPixelFacebook', 'VARCHAR', false, 1000, null); $this->addColumn('cam_pixel_facebook', 'CamPixelFacebook', 'VARCHAR', false, 1000, null);
$this->addColumn('cam_url_final_campania', 'CamUrlFinalCampania', 'VARCHAR', false, 1000, null); $this->addColumn('cam_url_final_campania', 'CamUrlFinalCampania', 'VARCHAR', false, 1000, null);
$this->addColumn('cam_url_terminos_condiciones_campania', 'CamUrlTerminosCondicionesCampania', 'VARCHAR', false, 1000, null);
$this->addColumn('cam_tipo', 'CamTipo', 'INTEGER', false, 6, null); $this->addColumn('cam_tipo', 'CamTipo', 'INTEGER', false, 6, null);
$this->addColumn('cam_estado', 'CamEstado', 'INTEGER', false, 6, null); $this->addColumn('cam_estado', 'CamEstado', 'INTEGER', false, 6, null);
$this->addColumn('cam_eliminado', 'CamEliminado', 'INTEGER', false, 6, null); $this->addColumn('cam_eliminado', 'CamEliminado', 'INTEGER', false, 6, null);
...@@ -68,26 +69,11 @@ class CampaniaTableMap extends TableMap ...@@ -68,26 +69,11 @@ class CampaniaTableMap extends TableMap
*/ */
public function buildRelations() public function buildRelations()
{ {
$this->addRelation('Operador', 'AppBundle\\Model\\Operador', RelationMap::MANY_TO_ONE, array('ope_id' => 'ope_id', ), null, null);
$this->addRelation('Servicio', 'AppBundle\\Model\\Servicio', RelationMap::MANY_TO_ONE, array('ser_id' => 'ser_id', ), null, null);
$this->addRelation('Template', 'AppBundle\\Model\\Template', RelationMap::MANY_TO_ONE, array('tem_id' => 'tem_id', ), null, null); $this->addRelation('Template', 'AppBundle\\Model\\Template', RelationMap::MANY_TO_ONE, array('tem_id' => 'tem_id', ), null, null);
$this->addRelation('CampaniaContenido', 'AppBundle\\Model\\CampaniaContenido', RelationMap::ONE_TO_MANY, array('cam_id' => 'cam_id', ), null, null, 'CampaniaContenidos'); $this->addRelation('CampaniaContenido', 'AppBundle\\Model\\CampaniaContenido', RelationMap::ONE_TO_MANY, array('cam_id' => 'cam_id', ), null, null, 'CampaniaContenidos');
$this->addRelation('Fila', 'AppBundle\\Model\\Fila', RelationMap::ONE_TO_MANY, array('cam_id' => 'cam_id', ), null, null, 'Filas'); $this->addRelation('Fila', 'AppBundle\\Model\\Fila', RelationMap::ONE_TO_MANY, array('cam_id' => 'cam_id', ), null, null, 'Filas');
} // 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()
} // CampaniaTableMap } // CampaniaTableMap
<?php
namespace AppBundle\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'operador' 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 OperadorTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'src.AppBundle.Model.map.OperadorTableMap';
/**
* 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('operador');
$this->setPhpName('Operador');
$this->setClassname('AppBundle\\Model\\Operador');
$this->setPackage('src.AppBundle.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ope_id', 'OpeId', 'INTEGER', true, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Campania', 'AppBundle\\Model\\Campania', RelationMap::ONE_TO_MANY, array('ope_id' => 'ope_id', ), null, null, 'Campanias');
} // buildRelations()
} // OperadorTableMap
<?php
namespace AppBundle\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'servicio' 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 ServicioTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'src.AppBundle.Model.map.ServicioTableMap';
/**
* 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('servicio');
$this->setPhpName('Servicio');
$this->setClassname('AppBundle\\Model\\Servicio');
$this->setPackage('src.AppBundle.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ser_id', 'SerId', 'INTEGER', true, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Campania', 'AppBundle\\Model\\Campania', RelationMap::ONE_TO_MANY, array('ser_id' => 'ser_id', ), null, null, 'Campanias');
} // buildRelations()
} // ServicioTableMap
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -1586,6 +1586,56 @@ abstract class BaseTemplate extends BaseObject implements Persistent ...@@ -1586,6 +1586,56 @@ abstract class BaseTemplate extends BaseObject implements Persistent
return $this; return $this;
} }
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
* Otherwise if this Template is new, it will return
* an empty collection; or if this Template has previously
* been saved, it will retrieve related Campanias from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
* actually need in Template.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelObjectCollection|Campania[] List of Campania objects
*/
public function getCampaniasJoinOperador($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = CampaniaQuery::create(null, $criteria);
$query->joinWith('Operador', $join_behavior);
return $this->getCampanias($query, $con);
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
* Otherwise if this Template is new, it will return
* an empty collection; or if this Template has previously
* been saved, it will retrieve related Campanias from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
* actually need in Template.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelObjectCollection|Campania[] List of Campania objects
*/
public function getCampaniasJoinServicio($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = CampaniaQuery::create(null, $criteria);
$query->joinWith('Servicio', $join_behavior);
return $this->getCampanias($query, $con);
}
/** /**
* Clears out the collTemplateCssRelacions collection * Clears out the collTemplateCssRelacions collection
* *
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
</table> </table>
<table name="campania" phpName="Campania" idMethod="native"> <table name="campania" phpName="Campania" idMethod="native">
<column name="cam_id" phpName="CamId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/> <column name="cam_id" phpName="CamId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="ope_id" phpName="OpeId" type="INTEGER" required="false"/> <column name="ope_id" phpName="OpeId" type="INTEGER" required="false"/>
<column name="ser_id" phpName="SerId" type="INTEGER" required="false"/> <column name="ser_id" phpName="SerId" type="INTEGER" required="false"/>
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
<column name="cam_adwords" phpName="CamAdwords" type="VARCHAR" size="1000" required="false"/> <column name="cam_adwords" phpName="CamAdwords" type="VARCHAR" size="1000" required="false"/>
<column name="cam_pixel_facebook" phpName="CamPixelFacebook" type="VARCHAR" size="1000" required="false"/> <column name="cam_pixel_facebook" phpName="CamPixelFacebook" type="VARCHAR" size="1000" required="false"/>
<column name="cam_url_final_campania" phpName="CamUrlFinalCampania" type="VARCHAR" size="1000" required="false"/> <column name="cam_url_final_campania" phpName="CamUrlFinalCampania" type="VARCHAR" size="1000" required="false"/>
<column name="cam_url_terminos_condiciones_campania" phpName="CamUrlTerminosCondicionesCampania" type="VARCHAR" size="1000" required="false"/>
<column name="cam_tipo" phpName="CamTipo" type="INTEGER" size="6" required="false"/> <column name="cam_tipo" phpName="CamTipo" type="INTEGER" size="6" required="false"/>
<column name="cam_estado" phpName="CamEstado" type="INTEGER" size="6" required="false"/> <column name="cam_estado" phpName="CamEstado" type="INTEGER" size="6" required="false"/>
<column name="cam_eliminado" phpName="CamEliminado" type="INTEGER" size="6" required="false"/> <column name="cam_eliminado" phpName="CamEliminado" type="INTEGER" size="6" required="false"/>
...@@ -64,12 +65,24 @@ ...@@ -64,12 +65,24 @@
<column name="cam_fecha_fin" phpName="CamFechaFin" type="TIMESTAMP" required="false"/> <column name="cam_fecha_fin" phpName="CamFechaFin" type="TIMESTAMP" required="false"/>
<column name="cam_json_estructura" phpName="CamJsonEstructura" type="LONGVARCHAR" required="false"/> <column name="cam_json_estructura" phpName="CamJsonEstructura" type="LONGVARCHAR" required="false"/>
<behavior name="timestampable" /> <behavior name="timestampable" />
<foreign-key foreignTable="operador" name="fk_operador_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="ope_id" foreign="ope_id"/>
</foreign-key>
<foreign-key foreignTable="servicio" name="fk_servicio_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="ser_id" foreign="ser_id"/>
</foreign-key>
<foreign-key foreignTable="template" name="fk_template_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT"> <foreign-key foreignTable="template" name="fk_template_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="tem_id" foreign="tem_id"/> <reference local="tem_id" foreign="tem_id"/>
</foreign-key> </foreign-key>
<index name="fk_template_pk_fk_idx"> <index name="fk_template_pk_fk_idx">
<index-column name="tem_id"/> <index-column name="tem_id"/>
</index> </index>
<index name="fk_operador_pk_fk_idx">
<index-column name="ope_id"/>
</index>
<index name="fk_servicio_pk_fk_idx">
<index-column name="ser_id"/>
</index>
<vendor type="mysql"> <vendor type="mysql">
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
...@@ -189,6 +202,13 @@ ...@@ -189,6 +202,13 @@
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
</table> </table>
<table name="operador" phpName="Operador" idMethod="native">
<column name="ope_id" phpName="OpeId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="parametro_configuracion" phpName="ParametroConfiguracion" idMethod="native"> <table name="parametro_configuracion" phpName="ParametroConfiguracion" idMethod="native">
<column name="pco_id" phpName="PcoId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/> <column name="pco_id" phpName="PcoId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="pco_nombre" phpName="PcoNombre" type="VARCHAR" size="250" required="false"/> <column name="pco_nombre" phpName="PcoNombre" type="VARCHAR" size="250" required="false"/>
...@@ -207,6 +227,12 @@ ...@@ -207,6 +227,12 @@
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
</table> </table>
<table name="servicio" phpName="Servicio" idMethod="native">
<column name="ser_id" phpName="SerId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="template" phpName="Template" idMethod="native"> <table name="template" phpName="Template" idMethod="native">
<column name="tem_id" phpName="TemId" type="INTEGER" primaryKey="true" required="true"/> <column name="tem_id" phpName="TemId" type="INTEGER" primaryKey="true" required="true"/>
<column name="tem_nombre" phpName="TemNombre" type="VARCHAR" size="1000" required="false"/> <column name="tem_nombre" phpName="TemNombre" type="VARCHAR" size="1000" required="false"/>
......
...@@ -33,6 +33,8 @@ class CampaniaController extends Controller { ...@@ -33,6 +33,8 @@ class CampaniaController extends Controller {
const DEFAULT_SEC_ID = 1; const DEFAULT_SEC_ID = 1;
const DEFAULT_COLUMN_NUMBER = 0; const DEFAULT_COLUMN_NUMBER = 0;
const DEFAULT_TEMPLATE = 1; const DEFAULT_TEMPLATE = 1;
const DEFAULT_OPERATOR = 1;
const DEFAULT_SERVICE = 1;
/** /**
* @version 1.0.0 * @version 1.0.0
...@@ -51,6 +53,8 @@ class CampaniaController extends Controller { ...@@ -51,6 +53,8 @@ class CampaniaController extends Controller {
$campania->setCamEliminado(Campania::ELIMINADO_FALSE); $campania->setCamEliminado(Campania::ELIMINADO_FALSE);
$campania->setTemId(self::DEFAULT_TEMPLATE); $campania->setTemId(self::DEFAULT_TEMPLATE);
$campania->setCamJsonEstructura($json); $campania->setCamJsonEstructura($json);
$campania->setOpeId(self::DEFAULT_OPERATOR);
$campania->setSerId(self::DEFAULT_SERVICE);
$campania->save(); $campania->save();
return $this->redirectToRoute( return $this->redirectToRoute(
...@@ -121,6 +125,8 @@ class CampaniaController extends Controller { ...@@ -121,6 +125,8 @@ class CampaniaController extends Controller {
$campania->setCamAdwords($campaniaAdWords); $campania->setCamAdwords($campaniaAdWords);
$campania->setCamJsonEstructura($jsonContenido); $campania->setCamJsonEstructura($jsonContenido);
$campania->setCamUniqueKey(uniqid("str_" . $campania->getCamId() . "_")); $campania->setCamUniqueKey(uniqid("str_" . $campania->getCamId() . "_"));
$campania->setOpeId(self::DEFAULT_OPERATOR);
$campania->setSerId(self::DEFAULT_SERVICE);
$campania->save(); $campania->save();
...@@ -201,6 +207,8 @@ class CampaniaController extends Controller { ...@@ -201,6 +207,8 @@ class CampaniaController extends Controller {
$campania->setCamEstado(Campania::ESTADO_INACTIVO); $campania->setCamEstado(Campania::ESTADO_INACTIVO);
$campania->setCamEliminado(Campania::ELIMINADO_FALSE); $campania->setCamEliminado(Campania::ELIMINADO_FALSE);
$campania->setTemId(self::DEFAULT_TEMPLATE); $campania->setTemId(self::DEFAULT_TEMPLATE);
$campania->setOpeId(self::DEFAULT_OPERATOR);
$campania->setSerId(self::DEFAULT_SERVICE);
$campania->save(); $campania->save();
$contenidos = array(); $contenidos = array();
} else { } else {
......
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