| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace app\migrations;
- use common\enums\RabbitMqEnum;
- use common\models\user\UserTeamProfitStatistics;
- use yii\db\Migration;
- /**
- * Class M250604021553AddQimallUserProfitStatisticsData
- */
- class M250604021553AddQimallUserProfitStatisticsData extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- //处理累计历史订单利润数据
- \Yii::$app->services->rabbitMq->push(RabbitMqEnum::EXCHANGE_LONG_DURATION, RabbitMqEnum::LONG_DURATION_QUEUE,
- ['type' => 1], UserTeamProfitStatistics::class, 'cumulativeOrderProfit');
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250604021553AddQimallUserProfitStatisticsData cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250604021553AddQimallUserProfitStatisticsData cannot be reverted.\n";
- return false;
- }
- */
- }
|