您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

27 行
806B

  1. <?php
  2. namespace console\commands;
  3. use common\logic\Distribution\Distribution\Module\DistributionModule;
  4. use common\logic\Producer\Producer\Module\ProducerModule;
  5. use yii\console\Controller;
  6. class DemoAccountController extends Controller
  7. {
  8. public function actionIndex()
  9. {
  10. $producerModule = ProducerModule::getInstance();
  11. $distributionModule =DistributionModule::getInstance();
  12. $producerDemo = $producerModule->findOneProducerDemoAccount();
  13. \Yii::$app->logic->setProducerContext($producerDemo);
  14. if ($producerDemo) {
  15. $dateTime = strtotime("+7 day");
  16. $distribution = $distributionModule->createDistributionIfNotExist(date('Y-m-d', $dateTime));
  17. $distributionModule->activeDistribution($distribution);
  18. }
  19. }
  20. }
  21. ?>