12345678910111213141516171819202122232425262728 |
- <?php
- use app\store\model\user\CommerCountTj;
- use think\migration\Seeder;
- class GenCommerCountTjSeeder extends Seeder
- {
- /**
- * Run Method.
- *
- * Write your database seeder using this method.
- *
- * More information on writing seeders is available here:
- * http://docs.phinx.org/en/latest/seeding.html
- */
- public function run()
- {
- $now = time();
- $csvTj = new CommerCountTj();
- for($i = 0;$i<=60;$i++){
- $baseTime = $now - 86400*$i;
- $csvTj->day($baseTime);
- $csvTj->week($baseTime);
- $csvTj->month($baseTime);
- }
- }
- }
|