|
|
@@ -2,23 +2,23 @@
|
|
|
|
|
|
namespace app\commands;
|
|
|
|
|
|
-use app\components\NotificacionController;
|
|
|
+use app\components\NotificacionController as Controller;
|
|
|
use app\components\Whatsapp;
|
|
|
use app\models\Notificacion;
|
|
|
use app\models\NotificacionUsuario;
|
|
|
-use yii\db\Expression;
|
|
|
-use yii\db\Query;
|
|
|
|
|
|
-class ParticipacionController extends NotificacionController {
|
|
|
+class NotificacionController extends Controller {
|
|
|
|
|
|
public function actionParticipacion() {
|
|
|
|
|
|
- $notificacion = $this->consultarNorificacion();
|
|
|
+ $notificacion = $this->consultarNotificacion();
|
|
|
if ($notificacion === null) {
|
|
|
$this->stdout("No hay notificaciones pendientes\n");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ $this->stdout("Procesando notificación {$notificacion->id}\n");
|
|
|
+
|
|
|
$params = \Yii::$app->params;
|
|
|
$wab = null;
|
|
|
if(isset($params["wab"])) {
|
|
|
@@ -65,6 +65,9 @@ class ParticipacionController extends NotificacionController {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ $nu->detalle = $resultado;
|
|
|
+ $nu->save();
|
|
|
+
|
|
|
// $this->stdout("Proceso terminado\n");
|
|
|
} catch (\Exception $e) {
|
|
|
$this->stdout("Error al enviar el mensaje: {$e->getMessage()}\n");
|