You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
-
- namespace console\commands;
-
- use common\logic\Distribution\Distribution\Module\DistributionModule;
- use common\logic\Producer\Producer\Module\ProducerModule;
- use yii\console\Controller;
-
- class DemoAccountController extends Controller
- {
- public function actionIndex()
- {
- $producerModule = ProducerModule::getInstance();
- $distributionModule =DistributionModule::getInstance();
-
- $producerDemo = $producerModule->findOneProducerDemoAccount();
- \Yii::$app->logic->setProducerContext($producerDemo);
-
- if ($producerDemo) {
- $dateTime = strtotime("+7 day");
- $distribution = $distributionModule->createDistributionIfNotExist(date('Y-m-d', $dateTime));
- $distributionModule->activeDistribution($distribution);
- }
- }
- }
-
- ?>
|