Commit 1a93e909 authored by Ana's avatar Ana

pruebas sms

parent 60f39b82
......@@ -78,6 +78,17 @@
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="campaign" phpName="Campaign" idMethod="native">
<column name="ca_id" phpName="CaId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="ca_mensaje" phpName="CaMensaje" type="LONGVARCHAR" required="true"/>
<column name="ca_estado" phpName="CaEstado" type="BOOLEAN" size="1" required="true" defaultValue="false"/>
<column name="ca_eliminado" phpName="CaEliminado" type="BOOLEAN" size="1" required="true" defaultValue="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="emailing" phpName="Emailing" idMethod="native">
<column name="ema_id" phpName="EmaId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="ema_total" phpName="EmaTotal" type="INTEGER" required="false"/>
......
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"hash": "b26c9fba642159f0b485ea86df8eee11",
"content-hash": "c25647f7ebf2b32f7b9a383d7d4dc0a0",
"content-hash": "abfd299c609fbc49d92de0871d755065",
"packages": [
{
"name": "bulkgate/message",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/BulkGate/message.git",
"reference": "f1b69295450ee9c6516ec874424139253743c032"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/BulkGate/message/zipball/f1b69295450ee9c6516ec874424139253743c032",
"reference": "f1b69295450ee9c6516ec874424139253743c032",
"shasum": ""
},
"require": {
"bulkgate/utils": "^2.0",
"php": ">=7.1.0"
},
"require-dev": {
"nette/tester": "~2.0",
"tracy/tracy": "~2.4"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "TOPefekt s.r.o.",
"homepage": "http://www.topefekt.com"
},
{
"name": "Lukáš Piják",
"homepage": "http://www.lukaspijak.com"
}
],
"description": "PHP SDK for access to BulkGate portal API",
"homepage": "https://www.bulkgate.com",
"keywords": [
"bulkgate",
"io",
"nette",
"sms"
],
"time": "2018-09-10T11:25:38+00:00"
},
{
"name": "bulkgate/sms",
"version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/BulkGate/sms.git",
"reference": "59e5232cdb63dccb20ca9b12ebf785bf54e395d1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/BulkGate/sms/zipball/59e5232cdb63dccb20ca9b12ebf785bf54e395d1",
"reference": "59e5232cdb63dccb20ca9b12ebf785bf54e395d1",
"shasum": ""
},
"require": {
"bulkgate/message": ">=2.0.2 <3.0.0",
"bulkgate/utils": "^2.0",
"php": ">=7.1.0"
},
"require-dev": {
"nette/tester": "~2.0",
"tracy/tracy": "^2.4"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "TOPefekt s.r.o.",
"homepage": "http://www.topefekt.com"
},
{
"name": "Lukáš Piják",
"homepage": "http://www.lukaspijak.com"
}
],
"description": "Simple PHP SDK for sending SMS via BulkGate portal. For credentials contact us.",
"homepage": "https://www.bulkgate.com",
"keywords": [
"bulkgate",
"nette",
"sms"
],
"time": "2019-03-26T11:52:15+00:00"
},
{
"name": "bulkgate/utils",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/BulkGate/utils.git",
"reference": "6d39b25c24e8f1001bd420fc2239b9afabb9c5d9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/BulkGate/utils/zipball/6d39b25c24e8f1001bd420fc2239b9afabb9c5d9",
"reference": "6d39b25c24e8f1001bd420fc2239b9afabb9c5d9",
"shasum": ""
},
"require": {
"php": ">=7.1.0"
},
"require-dev": {
"nette/tester": "~2.0"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "TOPefekt s.r.o.",
"homepage": "http://www.topefekt.com"
},
{
"name": "Lukáš Piják",
"homepage": "http://www.lukaspijak.com"
}
],
"description": "Generic utilites for BulkGate portal PHP SDK",
"homepage": "https://www.bulkgate.com",
"keywords": [
"bulkgate",
"compress",
"iterator",
"json",
"sms",
"strict"
],
"time": "2018-03-23T11:53:39+00:00"
},
{
"name": "doctrine/annotations",
"version": "v1.2.7",
......@@ -73,7 +228,7 @@
"docblock",
"parser"
],
"time": "2015-08-31 12:32:49"
"time": "2015-08-31T12:32:49+00:00"
},
{
"name": "doctrine/cache",
......@@ -143,7 +298,7 @@
"cache",
"caching"
],
"time": "2015-12-19 05:03:47"
"time": "2015-12-19T05:03:47+00:00"
},
{
"name": "doctrine/collections",
......@@ -209,7 +364,7 @@
"collections",
"iterator"
],
"time": "2015-04-14 22:21:58"
"time": "2015-04-14T22:21:58+00:00"
},
{
"name": "doctrine/common",
......@@ -282,7 +437,7 @@
"persistence",
"spl"
],
"time": "2015-12-25 13:10:16"
"time": "2015-12-25T13:10:16+00:00"
},
{
"name": "doctrine/dbal",
......@@ -353,7 +508,7 @@
"persistence",
"queryobject"
],
"time": "2016-09-09 19:13:33"
"time": "2016-09-09T19:13:33+00:00"
},
{
"name": "doctrine/doctrine-bundle",
......@@ -434,7 +589,7 @@
"orm",
"persistence"
],
"time": "2016-08-10 15:35:22"
"time": "2016-08-10T15:35:22+00:00"
},
{
"name": "doctrine/doctrine-cache-bundle",
......@@ -522,7 +677,7 @@
"cache",
"caching"
],
"time": "2016-01-26 17:28:51"
"time": "2016-01-26T17:28:51+00:00"
},
{
"name": "doctrine/inflector",
......@@ -589,7 +744,7 @@
"singularize",
"string"
],
"time": "2015-11-06 14:35:42"
"time": "2015-11-06T14:35:42+00:00"
},
{
"name": "doctrine/instantiator",
......@@ -643,7 +798,7 @@
"constructor",
"instantiate"
],
"time": "2015-06-14 21:17:01"
"time": "2015-06-14T21:17:01+00:00"
},
{
"name": "doctrine/lexer",
......@@ -697,19 +852,19 @@
"lexer",
"parser"
],
"time": "2014-09-09 13:34:57"
"time": "2014-09-09T13:34:57+00:00"
},
{
"name": "doctrine/orm",
"version": "v2.4.8",
"source": {
"type": "git",
"url": "https://github.com/doctrine/doctrine2.git",
"url": "https://github.com/doctrine/orm.git",
"reference": "5aedac1e5c5caaeac14798822c70325dc242d467"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/doctrine2/zipball/5aedac1e5c5caaeac14798822c70325dc242d467",
"url": "https://api.github.com/repos/doctrine/orm/zipball/5aedac1e5c5caaeac14798822c70325dc242d467",
"reference": "5aedac1e5c5caaeac14798822c70325dc242d467",
"shasum": ""
},
......@@ -770,7 +925,7 @@
"database",
"orm"
],
"time": "2015-08-31 13:19:01"
"time": "2015-08-31T13:19:01+00:00"
},
{
"name": "friendsofsymfony/rest-bundle",
......@@ -867,7 +1022,7 @@
"keywords": [
"rest"
],
"time": "2016-11-23 12:09:05"
"time": "2016-11-23T12:09:05+00:00"
},
{
"name": "incenteev/composer-parameter-handler",
......@@ -918,7 +1073,7 @@
"keywords": [
"parameters management"
],
"time": "2015-11-10 17:04:01"
"time": "2015-11-10T17:04:01+00:00"
},
{
"name": "ircmaxell/password-compat",
......@@ -960,7 +1115,7 @@
"hashing",
"password"
],
"time": "2014-11-20 16:49:30"
"time": "2014-11-20T16:49:30+00:00"
},
{
"name": "jdorn/sql-formatter",
......@@ -1010,7 +1165,7 @@
"highlight",
"sql"
],
"time": "2014-01-12 16:20:24"
"time": "2014-01-12T16:20:24+00:00"
},
{
"name": "jms/metadata",
......@@ -1061,7 +1216,7 @@
"xml",
"yaml"
],
"time": "2016-12-05 10:18:33"
"time": "2016-12-05T10:18:33+00:00"
},
{
"name": "jms/parser-lib",
......@@ -1096,7 +1251,7 @@
"Apache2"
],
"description": "A library for easily creating recursive-descent parsers.",
"time": "2012-11-18 18:08:43"
"time": "2012-11-18T18:08:43+00:00"
},
{
"name": "jms/serializer",
......@@ -1171,7 +1326,7 @@
"serialization",
"xml"
],
"time": "2016-11-13 10:20:11"
"time": "2016-11-13T10:20:11+00:00"
},
{
"name": "jms/serializer-bundle",
......@@ -1241,7 +1396,7 @@
"serialization",
"xml"
],
"time": "2015-11-10 12:26:42"
"time": "2015-11-10T12:26:42+00:00"
},
{
"name": "michelf/php-markdown",
......@@ -1292,7 +1447,7 @@
"keywords": [
"markdown"
],
"time": "2016-10-29 18:58:20"
"time": "2016-10-29T18:58:20+00:00"
},
{
"name": "mobiledetect/mobiledetectlib",
......@@ -1346,7 +1501,7 @@
"mobile detector",
"php mobile detect"
],
"time": "2016-11-11 14:56:25"
"time": "2016-11-11T14:56:25+00:00"
},
{
"name": "monolog/monolog",
......@@ -1424,7 +1579,7 @@
"logging",
"psr-3"
],
"time": "2016-07-29 03:23:52"
"time": "2016-07-29T03:23:52+00:00"
},
{
"name": "nelmio/api-doc-bundle",
......@@ -1509,7 +1664,7 @@
"documentation",
"rest"
],
"time": "2016-06-13 09:12:09"
"time": "2016-06-13T09:12:09+00:00"
},
{
"name": "paragonie/random_compat",
......@@ -1557,7 +1712,7 @@
"pseudorandom",
"random"
],
"time": "2016-04-03 06:00:07"
"time": "2016-04-03T06:00:07+00:00"
},
{
"name": "phing/phing",
......@@ -1650,7 +1805,7 @@
"task",
"tool"
],
"time": "2016-10-13 09:01:45"
"time": "2016-10-13T09:01:45+00:00"
},
{
"name": "phpcollection/phpcollection",
......@@ -1698,7 +1853,7 @@
"sequence",
"set"
],
"time": "2015-05-17 12:39:23"
"time": "2015-05-17T12:39:23+00:00"
},
{
"name": "phpoption/phpoption",
......@@ -1748,7 +1903,7 @@
"php",
"type"
],
"time": "2015-07-25 16:39:46"
"time": "2015-07-25T16:39:46+00:00"
},
{
"name": "propel/propel-bundle",
......@@ -1811,7 +1966,7 @@
"persistence",
"propel"
],
"time": "2016-02-15 21:33:58"
"time": "2016-02-15T21:33:58+00:00"
},
{
"name": "propel/propel1",
......@@ -1874,7 +2029,7 @@
"orm",
"persistence"
],
"time": "2014-02-25 09:13:58"
"time": "2014-02-25T09:13:58+00:00"
},
{
"name": "psr/log",
......@@ -1921,7 +2076,7 @@
"psr",
"psr-3"
],
"time": "2016-09-19 16:02:08"
"time": "2016-09-19T16:02:08+00:00"
},
{
"name": "sensio/distribution-bundle",
......@@ -1973,7 +2128,7 @@
"configuration",
"distribution"
],
"time": "2016-09-14 20:25:12"
"time": "2016-09-14T20:25:12+00:00"
},
{
"name": "sensio/framework-extra-bundle",
......@@ -2035,7 +2190,7 @@
"annotations",
"controllers"
],
"time": "2016-03-25 17:08:27"
"time": "2016-03-25T17:08:27+00:00"
},
{
"name": "sensiolabs/security-checker",
......@@ -2079,7 +2234,7 @@
}
],
"description": "A security checker for your composer.lock",
"time": "2015-11-07 08:07:40"
"time": "2015-11-07T08:07:40+00:00"
},
{
"name": "suncat/mobile-detect-bundle",
......@@ -2140,7 +2295,7 @@
"mobile view managing",
"symfony mobile"
],
"time": "2016-03-24 13:25:38"
"time": "2016-03-24T13:25:38+00:00"
},
{
"name": "swiftmailer/swiftmailer",
......@@ -2193,7 +2348,7 @@
"mail",
"mailer"
],
"time": "2016-07-08 11:51:25"
"time": "2016-07-08T11:51:25+00:00"
},
{
"name": "symfony/monolog-bundle",
......@@ -2253,7 +2408,7 @@
"log",
"logging"
],
"time": "2016-04-13 16:21:01"
"time": "2016-04-13T16:21:01+00:00"
},
{
"name": "symfony/polyfill-apcu",
......@@ -2306,7 +2461,7 @@
"portable",
"shim"
],
"time": "2016-05-18 14:26:46"
"time": "2016-05-18T14:26:46+00:00"
},
{
"name": "symfony/polyfill-intl-icu",
......@@ -2364,7 +2519,7 @@
"portable",
"shim"
],
"time": "2016-05-18 14:26:46"
"time": "2016-05-18T14:26:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
......@@ -2423,7 +2578,7 @@
"portable",
"shim"
],
"time": "2016-05-18 14:26:46"
"time": "2016-05-18T14:26:46+00:00"
},
{
"name": "symfony/polyfill-php54",
......@@ -2481,7 +2636,7 @@
"portable",
"shim"
],
"time": "2016-05-18 14:26:46"
"time": "2016-05-18T14:26:46+00:00"
},
{
"name": "symfony/polyfill-php55",
......@@ -2537,7 +2692,7 @@
"portable",
"shim"
],
"time": "2016-05-18 14:26:46"
"time": "2016-05-18T14:26:46+00:00"
},
{
"name": "symfony/polyfill-php56",
......@@ -2593,7 +2748,7 @@
"portable",
"shim"
],
"time": "2016-05-18 14:26:46"
"time": "2016-05-18T14:26:46+00:00"
},
{
"name": "symfony/polyfill-php70",
......@@ -2652,7 +2807,7 @@
"portable",
"shim"
],
"time": "2016-05-18 14:26:46"
"time": "2016-05-18T14:26:46+00:00"
},
{
"name": "symfony/polyfill-util",
......@@ -2704,7 +2859,7 @@
"polyfill",
"shim"
],
"time": "2016-05-18 14:26:46"
"time": "2016-05-18T14:26:46+00:00"
},
{
"name": "symfony/security-acl",
......@@ -2765,7 +2920,7 @@
],
"description": "Symfony Security Component - ACL (Access Control List)",
"homepage": "https://symfony.com",
"time": "2015-12-28 09:39:09"
"time": "2015-12-28T09:39:09+00:00"
},
{
"name": "symfony/swiftmailer-bundle",
......@@ -2822,7 +2977,7 @@
],
"description": "Symfony SwiftmailerBundle",
"homepage": "http://symfony.com",
"time": "2016-01-15 16:41:20"
"time": "2016-01-15T16:41:20+00:00"
},
{
"name": "symfony/symfony",
......@@ -2957,7 +3112,7 @@
"keywords": [
"framework"
],
"time": "2016-10-03 18:44:12"
"time": "2016-10-03T18:44:12+00:00"
},
{
"name": "twig/twig",
......@@ -3018,7 +3173,7 @@
"keywords": [
"templating"
],
"time": "2016-10-25 19:17:17"
"time": "2016-10-25T19:17:17+00:00"
},
{
"name": "willdurand/jsonp-callback-validator",
......@@ -3058,7 +3213,7 @@
}
],
"description": "JSONP callback validator.",
"time": "2014-01-20 22:35:06"
"time": "2014-01-20T22:35:06+00:00"
},
{
"name": "willdurand/negotiation",
......@@ -3110,7 +3265,7 @@
"header",
"negotiation"
],
"time": "2016-10-14 09:17:47"
"time": "2016-10-14T09:17:47+00:00"
}
],
"packages-dev": [
......@@ -3164,7 +3319,7 @@
}
],
"description": "This bundle generates code for you",
"time": "2016-09-06 01:30:19"
"time": "2016-09-06T01:30:19+00:00"
},
{
"name": "symfony/phpunit-bridge",
......@@ -3219,7 +3374,7 @@
],
"description": "Symfony PHPUnit Bridge",
"homepage": "https://symfony.com",
"time": "2016-08-19 06:48:01"
"time": "2016-08-19T06:48:01+00:00"
}
],
"aliases": [],
......
......@@ -5,6 +5,9 @@ use AppBundle\Model\om\BaseSms;
use Monolog\Logger;
use Symfony\Component\DependencyInjection\Container;
use AppBundle\Lib\Utiles;
use BulkGate\Sms\Sender;
use BulkGate\Message\Connection;
use BulkGate\Sms\Message;
class Sms extends BaseSms
{
......@@ -50,20 +53,43 @@ class Sms extends BaseSms
$sms->save();
//$urlDescarga = Sms::acortarUrl($url);
$urlDescarga = $url;
$urlDescarga = Sms::acortarUrl($url);
//$urlDescarga = $url;
$mensaje=$mensaje . $urlDescarga;
//$mensaje=$mensaje . $urlDescarga;
//$mensaje=$mensaje . 'http://cort.as/-Jvtw';
$mensaje=$mensaje . $urlDescarga;
$post['to'] = array($movil);
// $post['to'] = array($movil);
$mensaje=$mensaje . $urlDescarga;
// $mensaje=$mensaje . $urlDescarga;
$post['to'] = array('584165388803');
$post['text'] = $mensaje;
$post['from'] = "McAfee";
$user ="gearlabs";
$password = 'G1e2a3r4';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"https://gateway.plusmms.net/rest/message");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post));
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Accept: application/json",
"Authorization: Basic ".base64_encode($user.":".$password)
));
$result = curl_exec ($ch);
print_r($result);
$post['to'] = array($movil);
/* $post['to'] = array($movil);
$post['text'] = $mensaje;
$post['from'] = Utiles::getParametroConfiguracion("from_sms");
$user =Utiles::getParametroConfiguracion("usuario_sms");
......@@ -88,14 +114,22 @@ class Sms extends BaseSms
$info = curl_getinfo($ch);
print_r($info['request_header']);
print_r($result);
print_r($result);*/
//print_r($result['error']['code']);
$log->debug($tag.'enviando mensaje...'. $urlDescarga);
/***************************************/
/* $request = '{
/*$connection = new Connection('4535', 'ElsgoG5xHwoAi4vevzBRIXZduAiMySMXgb9FAuVi3pEdgU8GnW');
$sender = new Sender($connection);
$message = new Message('584128000742', $mensaje);
$response = $sender->send($message);
print_r($response);
*/
/*$request = '{
"api_key":"9df2cfda7cc871680ede6ec24b4a479d",
"report_url":"http://servidoctor.com/callback/script",
"concat":1,
......@@ -124,7 +158,7 @@ class Sms extends BaseSms
if (curl_errno($ch) != 0 ){
die("curl error: ".curl_errno($ch));
} */
}*/
/***************************************/
if($result['error']['code']==0){
......@@ -159,13 +193,13 @@ class Sms extends BaseSms
}
/* public static function acortar_url($url) {
/* public static function acortar_url($url) {
$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);
}*/
}
*/
public static function acortarUrl($data){
$url = "http://url.gearlabs.cl/acortar";
......
......@@ -58,4 +58,21 @@ class CampaignTableMap extends TableMap
{
} // 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()
} // CampaignTableMap
......@@ -577,8 +577,19 @@ abstract class BaseCampaign extends BaseObject implements Persistent
$ret = $this->preSave($con);
if ($isInsert) {
$ret = $ret && $this->preInsert($con);
// timestampable behavior
if (!$this->isColumnModified(CampaignPeer::CREATED_AT)) {
$this->setCreatedAt(time());
}
if (!$this->isColumnModified(CampaignPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
} else {
$ret = $ret && $this->preUpdate($con);
// timestampable behavior
if ($this->isModified() && !$this->isColumnModified(CampaignPeer::UPDATED_AT)) {
$this->setUpdatedAt(time());
}
}
if ($ret) {
$affectedRows = $this->doSave($con);
......@@ -1166,4 +1177,18 @@ abstract class BaseCampaign extends BaseObject implements Persistent
return $this->alreadyInSave;
}
// timestampable behavior
/**
* Mark the current object so that the update date doesn't get updated during next save
*
* @return Campaign The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
$this->modifiedColumns[] = CampaignPeer::UPDATED_AT;
return $this;
}
}
......@@ -469,4 +469,69 @@ abstract class BaseCampaignQuery extends ModelCriteria
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return CampaignQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(CampaignPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return CampaignQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(CampaignPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return CampaignQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(CampaignPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return CampaignQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(CampaignPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return CampaignQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(CampaignPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return CampaignQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(CampaignPeer::CREATED_AT);
}
}
......@@ -74,6 +74,16 @@
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="campaign" phpName="Campaign" idMethod="native">
<column name="ca_id" phpName="CaId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="ca_mensaje" phpName="CaMensaje" type="LONGVARCHAR" required="true"/>
<column name="ca_estado" phpName="CaEstado" type="BOOLEAN" size="1" required="true" defaultValue="false"/>
<column name="ca_eliminado" phpName="CaEliminado" type="BOOLEAN" size="1" required="true" defaultValue="false"/>
<behavior name="timestampable" />
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="emailing" phpName="Emailing" idMethod="native">
<column name="ema_id" phpName="EmaId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="ema_total" phpName="EmaTotal" type="INTEGER" required="false"/>
......
......@@ -36,8 +36,8 @@ class McafeeEnviarSmsCommand extends ContainerAwareCommand
$log->debug('************************Iniciando McafeeEnviarSmsCommand ************************');
$tt = new TiempoTranscurrido();
$fp = fopen("/opt/sdp/intelsecuritymovistar/etc/sms/3_36460.csv", "r");
//$fp = fopen("C:\ana3\movistarChile\prueba.csv", "r");
//$fp = fopen("/opt/sdp/intelsecuritymovistar/etc/sms/3_36460.csv", "r");
$fp = fopen("C:\ana3\movistarChile\prueba.csv", "r");
if (!$fp) {
$log->warning('Error al intentar abrir el archivo');
......
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