debug
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class AddGgPaiXuColumOnGuangGaoTable extends Migrator
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$Table = $this->table('guang_gao');
|
||||
|
||||
$Table->addColumn('gg_sort', 'integer', ['after' => 'gg_tiao_zhuan_di_zhi'])->setComment("排序")->save();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$Table = $this->table('guang_gao');
|
||||
$Table->removeColumn('gg_sort')->save();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class SeoKeywordsTable extends Migrator
|
||||
{
|
||||
public function change()
|
||||
{
|
||||
// 创建 seo_keywords 表
|
||||
$table = $this->table('seo_keywords', [
|
||||
'id' => 'sw_id' // 这里指定 sw_id 作为自增主键
|
||||
]);
|
||||
|
||||
// 添加 sw_title 字段,类型为字符串
|
||||
$table->addColumn('sw_title', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => false,
|
||||
'comment' => '关键词标题'
|
||||
]);
|
||||
|
||||
// 添加 sw_status 字段,类型为布尔值或整数
|
||||
$table->addColumn('sw_status', 'boolean', [
|
||||
'default' => 0,
|
||||
'null' => false,
|
||||
'comment' => '关键词状态,1表示启用,0表示禁用'
|
||||
]);
|
||||
|
||||
// 添加 sw_html_path 字段,类型为字符串
|
||||
$table->addColumn('sw_html_path', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => true,
|
||||
'comment' => '关键词关联的HTML路径'
|
||||
]);
|
||||
|
||||
// 为 sw_html_path 字段添加索引
|
||||
$table->addIndex(['sw_html_path'], [
|
||||
'unique' => false, // 如果你希望索引是唯一的,设置为 true
|
||||
'name' => 'idx_sw_html_path' // 索引名称,可以省略,系统会自动生成
|
||||
]);
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class GuanggaoAddStatus extends Migrator
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$Table = $this->table('guang_gao');
|
||||
|
||||
$Table->addColumn('gg_status', 'integer', ['after' => 'gg_tiao_zhuan_di_zhi', 'default' => 0])->setComment("状态")->save();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$Table = $this->table('guang_gao');
|
||||
$Table->removeColumn('gg_status')->save();
|
||||
}
|
||||
}
|
||||
65
code/database/migrations/20250104155836_video_class.php
Normal file
65
code/database/migrations/20250104155836_video_class.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class VideoClass extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 seo_keywords 表
|
||||
$table = $this->table('video_class', [
|
||||
'id' => 'vc_id' // 这里指定 sw_id 作为自增主键
|
||||
]);
|
||||
|
||||
// 添加 vc_name 字段,类型为字符串
|
||||
$table->addColumn('vc_name', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => false,
|
||||
'comment' => '分类名称'
|
||||
]);
|
||||
// 添加 vc_name 字段,类型为字符串
|
||||
$table->addColumn('vc_nicheng', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => false,
|
||||
'comment' => '分类昵称'
|
||||
]);
|
||||
|
||||
$table->addColumn('vc_sort', 'integer', [
|
||||
'limit' => 255,
|
||||
'default'=>0,
|
||||
'comment' => '排序'
|
||||
]);
|
||||
// 添加 vc_status 字段,类型为布尔值或整数
|
||||
$table->addColumn('vc_status', 'boolean', [
|
||||
'default' => 1,
|
||||
'null' => false,
|
||||
'comment' => '关键词状态,1表示启用,0表示禁用'
|
||||
]);
|
||||
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
}
|
||||
}
|
||||
65
code/database/migrations/20250104160751_video_leixin.php
Normal file
65
code/database/migrations/20250104160751_video_leixin.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class VideoLeixin extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 seo_keywords 表
|
||||
$table = $this->table('video_leixin', [
|
||||
'id' => 'vl_id' // 这里指定 sw_id 作为自增主键
|
||||
]);
|
||||
|
||||
// 添加 vc_id 字段,
|
||||
$table->addColumn('vc_id', 'integer', [
|
||||
'limit' => 11,
|
||||
'null' => false,
|
||||
'comment' => '分类id'
|
||||
]);
|
||||
|
||||
// 添加 vl_name 字段,类型为字符串
|
||||
$table->addColumn('vl_name', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => false,
|
||||
'comment' => '类型名称'
|
||||
]);
|
||||
// 添加 vp_sort 字段,
|
||||
$table->addColumn('vl_sort', 'integer', [
|
||||
'default'=>0,
|
||||
'comment' => '排序'
|
||||
]);
|
||||
|
||||
// 添加 vc_status 字段,类型为布尔值或整数
|
||||
$table->addColumn('vl_status', 'boolean', [
|
||||
'default' => 1,
|
||||
'null' => false,
|
||||
'comment' => '关键词状态,1表示启用,0表示禁用'
|
||||
]);
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
}
|
||||
}
|
||||
58
code/database/migrations/20250104161057_video_juqing.php
Normal file
58
code/database/migrations/20250104161057_video_juqing.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class VideoJuqing extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 seo_keywords 表
|
||||
$table = $this->table('video_juqing', [
|
||||
'id' => 'vj_id' // 这里指定 sw_id 作为自增主键
|
||||
]);
|
||||
|
||||
// 添加 vc_id 字段,
|
||||
$table->addColumn('vc_id', 'integer', [
|
||||
'limit' => 11,
|
||||
'null' => false,
|
||||
'comment' => '分类id'
|
||||
]);
|
||||
|
||||
// 添加 vl_name 字段,类型为字符串
|
||||
$table->addColumn('vj_name', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => false,
|
||||
'comment' => '剧情名称'
|
||||
]);
|
||||
// 添加 vp_sort 字段,
|
||||
$table->addColumn('vj_sort', 'integer', [
|
||||
'default'=>0,
|
||||
'comment' => '排序'
|
||||
]);
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
}
|
||||
}
|
||||
59
code/database/migrations/20250104161633_video_diqu.php
Normal file
59
code/database/migrations/20250104161633_video_diqu.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class VideoDiqu extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 seo_keywords 表
|
||||
$table = $this->table('video_diqu', [
|
||||
'id' => 'vd_id' // 这里指定 sw_id 作为自增主键
|
||||
]);
|
||||
|
||||
// 添加 vc_id 字段,
|
||||
$table->addColumn('vc_id', 'integer', [
|
||||
'limit' => 11,
|
||||
'null' => false,
|
||||
'comment' => '分类id'
|
||||
]);
|
||||
|
||||
// 添加 vl_name 字段,类型为字符串
|
||||
$table->addColumn('vd_name', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => false,
|
||||
'comment' => '地区名称'
|
||||
]);
|
||||
// 添加 vp_sort 字段,
|
||||
$table->addColumn('vd_sort', 'integer', [
|
||||
'limit' => 255,
|
||||
'default'=>0,
|
||||
'comment' => '排序'
|
||||
]);
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
}
|
||||
}
|
||||
58
code/database/migrations/20250104161642_video_years.php
Normal file
58
code/database/migrations/20250104161642_video_years.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class VideoYears extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 seo_keywords 表
|
||||
$table = $this->table('video_years', [
|
||||
'id' => 'vy_id' // 这里指定 sw_id 作为自增主键
|
||||
]);
|
||||
|
||||
// 添加 vc_id 字段,
|
||||
$table->addColumn('vc_id', 'integer', [
|
||||
'limit' => 11,
|
||||
'null' => false,
|
||||
'comment' => '分类id'
|
||||
]);
|
||||
|
||||
// 添加 vl_name 字段,类型为字符串
|
||||
$table->addColumn('vy_name', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => false,
|
||||
'comment' => '年份名称'
|
||||
]);
|
||||
// 添加 vp_sort 字段,
|
||||
$table->addColumn('vy_sort', 'integer', [
|
||||
'limit' => 255,
|
||||
'default'=>0,
|
||||
'comment' => '排序'
|
||||
]);
|
||||
// 创建表
|
||||
$table->create();
|
||||
}
|
||||
}
|
||||
59
code/database/migrations/20250104161650_video_language.php
Normal file
59
code/database/migrations/20250104161650_video_language.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class VideoLanguage extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 seo_keywords 表
|
||||
$table = $this->table('video_language', [
|
||||
'id' => 'vla_id' // 这里指定 sw_id 作为自增主键
|
||||
]);
|
||||
|
||||
// 添加 vc_id 字段,
|
||||
$table->addColumn('vc_id', 'integer', [
|
||||
'limit' => 11,
|
||||
'null' => false,
|
||||
'comment' => '分类id'
|
||||
]);
|
||||
|
||||
// 添加 vl_name 字段,类型为字符串
|
||||
$table->addColumn('vla_name', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => false,
|
||||
'comment' => '语言名称'
|
||||
]);
|
||||
// 添加 vp_sort 字段,
|
||||
$table->addColumn('vla_sort', 'integer', [
|
||||
'limit' => 255,
|
||||
'default'=>0,
|
||||
'comment' => '排序'
|
||||
]);
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
}
|
||||
}
|
||||
91
code/database/migrations/20250104162037_video_info.php
Normal file
91
code/database/migrations/20250104162037_video_info.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class VideoInfo extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 video_info 表
|
||||
$table = $this->table('video_info', [
|
||||
'id' => 'v_id' // 这里指定 v_id 作为自增主键
|
||||
]);
|
||||
$table->addColumn('v_name', 'string', ['limit' => 255,'null' => false,'comment' => '名称']);
|
||||
$table->addColumn('v_cover', 'json', ['default' => null, 'null' => true, 'comment' => '封面']);
|
||||
|
||||
$table->addColumn('vc_id', 'integer', ['comment' => '视频分类id:1电影,2电视剧,3综艺,4动漫']);
|
||||
|
||||
$table->addColumn('v_pinyin', 'string', ['limit' => 255,'comment' => '[拼音id]']);
|
||||
$table->addColumn('v_leixin', 'string', ['limit' => 255,'null' => true,'comment' => '类型']);
|
||||
$table->addColumn('v_juqing', 'string', ['limit' => 255,'null' => true,'comment' => '剧情']);
|
||||
$table->addColumn('v_diqu', 'string', ['limit' => 255,'null' => true,'comment' => '地区']);
|
||||
$table->addColumn('v_years', 'string', ['limit' => 255,'null' => true,'comment' => '年份']);
|
||||
$table->addColumn('v_language', 'string', ['limit' => 255,'null' => true,'comment' => '语言']);
|
||||
|
||||
$table->addColumn('v_daoyan', 'string', ['limit' => 255,'null' => true,'comment' => '导演']);
|
||||
$table->addColumn('v_zhuyan', 'string', ['limit' => 255,'null' => true,'comment' => '主演']);
|
||||
$table->addColumn('v_orurl', 'string', ['limit' => 255,'comment' => '来源url']);
|
||||
$table->addColumn('v_md5', 'string', ['limit' => 255,'comment' => 'md5:vc_id+v_name+v_orurl']);
|
||||
$table->addColumn('v_jiaobiao', 'string', ['limit' => 255,'null' => true,'comment' => '角标']);
|
||||
|
||||
$table->addColumn('v_description', 'text', ['comment' => '简介']);
|
||||
|
||||
$table->addColumn('v_pingfen', 'decimal', ['precision' => 10, 'scale' => 2, 'default' => 0, 'comment' => '评分']);
|
||||
$table->addColumn('v_status', 'boolean',array('limit' => 1,'default'=>0,'comment'=>'状态:0:正常,1:异常'));
|
||||
|
||||
$table->addColumn('v_click', 'integer', ['default'=>0,'comment' => '点击数']);
|
||||
$table->addColumn('v_recommend', 'integer', ['default'=>0,'comment' => '推荐等级']);
|
||||
|
||||
|
||||
$table->addColumn('update_time', 'datetime', ['null' => true, 'comment' => '更新时间']);
|
||||
$table->addColumn('create_time', 'datetime', ['null' => true, 'comment' => '创建时间']);
|
||||
|
||||
$table->addIndex('vc_id');
|
||||
$table->addIndex('v_md5');
|
||||
$table->addIndex('v_pinyin');
|
||||
$table->addIndex('v_status');
|
||||
// 添加复合索引 idx_vc_id_pingfen
|
||||
$table->addIndex(['vc_id', 'v_pingfen'], [
|
||||
'name' => 'idx_vc_id_pingfen',
|
||||
'unique' => false
|
||||
]);
|
||||
|
||||
// 添加复合索引 idx_vc_id_v_click
|
||||
$table->addIndex(['vc_id', 'v_click'], [
|
||||
'name' => 'idx_vc_id_v_click',
|
||||
'unique' => false
|
||||
]);
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
|
||||
|
||||
// $table->string('head_title',100)->default('')->comment('seo-标题');
|
||||
// $table->string('head_keyword',200)->default('')->comment('seo-关键词');
|
||||
// $table->string('head_description',255)->default('')->comment('seo-描述');
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
68
code/database/migrations/20250104162430_video_playurl.php
Normal file
68
code/database/migrations/20250104162430_video_playurl.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class VideoPlayurl extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 seo_keywords 表
|
||||
$table = $this->table('video_playurl', [
|
||||
'id' => 'vp_id' // 这里指定 vp_id 作为自增主键
|
||||
]);
|
||||
|
||||
// 添加 v_id 字段,
|
||||
$table->addColumn('v_id', 'integer', [
|
||||
'comment' => '视频id'
|
||||
]);
|
||||
|
||||
// 添加 vp_sort 字段,
|
||||
$table->addColumn('vp_sort', 'integer', [
|
||||
'default'=>0,
|
||||
'comment' => '线路排序'
|
||||
]);
|
||||
|
||||
// 添加 vp_md5 字段,
|
||||
$table->addColumn('vp_md5', 'string', [
|
||||
'limit' => 255,
|
||||
'comment' => 'md5:v_id+vp_url'
|
||||
]);
|
||||
|
||||
|
||||
// 添加 vp_name 字段,类型为字符串
|
||||
$table->addColumn('vp_name', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => false,
|
||||
'comment' => '线路名称'
|
||||
]);
|
||||
|
||||
$table->addColumn('vp_url', 'json', [ 'null' => false, 'comment' => '播放地址']);
|
||||
$table->addIndex('v_id');
|
||||
$table->addIndex('vp_md5');
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
}
|
||||
}
|
||||
62
code/database/migrations/20250105042300_gan_rao_ma.php
Normal file
62
code/database/migrations/20250105042300_gan_rao_ma.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class GanRaoMa extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 gan_rao_ma 表
|
||||
$table = $this->table('gan_rao_ma', [
|
||||
'id' => 'grm_id' // 这里指定 grm_id 作为自增主键
|
||||
]);
|
||||
|
||||
// 添加 grm_neirong 字段,类型为字符串
|
||||
$table->addColumn('grm_neirong', 'text', [
|
||||
'null' => false,
|
||||
'comment' => '干扰码内容'
|
||||
]);
|
||||
|
||||
// 添加 grm_status 字段,类型为布尔值或整数
|
||||
$table->addColumn('grm_status', 'boolean', [
|
||||
'default' => 0,
|
||||
'null' => false,
|
||||
'comment' => '干扰码状态,1表示启用,0表示禁用'
|
||||
]);
|
||||
|
||||
// 添加 grm_html_path 字段,类型为字符串
|
||||
$table->addColumn('grm_html_path', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => true,
|
||||
'comment' => '干扰码关联的HTML路径'
|
||||
]);
|
||||
|
||||
// 为 grm_html_path 字段添加索引
|
||||
$table->addIndex('grm_html_path');
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
}
|
||||
}
|
||||
48
code/database/migrations/20250108092206_seo_tdk_config.php
Normal file
48
code/database/migrations/20250108092206_seo_tdk_config.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class SeoTdkConfig extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 seo_tdk_config 表
|
||||
$table = $this->table('seo_tdk_config', [
|
||||
'id' => 'stc_id' // 这里指定 stc_id 作为自增主键
|
||||
]);
|
||||
$table->addColumn('stc_code', 'string', ['limit' => 255,'null' => false,'comment' => '编码标识']);
|
||||
$table->addColumn('stc_name', 'string', ['limit' => 255,'null' => true,'comment' => '页面名称']);
|
||||
$table->addColumn('stc_title', 'string', ['limit' => 255,'null' => true,'comment' => '页面标题']);
|
||||
$table->addColumn('stc_keywords', 'string', ['limit' => 255,'null' => true,'comment' => '页面关键词']);
|
||||
$table->addColumn('stc_description', 'string', ['limit' => 255,'null' => true,'comment' => '页面描述']);
|
||||
$table->addColumn('stc_other_conf', 'string', ['limit' => 255,'null' => true,'comment' => '其它配置']);
|
||||
$table->addColumn('stc_tongji_daima', 'string', ['limit' => 255,'null' => true,'comment' => '页面统计代码']);
|
||||
$table->addColumn('stc_status', 'boolean',array('limit' => 1,'default'=>0,'comment'=>'状态:0:正常,1:异常'));
|
||||
$table->addIndex('stc_code');
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class CreateVisitLogs extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 visit_logs 表
|
||||
$visitLogsTable = $this->table('visit_logs', [
|
||||
'id' => 'vil_id' // 这里指定 stc_id 作为自增主键
|
||||
]);
|
||||
|
||||
$visitLogsTable->addColumn('vil_ip', 'string', ['limit' => 45, 'null' => false, 'comment' => '访问者 IP 地址'])
|
||||
->addColumn('vil_url', 'text', ['null' => false, 'comment' => '访问的 URL'])
|
||||
->addColumn('vil_method', 'string', ['limit' => 10, 'null' => false, 'comment' => 'HTTP 方法'])
|
||||
->addColumn('vil_content_type', 'enum', ['values' => ['video', 'novel', 'page'], 'null' => false, 'comment' => '内容类型(视频、小说、页面)'])
|
||||
->addColumn('vil_content_id', 'string', ['default' => '','null' => false, 'comment' => '内容 ID(视频、小说或页面的唯一标识)'])
|
||||
|
||||
->addColumn('vil_user_agent', 'text', ['null' => true, 'comment' => 'User-Agent 信息'])
|
||||
->addColumn('vil_headers', 'text', ['null' => true, 'comment' => '请求头信息'])
|
||||
->addColumn('vil_is_spider', 'boolean', ['default' => 0, 'comment' => '是否为爬虫:0-否,1-是'])
|
||||
->addColumn('vil_location', 'text', ['null' => true, 'comment' => '地理位置'])
|
||||
->addColumn('vil_user_id', 'biginteger', ['null' => true, 'comment' => '用户 ID(可选)'])
|
||||
->addColumn('vil_timestamp', 'datetime', ['null' => true,'default' => 'CURRENT_TIMESTAMP', 'comment' => '访问时间'])
|
||||
// 添加索引
|
||||
->addIndex(['vil_content_type', 'vil_content_id'], ['name' => 'idx_content_type_id'])
|
||||
->addIndex('vil_timestamp', ['name' => 'idx_timestamp'])
|
||||
->addIndex('vil_is_spider', ['name' => 'idx_is_spider'])
|
||||
->addIndex('vil_user_id', ['name' => 'idx_user_id'])
|
||||
->addIndex('vil_ip', ['name' => 'idx_ip'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class CreateContentStats extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
|
||||
// 创建 content_stats 表
|
||||
$table = $this->table('content_stats', [
|
||||
'id' => 'cs_id' // 这里指定 stc_id 作为自增主键
|
||||
]);
|
||||
|
||||
|
||||
$table->addColumn('cs_content_type', 'enum', [
|
||||
'values' => ['video', 'novel', 'page'], // 扩展支持页面
|
||||
'null' => false,
|
||||
'comment' => '内容类型(视频、小说、页面)'
|
||||
])
|
||||
->addColumn('cs_content_id', 'string', [
|
||||
'null' => false,
|
||||
'comment' => '内容 ID(视频、小说或页面 ID)'
|
||||
])
|
||||
->addColumn('cs_stat_date', 'string', [
|
||||
'null' => false,
|
||||
'comment' => '统计日期'
|
||||
])
|
||||
->addColumn('cs_stat_period', 'enum', [
|
||||
'values' => ['day', 'week', 'month', 'quarter', 'year'],
|
||||
'null' => false,
|
||||
'comment' => '统计周期'
|
||||
])
|
||||
->addColumn('cs_pv', 'integer', [
|
||||
'null' => false,
|
||||
'default' => 0,
|
||||
'comment' => '页面浏览量(PV)'
|
||||
])
|
||||
->addColumn('cs_uv', 'integer', [
|
||||
'null' => false,
|
||||
'default' => 0,
|
||||
'comment' => '独立访客量(UV)'
|
||||
])
|
||||
->addColumn('updated_at', 'timestamp', [
|
||||
'default' => 'CURRENT_TIMESTAMP',
|
||||
'update' => 'CURRENT_TIMESTAMP',
|
||||
'comment' => '更新时间'
|
||||
])
|
||||
->addColumn('cs_md5', 'string', [
|
||||
'default' => '',
|
||||
'null' => false,
|
||||
'comment' => 'md5(cs_content_type+cs_content_id+cs_stat_date+cs_stat_period'
|
||||
])
|
||||
// 添加索引
|
||||
->addIndex('cs_content_type', ['name' => 'cs_content_type'])
|
||||
->addIndex('cs_content_id', ['name' => 'cs_content_id'])
|
||||
->addIndex('cs_stat_date', ['name' => 'cs_stat_date'])
|
||||
->addIndex('cs_stat_period', ['name' => 'cs_stat_period'])
|
||||
->addIndex(['cs_md5'], [
|
||||
'unique' => true,
|
||||
'name' => 'unique_cs_md5'
|
||||
])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class AddNewColumnToVideoInfo extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('video_info');
|
||||
|
||||
// 添加 "影院售票总额" 字段
|
||||
$table->addColumn('v_ticket_sales', 'decimal', [
|
||||
'precision' => 12, // 最大 9999999999.99
|
||||
'scale' => 2, // 保留两位小数
|
||||
'default' => 0.00, // 默认值 0.00
|
||||
'comment' => '影院售票总额(单位:亿元)'
|
||||
])->update();
|
||||
}
|
||||
}
|
||||
48
code/database/migrations/20250215153113_seo_html.php
Normal file
48
code/database/migrations/20250215153113_seo_html.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class SeoHtml extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 video_info 表
|
||||
$table = $this->table('seo_html', [
|
||||
'id' => 'sh_id' // 这里指定 v_id 作为自增主键
|
||||
]);
|
||||
$table->addColumn('sh_title', 'string', ['limit' => 255,'null' => false,'comment' => 'title']);
|
||||
$table->addColumn('sh_keywords', 'string', ['limit' => 255,'null' => false,'comment' => 'keywords']);
|
||||
$table->addColumn('sh_description', 'text', ['comment' => '简介']);
|
||||
$table->addColumn('sh_body', 'text', ['comment' => '内容']);
|
||||
$table->addColumn('sh_click', 'integer', ['default'=>0,'comment' => '点击数']);
|
||||
$table->addColumn('sh_html_path', 'string', ['limit' => 255, 'null' => true,'comment' => 'HTML源文件路径']);
|
||||
$table->addColumn('update_time', 'datetime', ['null' => true, 'comment' => '更新时间']);
|
||||
$table->addColumn('create_time', 'datetime', ['null' => true, 'comment' => '创建时间']);
|
||||
$table->addIndex('sh_html_path');
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class CreateXiaoShuoXiangQingSeo extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 video_info 表
|
||||
$table = $this->table('novel_info_seo', [
|
||||
'id' => 'nis_id' // 这里指定 v_id 作为自增主键
|
||||
]);
|
||||
$table->addColumn('nis_name', 'string', ['limit' => 255,'null' => false,'comment' => '名称']);
|
||||
|
||||
$table->addColumn('nis_jie_shao', 'text', ['comment' => '介绍']);
|
||||
|
||||
$table->addColumn('xsxq_id', 'integer', ['comment' => '小说详情id']);
|
||||
|
||||
$table->addColumn('nis_status', 'boolean',array('limit' => 1,'default'=>0,'comment'=>'状态:0:正常,1:异常'));
|
||||
|
||||
$table->addColumn('nis_click', 'integer', ['default'=>0,'comment' => '点击数']);
|
||||
|
||||
$table->addColumn('nis_md5', 'string', ['limit' => 255,'comment' => 'md5:xsxq_id+nis_name']);
|
||||
|
||||
$table->addIndex('xsxq_id');
|
||||
$table->addIndex('nis_md5');
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class AddNewColumnToXiaoShuoZhangJie extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('xiao_shuo_zhang_jie');
|
||||
|
||||
// 添加 "章节索引" 字段
|
||||
$table->addColumn('xszj_sort', 'integer', [
|
||||
'default' => 1,
|
||||
'comment' => '章节索引'
|
||||
]);
|
||||
|
||||
// 修改字段 "xszj_ming_zi",使其不能为空
|
||||
$table->changeColumn('xszj_ming_zi', 'string', [
|
||||
'null' => false, // 设置字段为 NOT NULL
|
||||
'comment' => '章节名称'
|
||||
]);
|
||||
|
||||
// 添加 "xszj_source_code" 字段并设置为唯一
|
||||
// $table->addColumn('xszj_source_code', 'string', [
|
||||
// 'null' => false,
|
||||
// 'comment' => '来源代码'
|
||||
// ]);
|
||||
|
||||
// 为 "xszj_source_code" 添加唯一索引,确保其值唯一
|
||||
//$table->addIndex(['xszj_source_code'], ['unique' => true]);
|
||||
|
||||
$table->update();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class CreateVideoInfoSeo extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 video_info 表
|
||||
$table = $this->table('video_info_seo', [
|
||||
'id' => 'vis_id' // 这里指定 v_id 作为自增主键
|
||||
]);
|
||||
$table->addColumn('vis_name', 'string', ['limit' => 255,'null' => false,'comment' => '名称']);
|
||||
|
||||
$table->addColumn('vis_jie_shao', 'text', ['comment' => '介绍']);
|
||||
|
||||
$table->addColumn('v_id', 'integer', ['comment' => '详情id']);
|
||||
|
||||
$table->addColumn('vis_status', 'boolean',array('limit' => 1,'default'=>0,'comment'=>'状态:0:正常,1:异常'));
|
||||
|
||||
$table->addColumn('vis_click', 'integer', ['default'=>0,'comment' => '点击数']);
|
||||
|
||||
$table->addColumn('vis_md5', 'string', ['limit' => 255,'comment' => 'md5:v_id+vis_name']);
|
||||
|
||||
$table->addIndex('v_id');
|
||||
$table->addIndex('vis_md5');
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
|
||||
}
|
||||
}
|
||||
56
code/database/migrations/20250223165052_create_site.php
Normal file
56
code/database/migrations/20250223165052_create_site.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class CreateSite extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 创建 video_info 表
|
||||
$table = $this->table('site', [
|
||||
'id' => 'site_id' // 这里指定 v_id 作为自增主键
|
||||
]);
|
||||
$table->addColumn('site_name', 'string', ['limit' => 255,'null' => false,'comment' => '名称']);
|
||||
$table->addColumn('site_type', 'string', ['limit' => 255,'null' => false,'comment' => '站点类型:novel.video']);
|
||||
$table->addColumn('site_log_type', 'string', ['limit' => 255,'null' => false,'comment' => 'logo类型 1:图片,2:文字']);
|
||||
$table->addColumn('site_email', 'string', ['limit' => 255,'null' => false,'comment' => '邮箱']);
|
||||
$table->addColumn('site_telegram', 'string', ['limit' => 255,'null' => false,'comment' => 'Telegram']);
|
||||
$table->addColumn('site_domain', 'string', ['limit' => 255,'null' => false,'comment' => '域名']);
|
||||
$table->addColumn('site_share_domain', 'string', ['limit' => 255,'null' => false,'comment' => '分享域名']);
|
||||
$table->addColumn('site_version', 'string', ['limit' => 255,'null' => false,'comment' => '版本号']);
|
||||
$table->addColumn('site_fenlei_path', 'string', ['limit' => 255,'null' => true,'comment' => '分类路由目录']);
|
||||
$table->addColumn('site_xiangqing_path', 'string', ['limit' => 255,'null' => true,'comment' => '详情路由目录']);
|
||||
$table->addColumn('site_zhangjie_path', 'string', ['limit' => 255,'null' => true,'comment' => '章节路由目录']);
|
||||
$table->addColumn('site_rank_path', 'string', ['limit' => 255,'null' => true,'comment' => '排行榜路由目录']);
|
||||
$table->addColumn('site_tui_jian_path', 'string', ['limit' => 255,'null' => true,'comment' => '推荐路由目录']);
|
||||
$table->addColumn('site_seo_path', 'string', ['limit' => 255,'null' => true,'comment' => '详情seo词路由目录']);
|
||||
$table->addColumn('site_zdy_path', 'string', ['limit' => 255,'null' => true,'comment' => '自定义seo页面路由目录']);
|
||||
$table->addColumn('site_tongji', 'text', ['comment' => '统计']);
|
||||
$table->addColumn('site_status', 'boolean',array('limit' => 1,'default'=>0,'comment'=>'状态:0:正常,1:异常'));
|
||||
|
||||
// 创建表
|
||||
$table->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class AddCloumaToAllTableAddSite extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 需要添加 `site_id` 的表 gan_rao_ma guang_gao guang_gao_pei_zhi guang_gao_fen_zu plan_task seo_tdk_config system_config video_class visit_logs content_stats xiao_shuo_fen_lei
|
||||
$tables = ['gan_rao_ma', 'guang_gao', 'guang_gao_pei_zhi', 'guang_gao_fen_zu', 'plan_task', 'seo_tdk_config', 'system_config', 'video_class', 'visit_logs', 'content_stats', 'xiao_shuo_fen_lei']; // 这里填写你的表名
|
||||
|
||||
foreach ($tables as $table) {
|
||||
if ($this->hasTable($table)) {
|
||||
$tableObject = $this->table($table);
|
||||
|
||||
// 检查是否已经有 site_id 字段
|
||||
if (!$tableObject->hasColumn('site_id')) {
|
||||
$tableObject->addColumn('site_id', 'integer', [
|
||||
'default' => 1,
|
||||
'comment' => '站点ID'
|
||||
]);
|
||||
}
|
||||
|
||||
// 添加索引(避免重复添加索引)
|
||||
if (!$tableObject->hasIndex(['site_id'])) {
|
||||
$tableObject->addIndex(['site_id']);
|
||||
}
|
||||
|
||||
$tableObject->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class AddCloumnToXiaoShuoFenLei extends Migrator
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$Table = $this->table('xiao_shuo_fen_lei');
|
||||
if (!$Table->hasColumn('xsfl_sort')) {
|
||||
$Table->addColumn('xsfl_sort', 'integer', ['after' => 'site_id'])->setComment("排序")->save();
|
||||
}
|
||||
|
||||
$Table = $this->table('video_class');
|
||||
if (!$Table->hasColumn('vc_source_id')) {
|
||||
$Table->addColumn('vc_source_id', 'integer', ['after' => 'site_id'])->setComment("资源绑定真实id")->save();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$Table = $this->table('xiao_shuo_fen_lei');
|
||||
if ($Table->hasColumn('xsfl_sort')) {
|
||||
$Table->removeColumn('xsfl_sort')->save();
|
||||
}
|
||||
|
||||
$Table = $this->table('video_class');
|
||||
if ($Table->hasColumn('vc_source_id')) {
|
||||
$Table->removeColumn('vc_source_id')->save();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
297
code/database/schema/mysql-schema.dump
Normal file
297
code/database/schema/mysql-schema.dump
Normal file
@@ -0,0 +1,297 @@
|
||||
-- MySQL dump 10.13 Distrib 8.0.32, for Linux (x86_64)
|
||||
--
|
||||
-- Host: 127.0.0.1 Database: 8X
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 8.0.32
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `admin_user`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `admin_user`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `admin_user` (
|
||||
`au_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`au_status` tinyint DEFAULT '0',
|
||||
`au_name` varchar(255) DEFAULT NULL,
|
||||
`au_pwd` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
||||
`deleted_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`au_id`),
|
||||
UNIQUE KEY `au_name` (`au_name`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `cai_ji_pei_zhi`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `cai_ji_pei_zhi`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `cai_ji_pei_zhi` (
|
||||
`cjpz_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`cjpz_code` varchar(255) DEFAULT NULL,
|
||||
`cjpz_val` text,
|
||||
`cjpz_description` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`cjpz_id`),
|
||||
KEY `cjpz_code` (`cjpz_code`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Table structure for table `guang_gao`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `guang_gao`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `guang_gao` (
|
||||
`gg_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`ggfz_id` int DEFAULT NULL,
|
||||
`gg_lei_xing` tinyint DEFAULT NULL,
|
||||
`gg_tu_pian` varchar(500) DEFAULT NULL,
|
||||
`gg_wen_zi` varchar(500) DEFAULT NULL,
|
||||
`gg_tiao_zhuan_di_zhi` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`gg_id`),
|
||||
KEY `ggfz_id` (`ggfz_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `guang_gao_fen_zu`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `guang_gao_fen_zu`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `guang_gao_fen_zu` (
|
||||
`ggfz_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`ggfz_code` varchar(255) DEFAULT NULL,
|
||||
`ggfz_name` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`ggfz_id`),
|
||||
UNIQUE KEY `ggfz_code` (`ggfz_code`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `guang_gao_pei_zhi`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `guang_gao_pei_zhi`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `guang_gao_pei_zhi` (
|
||||
`ggpz_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`ggpz_code` varchar(255) DEFAULT NULL,
|
||||
`ggpz_val` text,
|
||||
`ggpz_description` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`ggpz_id`),
|
||||
KEY `ggpz_code` (`ggpz_code`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
||||
--
|
||||
-- Table structure for table `migrations`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `migrations`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `migrations` (
|
||||
`version` bigint NOT NULL,
|
||||
`migration_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`start_time` timestamp NULL DEFAULT NULL,
|
||||
`end_time` timestamp NULL DEFAULT NULL,
|
||||
`breakpoint` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`version`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
||||
--
|
||||
-- Table structure for table `plan_task`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `plan_task`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `plan_task` (
|
||||
`pt_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`pt_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '',
|
||||
`pt_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '',
|
||||
`pt_enable` tinyint unsigned NOT NULL DEFAULT '1',
|
||||
`pt_limit` int unsigned NOT NULL DEFAULT '0',
|
||||
`pt_last_exec` int unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`pt_id`) USING BTREE,
|
||||
KEY `pt_code` (`pt_code`) USING BTREE,
|
||||
KEY `pt_enable` (`pt_enable`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `re_sou`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `re_sou`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `re_sou` (
|
||||
`rs_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`rsfz_id` int DEFAULT NULL,
|
||||
`rs_ming_zi` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`rs_id`),
|
||||
UNIQUE KEY `rs_ming_zi` (`rs_ming_zi`),
|
||||
KEY `rsfz_id` (`rsfz_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `re_sou_fen_zu`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `re_sou_fen_zu`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `re_sou_fen_zu` (
|
||||
`rsfz_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`rsfz_ming_zi` varchar(255) DEFAULT NULL,
|
||||
`rsfz_pai_xu` tinyint DEFAULT '1',
|
||||
PRIMARY KEY (`rsfz_id`),
|
||||
UNIQUE KEY `rsfz_ming_zi` (`rsfz_ming_zi`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `system_config`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `system_config`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `system_config` (
|
||||
`sc_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`sc_code` varchar(255) DEFAULT NULL,
|
||||
`sc_val` text,
|
||||
`sc_description` text,
|
||||
PRIMARY KEY (`sc_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `xiao_shuo_fen_lei`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `xiao_shuo_fen_lei`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `xiao_shuo_fen_lei` (
|
||||
`xsfl_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`xsfl_source_id` varchar(255) DEFAULT NULL,
|
||||
`xsfl_source_code` varchar(255) DEFAULT NULL,
|
||||
`xsfl_name` varchar(500) DEFAULT NULL,
|
||||
PRIMARY KEY (`xsfl_id`),
|
||||
UNIQUE KEY `xsfl_source_code` (`xsfl_source_code`),
|
||||
KEY `xsfl_source_id` (`xsfl_source_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `xiao_shuo_xiang_qing`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `xiao_shuo_xiang_qing`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `xiao_shuo_xiang_qing` (
|
||||
`xsxq_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`xsxq_source_id` varchar(255) DEFAULT NULL,
|
||||
`xsxq_source_seo_id` varchar(255) DEFAULT NULL,
|
||||
`xsfl_id` int DEFAULT NULL,
|
||||
`xsxq_ming_zi` varchar(255) DEFAULT NULL,
|
||||
`xsxq_tui_jian` int unsigned DEFAULT '0',
|
||||
`xsxq_zuozhe` varchar(255) DEFAULT NULL,
|
||||
`xsxq_zhuang_tai` varchar(255) DEFAULT NULL,
|
||||
`xsxq_zi_shu` varchar(255) DEFAULT NULL,
|
||||
`xsxq_jie_shao` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
|
||||
`xsxq_feng_mian` json DEFAULT NULL,
|
||||
`xsxq_geng_xin_shi_jian` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
`xsxq_tag` json DEFAULT NULL,
|
||||
`xsxq_source_code` varchar(255) DEFAULT NULL,
|
||||
`xsxq_ren_qi` int unsigned DEFAULT '0',
|
||||
`xsxq_shou_cang` int unsigned DEFAULT '0',
|
||||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`xsxq_id`),
|
||||
UNIQUE KEY `xsxq_source_code` (`xsxq_source_code`),
|
||||
KEY `xsfl_id` (`xsfl_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `xiao_shuo_zhang_jie`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `xiao_shuo_zhang_jie`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `xiao_shuo_zhang_jie` (
|
||||
`xszj_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`xsxq_id` int DEFAULT NULL,
|
||||
`xszj_pai_xu` int DEFAULT NULL,
|
||||
`xszj_ming_zi` varchar(500) DEFAULT NULL,
|
||||
`xszj_nei_rong` longtext,
|
||||
`xszj_source_id` varchar(255) DEFAULT NULL,
|
||||
`xszj_source_code` varchar(255) DEFAULT NULL,
|
||||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`xszj_id`),
|
||||
UNIQUE KEY `xszj_source_code` (`xszj_source_code`),
|
||||
KEY `xsxq_id` (`xsxq_id`),
|
||||
KEY `xszj_pai_xu` (`xszj_pai_xu`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Table structure for table `zi_yuan_duan_dian`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `zi_yuan_duan_dian`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `zi_yuan_duan_dian` (
|
||||
`zydd_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`zydd_ming_zi` varchar(255) DEFAULT NULL,
|
||||
`zydd_code` varchar(255) DEFAULT NULL,
|
||||
`zydd_domain` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`zydd_id`),
|
||||
KEY `zydd_code` (`zydd_code`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2024-07-16 0:29:57
|
||||
20
code/database/seeders/AdminUserSeeder.php
Normal file
20
code/database/seeders/AdminUserSeeder.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
use app\admin\model\AdminUserModel;
|
||||
|
||||
class AdminUserSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
$AdminUserModel = AdminUserModel::where('au_name', 'admin')->find();
|
||||
|
||||
if (empty($AdminUserModel)) {
|
||||
AdminUserModel::insert([
|
||||
'au_name' => 'admin',
|
||||
'au_pwd' => md5('qq123123'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
104
code/database/seeders/GuangGaoSeeder.php
Normal file
104
code/database/seeders/GuangGaoSeeder.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
use app\admin\model\AdminUserModel;
|
||||
use app\admin\model\GuangGaoFenZuModel;
|
||||
use app\admin\model\GuangGaoModel;
|
||||
use app\admin\model\PlanTaskModel;
|
||||
use Faker\Factory;
|
||||
|
||||
class GuangGaoSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
$arrData = [
|
||||
[
|
||||
'ggfz_code' => 'TAN_CHUANG_GUANG_GAO',
|
||||
'ggfz_name' => '全站弹窗广告',
|
||||
'ggfz_img_size' => '167-112'
|
||||
],
|
||||
[
|
||||
'ggfz_code' => 'PIAO_FU_GUANG_GAO',
|
||||
'ggfz_name' => '全站漂浮广告',
|
||||
'ggfz_img_size' => '60-60'
|
||||
],
|
||||
[
|
||||
'ggfz_code' => 'PIAO_FU_LEFT_GUANG_GAO',
|
||||
'ggfz_name' => '全站漂浮广告-左边',
|
||||
'ggfz_img_size' => '60-60'
|
||||
],
|
||||
[
|
||||
'ggfz_code' => 'PIAO_FU_RIGHT_GUANG_GAO',
|
||||
'ggfz_name' => '全站漂浮广告-右边',
|
||||
'ggfz_img_size' => '60-60'
|
||||
],
|
||||
|
||||
[
|
||||
'ggfz_code' => 'TOP_LUN_BO_GUANG_GAO',
|
||||
'ggfz_name' => '全站顶部轮播广告',
|
||||
'ggfz_img_size' => '375-50'
|
||||
],
|
||||
|
||||
[
|
||||
'ggfz_code' => 'ZHONG_YANG_TU_PIAN_GUANG_GAO',
|
||||
'ggfz_name' => '全站中央宫格图片广告',
|
||||
'ggfz_img_size' => '60-60'
|
||||
],
|
||||
|
||||
[
|
||||
'ggfz_code' => 'ZHONG_YANG_WEN_ZI_GUANG_GAO',
|
||||
'ggfz_name' => '全站中央文字广告',
|
||||
'ggfz_img_size' => '375-50'
|
||||
],
|
||||
|
||||
|
||||
[
|
||||
'ggfz_code' => 'XIAO_SHUO_LUN_BO_GUANG_GAO',
|
||||
'ggfz_name' => '小说详情轮播轮播广告',
|
||||
'ggfz_img_size' => '375-50'
|
||||
],
|
||||
|
||||
[
|
||||
'ggfz_code' => 'BOTTOM_DI_PIAO_GUANG_GAO',
|
||||
'ggfz_name' => '全站底飘广告',
|
||||
'ggfz_img_size' => '60-60'
|
||||
],
|
||||
[
|
||||
'ggfz_code' => 'YOUQING_LIANJIE_GUANG_GAO',
|
||||
'ggfz_name' => '友情链接',
|
||||
'ggfz_img_size' => '60-60'
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$GuangGaoFenZuModel = GuangGaoFenZuModel::where('ggfz_code', $arrDataOne['ggfz_code'])->find();
|
||||
|
||||
if (empty($GuangGaoFenZuModel)) {
|
||||
$arrInsert = [
|
||||
'ggfz_code' => $arrDataOne['ggfz_code'],
|
||||
'ggfz_name' => $arrDataOne['ggfz_name'],
|
||||
];
|
||||
GuangGaoFenZuModel::insert($arrInsert);
|
||||
$GuangGaoFenZuModel = GuangGaoFenZuModel::where('ggfz_code', $arrDataOne['ggfz_code'])->find();
|
||||
}
|
||||
$faker = Factory::create('zh_CN');
|
||||
for ($i = 0; $i < 2; $i++) {
|
||||
$intIndex = $i+1;
|
||||
$GuangGaoModelModel = GuangGaoModel::where('gg_wen_zi','广告招商'.$intIndex)->where('ggfz_id', $GuangGaoFenZuModel->ggfz_id)->find();
|
||||
if (empty($GuangGaoModelModel)) {
|
||||
GuangGaoModel::insert([
|
||||
'ggfz_id' => $GuangGaoFenZuModel->ggfz_id,
|
||||
'gg_lei_xing' => random_int(0, 1),
|
||||
'gg_tu_pian' => config('app.app_host').'/assets/images/zxtv/'.$arrDataOne['ggfz_img_size'].'.png',
|
||||
'gg_wen_zi' => '广告招商'.$intIndex,
|
||||
'gg_tiao_zhuan_di_zhi' => $faker->url(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
GuangGaoModel::flushCache();
|
||||
}
|
||||
}
|
||||
82
code/database/seeders/NovelClassSeeder.php
Normal file
82
code/database/seeders/NovelClassSeeder.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
use app\admin\model\XiaoShuoFenLeiModel;
|
||||
use think\facade\Db;
|
||||
class NovelClassSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
$arrData = [];
|
||||
if (config('app.default_app') == 'novelzw') {
|
||||
|
||||
$arrData = [
|
||||
|
||||
[
|
||||
'xsfl_name' => '玄幻修真',
|
||||
'xsfl_source_id' => '1',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_1',
|
||||
'xsfl_sort' => 1,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '重生穿越',
|
||||
'xsfl_source_id' => '2',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_2',
|
||||
'xsfl_sort' => 2,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '都市小说',
|
||||
'xsfl_source_id' => '3',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_3',
|
||||
'xsfl_sort' => 3,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '军史小说',
|
||||
'xsfl_source_id' => '4',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_4',
|
||||
'xsfl_sort' => 4,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '网游小说',
|
||||
'xsfl_source_id' => '5',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_5',
|
||||
'xsfl_sort' => 5,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '科幻小说',
|
||||
'xsfl_source_id' => '6',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_6',
|
||||
'xsfl_sort' => 6,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '灵异小说',
|
||||
'xsfl_source_id' => '7',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_7',
|
||||
'xsfl_sort' => 7,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '言情小说',
|
||||
'xsfl_source_id' => '8',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_8',
|
||||
'xsfl_sort' => 8,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '其他小说',
|
||||
'xsfl_source_id' => '9',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_9',
|
||||
'xsfl_sort' => 9,
|
||||
],
|
||||
];
|
||||
|
||||
Db::execute('TRUNCATE TABLE xiao_shuo_fen_lei'); // 清空数据并重置自增
|
||||
}
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$XiaoShuoFenLeiModel = XiaoShuoFenLeiModel::where('xsfl_name', $arrDataOne['xsfl_name'])->find();
|
||||
if (empty($XiaoShuoFenLeiModel)) {
|
||||
XiaoShuoFenLeiModel::insert($arrDataOne);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
127
code/database/seeders/PlanTaskSeeder.php
Normal file
127
code/database/seeders/PlanTaskSeeder.php
Normal file
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
use app\admin\model\AdminUserModel;
|
||||
use app\admin\model\PlanTaskModel;
|
||||
|
||||
class PlanTaskSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
// 公共任务
|
||||
$arrData = [
|
||||
|
||||
[
|
||||
'pt_name' => '统计汇总',
|
||||
'pt_code' => 'PULL_TONJI_HUIZON',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600,
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($arrData as $arrPlanTask) {
|
||||
$PlanTaskModel = PlanTaskModel::where('pt_code', $arrPlanTask['pt_code'])->find();
|
||||
|
||||
if (empty($PlanTaskModel)) {
|
||||
PlanTaskModel::insert($arrPlanTask);
|
||||
}
|
||||
}
|
||||
|
||||
if (config('app.default_app_type') == 'video') {
|
||||
self::addVideoTypePlanTask();
|
||||
}
|
||||
if (config('app.default_app_type') == 'novel') {
|
||||
self::addNovelTypePlanTask();
|
||||
}
|
||||
}
|
||||
|
||||
// 添加视频类型站点 爬虫任务
|
||||
static public function addVideoTypePlanTask()
|
||||
{
|
||||
$arrData = [
|
||||
[
|
||||
'pt_name' => '采集大地电影',
|
||||
'pt_code' => 'PULL_DADI_DIANYHHING',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600,
|
||||
],
|
||||
[
|
||||
'pt_name' => '采集黑木耳资源',
|
||||
'pt_code' => 'PULL_HEI_MUER',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 12 * 3600,
|
||||
],
|
||||
[
|
||||
'pt_name' => '采集优质资源',
|
||||
'pt_code' => 'PULL_YOUZHI',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 12 * 3600,
|
||||
]
|
||||
];
|
||||
foreach ($arrData as $arrPlanTask) {
|
||||
$NovelOnePlanTaskModel = PlanTaskModel::where('pt_code', $arrPlanTask['pt_code'])->find();
|
||||
|
||||
if (empty($NovelOnePlanTaskModel)) {
|
||||
PlanTaskModel::insert($arrPlanTask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 添加小说类型站点 爬虫任务
|
||||
static public function addNovelTypePlanTask()
|
||||
{
|
||||
$arrDataNovel = [
|
||||
[
|
||||
'pt_name' => '123采集小说',
|
||||
'pt_code' => 'PULL_XIAOSHUO',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600,
|
||||
],
|
||||
[
|
||||
'pt_name' => '采集天籁小说',
|
||||
'pt_code' => 'PULL_TIANLAIXIAOSHUO',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600,
|
||||
],
|
||||
[
|
||||
'pt_name' => '采集biquxs小说',
|
||||
'pt_code' => 'PULL_BIQUXSXIAOSHUO',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600,
|
||||
],
|
||||
[
|
||||
'pt_name' => '采集5ccc小说',
|
||||
'pt_code' => 'PULL_5CCCXIAOSHUO',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600,
|
||||
],
|
||||
[
|
||||
'pt_name' => '采集630zw.org小说',
|
||||
'pt_code' => 'PULL_630ZWXIAOSHUO',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600,
|
||||
],
|
||||
[
|
||||
'pt_name' => '采集鬼吹灯小说', // 采集鬼吹灯-九域凡仙小说
|
||||
'pt_code' => 'PULL_GUICHUIDENG_XIAOSHUO',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600 * 3,
|
||||
],
|
||||
[
|
||||
'pt_name' => '采集文学馆小说', // 采集文学馆-都市极品医神
|
||||
'pt_code' => 'PULL_WENXUEGUAN_XIAOSHUO',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600 * 3,
|
||||
],
|
||||
|
||||
];
|
||||
foreach ($arrDataNovel as $arrPlanTask) {
|
||||
$NovelOnePlanTaskModel = PlanTaskModel::where('pt_code', $arrPlanTask['pt_code'])->find();
|
||||
|
||||
if (empty($NovelOnePlanTaskModel)) {
|
||||
PlanTaskModel::insert($arrPlanTask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
19
code/database/seeders/SeedManager.php
Normal file
19
code/database/seeders/SeedManager.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
class SeedManager
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
AdminUserSeeder::handle();
|
||||
PlanTaskSeeder::handle();
|
||||
SystemConfigSeeder::handle();
|
||||
GuangGaoSeeder::handle();
|
||||
ZiYuanDuanDianSeeder::handle();
|
||||
VideoSeoSeeder::handle();
|
||||
// SeoTdkConfigSeeder::handle();
|
||||
VideoInfoSeeder::handle();
|
||||
SiteSeeder::handle();
|
||||
}
|
||||
}
|
||||
189
code/database/seeders/SeoTdkConfigSeeder.php
Normal file
189
code/database/seeders/SeoTdkConfigSeeder.php
Normal file
@@ -0,0 +1,189 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
|
||||
use app\admin\model\SeoTdkConfigModel;
|
||||
|
||||
class SeoTdkConfigSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
if (config('app.default_app_type') == 'novel') {
|
||||
|
||||
$arrData = [
|
||||
|
||||
[
|
||||
'stc_code' => 'index',
|
||||
'stc_name' => '首页',
|
||||
'stc_title' => '{{{site_name}}}_书友最值得收藏的网络小说阅读网',
|
||||
'stc_keywords' => '{{{site_name}}}',
|
||||
'stc_description' => '{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'type',
|
||||
'stc_name' => '分类首页',
|
||||
'stc_title' => '{{{type}}}_{{{site_name}}}_书友最值得收藏的网络小说阅读网',
|
||||
'stc_keywords' => '{{{type}}},{{{site_name}}}',
|
||||
'stc_description' => '{{{type}}},{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'type_page',
|
||||
'stc_name' => '分类分页',
|
||||
'stc_title' => '{{{type}}}_{{{site_name}}}_书友最值得收藏的网络小说阅读网',
|
||||
'stc_keywords' => '{{{type}}},{{{site_name}}}',
|
||||
'stc_description' => '{{{type}}},{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'rank',
|
||||
'stc_name' => '排行榜',
|
||||
'stc_title' => '最新热门{{{type}}}小说排行榜-{{{site_name}}}',
|
||||
'stc_keywords' => '最新热门{{{type}}}小说排行榜-{{{site_name}}}',
|
||||
'stc_description' => '最新热门{{{type}}}小说排行榜-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'shujia',
|
||||
'stc_name' => '书架',
|
||||
'stc_title' => '我的书架,{{{site_name}}}',
|
||||
'stc_keywords' => '我的书架,{{{site_name}}}',
|
||||
'stc_description' => '我的书架,{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'detail',
|
||||
'stc_name' => '详情',
|
||||
'stc_title' => '{{{title}}}最新章节_{{{title}}}{{{zuozhe}}}_{{{title}}}小说免费全文阅读_{{{site_name}}}',
|
||||
'stc_keywords' => '{{{title}}},{{{zuozhe}}},{{{site_name}}}',
|
||||
'stc_description' => '{{{description}}};{{{title}}},{{{zuozhe}}},{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'zhangjie',
|
||||
'stc_name' => '章节',
|
||||
'stc_title' => '{{{zhangjie_title}}}最新章节,第{{{page}}}页_{{{novel_title}}}免费全文阅读_{{{site_name}}}',
|
||||
'stc_keywords' => '{{{zhangjie_title}}},{{{novel_title}}},{{{site_name}}}',
|
||||
'stc_description' => '{{{zhangjie_title}}}第{{{page}}}页_{{{novel_title}}}_{{{zuozhe}}}_{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'search',
|
||||
'stc_name' => '搜索页面',
|
||||
'stc_title' => '搜索结果{{{search_name}}}{{{site_name}}}',
|
||||
'stc_keywords' => '搜索结果{{{search_name}}}{{{site_name}}}',
|
||||
'stc_description' => '搜索结果{{{search_name}}}{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
//Db::execute('TRUNCATE TABLE xiao_shuo_fen_lei'); // 清空数据并重置自增
|
||||
}else {
|
||||
// 视频
|
||||
$arrData = [
|
||||
|
||||
[
|
||||
'stc_code' => 'index',
|
||||
'stc_name' => '首页',
|
||||
'stc_title' => '{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '{{{site_name}}}资源网在线观看免费官网,2024{{{site_name}}}影院免费高清电视剧大全,{{{site_name}}}影院大全在线观看,短视频,搞笑视频,视频分享,免费视频,在线视频,预告片-{{{site_name}}}',
|
||||
'stc_description' => '{{{site_name}}}资源网在线观看免费官网(www.{{{site_domain}}})2024{{{site_name}}}影院免费高清电视剧大全,{{{site_name}}}电影资源第二页,最新高清电影电视剧、伦理片、综艺、美剧、韩剧、英剧、日剧等{{{site_name}}}影视中文在线观看!提供2024最新{{{video_type}}}电视剧免费观看-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'video_type',
|
||||
'stc_name' => '分类首页',
|
||||
'stc_title' => '最新{{{video_type}}}-推荐{{{video_type}}}-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '最新{{{video_type}}}-推荐{{{video_type}}}-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_description' => '最新{{{video_type}}}-推荐{{{video_type}}}-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'video_type_page',
|
||||
'stc_name' => '分类分页',
|
||||
'stc_title' => '最新{{{video_type}}}-推荐-第{{{type_page}}}页-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '最新{{{video_type}}}-推荐-第{{{type_page}}}页-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_description' => '最新{{{video_type}}}-推荐-第{{{type_page}}}页 - {{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'rank',
|
||||
'stc_name' => '排行榜',
|
||||
'stc_title' => '最新{{{video_type}}}-推荐-第{{{type_page}}}页-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '最新{{{video_type}}}-推荐-第{{{type_page}}}页-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_description' => '最新{{{video_type}}}-推荐-第{{{type_page}}}页 - {{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'shujia',
|
||||
'stc_name' => '书架',
|
||||
'stc_title' => '我的书架',
|
||||
'stc_keywords' => '我的书架',
|
||||
'stc_description' => '我的书架',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'video_detail',
|
||||
'stc_name' => '详情',
|
||||
'stc_title' => '《{{{video_title}}}》 _{{{video_type}}}{{{video_title}}} _{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '{{{video_title}}}免费观看以及免费在线下载-{{{site_name}}}',
|
||||
'stc_description' => '【{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}】为你提供好看的{{{video_title}}} {{{video_description}}}-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'video_play',
|
||||
'stc_name' => '播放/章节',
|
||||
'stc_title' => '正在播放《{{{video_title}}}》{{{video_play_sort}}}原声版高清{{{video_title}}}-{{{video_type}}}{{{video_title}}}-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '正在播放《{{{video_title}}}》{{{video_play_sort}}}原声版高清{{{video_title}}}-{{{video_type}}}{{{video_title}}}-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_description' => 'content="【{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}】为你提供好看的|{{{video_title}}}{{{video_play_sort}}},{{{video_type}}},|{{{video_title}}}剧情: {{{video_title}}}-{{{site_name}}}"',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'search',
|
||||
'stc_name' => '搜索页面',
|
||||
'stc_title' => '搜索结果{{{search_name}}}------------- - {{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '搜索结果{{{search_name}}}------------- - {{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_description' => '搜索结果{{{search_name}}}------------- - {{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'gbook',
|
||||
'stc_name' => '反馈页面',
|
||||
'stc_title' => '反馈页面{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '反馈页面{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_description' => '反馈页面{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$SeoTdkConfigModel = SeoTdkConfigModel::where('stc_code', $arrDataOne['stc_code'])->find();
|
||||
|
||||
if (empty($SeoTdkConfigModel)) {
|
||||
SeoTdkConfigModel::insert($arrDataOne);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
467
code/database/seeders/SiteSeeder.php
Normal file
467
code/database/seeders/SiteSeeder.php
Normal file
@@ -0,0 +1,467 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
use app\admin\model\SiteModel;
|
||||
use app\admin\model\XiaoShuoFenLeiModel;
|
||||
use app\admin\model\VideoClassModel;
|
||||
use app\admin\model\SeoTdkConfigModel;
|
||||
use app\admin\model\PlanTaskModel;
|
||||
use think\facade\Db;
|
||||
|
||||
class SiteSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
|
||||
if (config('app.default_app_type') == 'novel') {
|
||||
$arrData = [
|
||||
['site_name' => '默认站点', 'site_type' => 'novel', 'site_fenlei_path' => 'fl', 'site_xiangqing_path' => 'xq', 'site_rank_path' => 'phb', 'site_tui_jian_path' => 'tj','site_seo_path'=> 'kan' , 'site_zdy_path' => 'zdy', 'site_zhangjie_path' => 'zj'],
|
||||
['site_name' => '站点2', 'site_type' => 'novel', 'site_fenlei_path' => 'fenlei', 'site_xiangqing_path' => 'xiaoshuo', 'site_rank_path' => 'paihanbang', 'site_tui_jian_path' => 'tuijian','site_seo_path'=> 'show' , 'site_zdy_path' => 'zidingyi', 'site_zhangjie_path' => 'zj'],
|
||||
['site_name' => '站点3', 'site_type' => 'novel', 'site_fenlei_path' => 'class', 'site_xiangqing_path' => 'novel', 'site_rank_path' => 'rank', 'site_tui_jian_path' => 'recommend','site_seo_path'=> 'yuedu' , 'site_zdy_path' => 'like', 'site_zhangjie_path' => 'zj'],
|
||||
['site_name' => '站点4', 'site_type' => 'novel', 'site_fenlei_path' => 'type', 'site_xiangqing_path' => 'info', 'site_rank_path' => 'sort', 'site_tui_jian_path' => 'nice','site_seo_path'=> 'book' , 'site_zdy_path' => 'diy', 'site_zhangjie_path' => 'zj'],
|
||||
['site_name' => '站点5', 'site_type' => 'novel', 'site_fenlei_path' => 'fenlei', 'site_xiangqing_path' => 'xiangqing', 'site_rank_path' => 'pb', 'site_tui_jian_path' => 'good','site_seo_path'=> 'see' , 'site_zdy_path' => 'obj', 'site_zhangjie_path' => 'zj'],
|
||||
['site_name' => '站点5', 'site_type' => 'novel', 'site_fenlei_path' => '分类首页', 'site_xiangqing_path' => '小说', 'site_rank_path' => '排行榜', 'site_tui_jian_path' => '推荐','site_seo_path'=> '相关' , 'site_zdy_path' => '深度', 'site_zhangjie_path' => 'zj'],
|
||||
];
|
||||
}else{
|
||||
$arrData = [
|
||||
['site_name' => '默认站点', 'site_type' => 'video', 'site_fenlei_path' => 'vodtype', 'site_xiangqing_path' => 'voddetail', 'site_rank_path' => 'vodshow', 'site_tui_jian_path' => 'vodsearch','site_seo_path'=> 'kan' , 'site_zdy_path' => 'zdy', 'site_zhangjie_path' => 'vodplay'],
|
||||
['site_name' => '站点2', 'site_type' => 'video', 'site_fenlei_path' => 'type', 'site_xiangqing_path' => 'detail', 'site_rank_path' => 'page', 'site_tui_jian_path' => 'search','site_seo_path'=> 'show' , 'site_zdy_path' => 'like', 'site_zhangjie_path' => 'play'],
|
||||
['site_name' => '站点3', 'site_type' => 'video', 'site_fenlei_path' => 'class', 'site_xiangqing_path' => 'video', 'site_rank_path' => 'classpage', 'site_tui_jian_path' => 'sousuo','site_seo_path'=> 'baidu' , 'site_zdy_path' => 'diy', 'site_zhangjie_path' => 'm3u8'],
|
||||
['site_name' => '站点4', 'site_type' => 'video', 'site_fenlei_path' => 'type', 'site_xiangqing_path' => 'shipin', 'site_rank_path' => 'fenleipage', 'site_tui_jian_path' => 'sou','site_seo_path'=> 'liu' , 'site_zdy_path' => 'obj', 'site_zhangjie_path' => 'bofang'],
|
||||
['site_name' => '站点5', 'site_type' => 'video', 'site_fenlei_path' => 'leixin', 'site_xiangqing_path' => '视频', 'site_rank_path' => '分类', 'site_tui_jian_path' => '搜索','site_seo_path'=> 'v' , 'site_zdy_path' => '深度', 'site_zhangjie_path' => '播放'],
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$arrDataOne['site_log_type'] = '2';
|
||||
$arrDataOne['site_email'] = 'site@gmail.com';
|
||||
$arrDataOne['site_telegram'] = '@168';
|
||||
$arrDataOne['site_domain'] = 'https://domain.com';
|
||||
$arrDataOne['site_share_domain'] = 'https://domain.com';
|
||||
$arrDataOne['site_version'] = '001';
|
||||
|
||||
$SiteModel = SiteModel::addSite($arrDataOne);
|
||||
if (!empty($SiteModel)) {
|
||||
try {
|
||||
$intSiteId = $SiteModel->site_id ;
|
||||
|
||||
if($intSiteId == config('app.default_app_id')){
|
||||
self::addGenSiteMapPlanTask($intSiteId);
|
||||
}
|
||||
|
||||
if($SiteModel->site_type == 'novel'){
|
||||
self::addXiaoShuoFenLei($intSiteId);
|
||||
self::addXiaoShuoSeoTdk($intSiteId);
|
||||
}else{
|
||||
self::addShiPinFenLei($intSiteId);
|
||||
self::addShiPinSeoTdk($intSiteId);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
echo "Error: " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 小说分类添加
|
||||
static public function addXiaoShuoFenLei($intSiteId)
|
||||
{
|
||||
|
||||
$arrData = [];
|
||||
if (config('app.default_app') == 'novelzw') {
|
||||
|
||||
$arrData = [
|
||||
[
|
||||
'xsfl_name' => '玄幻修真',
|
||||
'xsfl_source_id' => '1',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_1_'.$intSiteId,
|
||||
'xsfl_sort' => 1,
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '重生穿越',
|
||||
'xsfl_source_id' => '2',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_2_'.$intSiteId,
|
||||
'xsfl_sort' => 2,
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '都市小说',
|
||||
'xsfl_source_id' => '3',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_3_'.$intSiteId,
|
||||
'xsfl_sort' => 3,
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '军史小说',
|
||||
'xsfl_source_id' => '4',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_4_'.$intSiteId,
|
||||
'xsfl_sort' => 4,
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '网游小说',
|
||||
'xsfl_source_id' => '5',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_5_'.$intSiteId,
|
||||
'xsfl_sort' => 5,
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '科幻小说',
|
||||
'xsfl_source_id' => '6',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_6_'.$intSiteId,
|
||||
'xsfl_sort' => 6,
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '灵异小说',
|
||||
'xsfl_source_id' => '7',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_7_'.$intSiteId,
|
||||
'xsfl_sort' => 7,
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '言情小说',
|
||||
'xsfl_source_id' => '8',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_8_'.$intSiteId,
|
||||
'xsfl_sort' => 8,
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'xsfl_name' => '其他小说',
|
||||
'xsfl_source_id' => '9',
|
||||
'xsfl_source_code' => 'ZW630_FEN_LEI_ID_9_'.$intSiteId,
|
||||
'xsfl_sort' => 9,
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$XiaoShuoFenLeiModel = XiaoShuoFenLeiModel::where('xsfl_name', $arrDataOne['xsfl_name'])->where('site_id', $intSiteId)->find();
|
||||
if (empty($XiaoShuoFenLeiModel)) {
|
||||
XiaoShuoFenLeiModel::insert($arrDataOne);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 小说SeoTdk添加
|
||||
static public function addXiaoShuoSeoTdk($intSiteId)
|
||||
{
|
||||
|
||||
$arrData = [];
|
||||
if (config('app.default_app') == 'novelzw') {
|
||||
|
||||
$arrData = [
|
||||
|
||||
[
|
||||
'stc_code' => 'index',
|
||||
'stc_name' => '首页',
|
||||
'stc_title' => '{{{site_name}}}_书友最值得收藏的网络小说阅读网',
|
||||
'stc_keywords' => '{{{site_name}}}',
|
||||
'stc_description' => '{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'stc_code' => 'type',
|
||||
'stc_name' => '分类首页',
|
||||
'stc_title' => '{{{type}}}_{{{site_name}}}_书友最值得收藏的网络小说阅读网',
|
||||
'stc_keywords' => '{{{type}}},{{{site_name}}}',
|
||||
'stc_description' => '{{{type}}},{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'stc_code' => 'type_page',
|
||||
'stc_name' => '分类分页',
|
||||
'stc_title' => '{{{type}}}_{{{site_name}}}_书友最值得收藏的网络小说阅读网',
|
||||
'stc_keywords' => '{{{type}}},{{{site_name}}}',
|
||||
'stc_description' => '{{{type}}},{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'stc_code' => 'rank',
|
||||
'stc_name' => '排行榜',
|
||||
'stc_title' => '最新热门{{{type}}}小说排行榜-{{{site_name}}}',
|
||||
'stc_keywords' => '最新热门{{{type}}}小说排行榜-{{{site_name}}}',
|
||||
'stc_description' => '最新热门{{{type}}}小说排行榜-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'stc_code' => 'shujia',
|
||||
'stc_name' => '书架',
|
||||
'stc_title' => '我的书架,{{{site_name}}}',
|
||||
'stc_keywords' => '我的书架,{{{site_name}}}',
|
||||
'stc_description' => '我的书架,{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'stc_code' => 'detail',
|
||||
'stc_name' => '详情',
|
||||
'stc_title' => '{{{title}}}最新章节_{{{title}}}{{{zuozhe}}}_{{{title}}}小说免费全文阅读_{{{site_name}}}',
|
||||
'stc_keywords' => '{{{title}}},{{{zuozhe}}},{{{site_name}}}',
|
||||
'stc_description' => '{{{description}}};{{{title}}},{{{zuozhe}}},{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'stc_code' => 'zhangjie',
|
||||
'stc_name' => '章节',
|
||||
'stc_title' => '{{{zhangjie_title}}}最新章节,第{{{page}}}页_{{{novel_title}}}免费全文阅读_{{{site_name}}}',
|
||||
'stc_keywords' => '{{{zhangjie_title}}},{{{novel_title}}},{{{site_name}}}',
|
||||
'stc_description' => '{{{zhangjie_title}}}第{{{page}}}页_{{{novel_title}}}_{{{zuozhe}}}_{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
[
|
||||
'stc_code' => 'search',
|
||||
'stc_name' => '搜索页面',
|
||||
'stc_title' => '搜索结果{{{search_name}}}{{{site_name}}}',
|
||||
'stc_keywords' => '搜索结果{{{search_name}}}{{{site_name}}}',
|
||||
'stc_description' => '搜索结果{{{search_name}}}{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
'site_id' => $intSiteId,
|
||||
],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$SeoTdkConfigModel = SeoTdkConfigModel::where('stc_code', $arrDataOne['stc_code'])->where('site_id', $intSiteId)->find();
|
||||
if (empty($SeoTdkConfigModel)) {
|
||||
SeoTdkConfigModel::insert($arrDataOne);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 视频分类添加
|
||||
static public function addShiPinFenLei($intSiteId)
|
||||
{
|
||||
|
||||
$arrData = [];
|
||||
if (config('app.default_app') == 'dianying') {
|
||||
|
||||
$arrData = [
|
||||
|
||||
[
|
||||
'vc_name' => '电影',
|
||||
'vc_sort' => '1',
|
||||
'vc_source_id' => 1,
|
||||
'site_id' => $intSiteId,
|
||||
'vc_nicheng' => 'dy'
|
||||
],
|
||||
[
|
||||
'vc_name' => '电视剧',
|
||||
'vc_sort' => '2',
|
||||
'vc_source_id' => 2,
|
||||
'site_id' => $intSiteId,
|
||||
'vc_nicheng' => 'dsj'
|
||||
],
|
||||
[
|
||||
'vc_name' => '综艺',
|
||||
'vc_sort' => '3',
|
||||
'vc_source_id' => 3,
|
||||
'site_id' => $intSiteId,
|
||||
'vc_nicheng' => 'zy'
|
||||
],
|
||||
[
|
||||
'vc_name' => '动漫',
|
||||
'vc_sort' => '4',
|
||||
'vc_source_id' => 4,
|
||||
'site_id' => $intSiteId,
|
||||
'vc_nicheng' => 'dm'
|
||||
],
|
||||
[
|
||||
'vc_name' => '短剧',
|
||||
'vc_sort' => '5',
|
||||
'vc_source_id' => 5,
|
||||
'site_id' => $intSiteId,
|
||||
'vc_nicheng' => 'duanju'
|
||||
],
|
||||
[
|
||||
'vc_name' => '体育',
|
||||
'vc_sort' => '6',
|
||||
'vc_source_id' => 6,
|
||||
'site_id' => $intSiteId,
|
||||
'vc_nicheng' => 'tiyu'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$VideoClassModel = VideoClassModel::where('vc_name', $arrDataOne['vc_name'])->where('site_id', $intSiteId)->find();
|
||||
if (empty($VideoClassModel)) {
|
||||
VideoClassModel::insert($arrDataOne);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 视频SeoTdk
|
||||
static public function addShiPinSeoTdk($intSiteId)
|
||||
{
|
||||
|
||||
$arrData = [];
|
||||
if (config('app.default_app') == 'dianying') {
|
||||
|
||||
$arrData = [
|
||||
|
||||
[
|
||||
'stc_code' => 'index',
|
||||
'stc_name' => '首页',
|
||||
'stc_title' => '{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '{{{site_name}}}资源网在线观看免费官网,2024{{{site_name}}}影院免费高清电视剧大全,{{{site_name}}}影院大全在线观看,短视频,搞笑视频,视频分享,免费视频,在线视频,预告片-{{{site_name}}}',
|
||||
'stc_description' => '{{{site_name}}}资源网在线观看免费官网(www.{{{site_domain}}})2024{{{site_name}}}影院免费高清电视剧大全,{{{site_name}}}电影资源第二页,最新高清电影电视剧、伦理片、综艺、美剧、韩剧、英剧、日剧等{{{site_name}}}影视中文在线观看!提供2024最新{{{video_type}}}电视剧免费观看-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'video_type',
|
||||
'stc_name' => '分类首页',
|
||||
'stc_title' => '最新{{{video_type}}}-推荐{{{video_type}}}-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '最新{{{video_type}}}-推荐{{{video_type}}}-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_description' => '最新{{{video_type}}}-推荐{{{video_type}}}-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'video_type_page',
|
||||
'stc_name' => '分类分页',
|
||||
'stc_title' => '最新{{{video_type}}}-推荐-第{{{type_page}}}页-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '最新{{{video_type}}}-推荐-第{{{type_page}}}页-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_description' => '最新{{{video_type}}}-推荐-第{{{type_page}}}页 - {{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'rank',
|
||||
'stc_name' => '排行榜',
|
||||
'stc_title' => '最新{{{video_type}}}-推荐-第{{{type_page}}}页-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '最新{{{video_type}}}-推荐-第{{{type_page}}}页-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_description' => '最新{{{video_type}}}-推荐-第{{{type_page}}}页 - {{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清{{{video_type}}}大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'shujia',
|
||||
'stc_name' => '书架',
|
||||
'stc_title' => '我的书架',
|
||||
'stc_keywords' => '我的书架',
|
||||
'stc_description' => '我的书架',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'video_detail',
|
||||
'stc_name' => '详情',
|
||||
'stc_title' => '《{{{video_title}}}》 _{{{video_type}}}{{{video_title}}} _{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '{{{video_title}}}免费观看以及免费在线下载-{{{site_name}}}',
|
||||
'stc_description' => '【{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}】为你提供好看的{{{video_title}}} {{{video_description}}}-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'video_play',
|
||||
'stc_name' => '播放/章节',
|
||||
'stc_title' => '正在播放《{{{video_title}}}》{{{video_play_sort}}}原声版高清{{{video_title}}}-{{{video_type}}}{{{video_title}}}-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '正在播放《{{{video_title}}}》{{{video_play_sort}}}原声版高清{{{video_title}}}-{{{video_type}}}{{{video_title}}}-{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_description' => 'content="【{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}】为你提供好看的|{{{video_title}}}{{{video_play_sort}}},{{{video_type}}},|{{{video_title}}}剧情: {{{video_title}}}-{{{site_name}}}"',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'search',
|
||||
'stc_name' => '搜索页面',
|
||||
'stc_title' => '搜索结果{{{search_name}}}------------- - {{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '搜索结果{{{search_name}}}------------- - {{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_description' => '搜索结果{{{search_name}}}------------- - {{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
],
|
||||
[
|
||||
'stc_code' => 'gbook',
|
||||
'stc_name' => '反馈页面',
|
||||
'stc_title' => '反馈页面{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_keywords' => '反馈页面{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_description' => '反馈页面{{{site_name}}}资源网在线观看免费官网-2024{{{site_name}}}影院免费高清电视剧大全-www.{{{site_domain}}}-{{{site_name}}}',
|
||||
'stc_other_conf' => '',
|
||||
'stc_tongji_daima' => '',
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$SeoTdkConfigModel = SeoTdkConfigModel::where('stc_code', $arrDataOne['stc_code'])->where('site_id', $intSiteId)->find();
|
||||
if (empty($SeoTdkConfigModel)) {
|
||||
$arrDataOne['site_id'] = $intSiteId;
|
||||
SeoTdkConfigModel::insert($arrDataOne);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 添加对应的站点 地图文件生成 任务
|
||||
static public function addGenSiteMapPlanTask($intSiteId)
|
||||
{
|
||||
|
||||
if (config('app.default_app') == 'dianying' || config('app.default_app') == 'dadiyingshi') {
|
||||
$arrData = [
|
||||
[
|
||||
'pt_name' => '视频Sitemap生成',
|
||||
'pt_code' => 'GENERATE_SITEMAP',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600 * 3,
|
||||
],
|
||||
|
||||
];
|
||||
}elseif (config('app.default_app') == 'novelzw') {
|
||||
$arrData = [
|
||||
[
|
||||
'pt_name' => '小说Sitemap生成 novelzw',
|
||||
'pt_code' => 'NOVELZW_GENERATE_SITEMAP',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600 * 3,
|
||||
],
|
||||
];
|
||||
}elseif (config('app.default_app') == 'novelsk') {
|
||||
$arrData = [
|
||||
[
|
||||
'pt_name' => '小说Sitemap生成 novelsk',
|
||||
'pt_code' => 'NOVEL_SK_GENERATE_SITEMAP',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600 * 3,
|
||||
],
|
||||
];
|
||||
}elseif (config('app.default_app') == 'maomi') {
|
||||
$arrData = [
|
||||
[
|
||||
'pt_name' => '小说Sitemap生成',
|
||||
'pt_code' => 'NOVEL_GENERATE_SITEMAP',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 24 * 3600 * 3,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($arrData as $arrPlanTask) {
|
||||
$PlanTaskModel = PlanTaskModel::where('pt_code', $arrPlanTask['pt_code'])->where('site_id', $intSiteId)->find();
|
||||
$arrPlanTask['site_id'] = $intSiteId;
|
||||
if (empty($PlanTaskModel)) {
|
||||
PlanTaskModel::insert($arrPlanTask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
163
code/database/seeders/SystemConfigSeeder.php
Normal file
163
code/database/seeders/SystemConfigSeeder.php
Normal file
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
use app\admin\model\AdminUserModel;
|
||||
use app\admin\model\CaiJiPeiZhiModel;
|
||||
use app\admin\model\GuangGaoPeiZhiModel;
|
||||
use app\admin\model\PlanTaskModel;
|
||||
use app\admin\model\SystemConfigModel;
|
||||
|
||||
class SystemConfigSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
$arrData = [
|
||||
[
|
||||
'sc_code' => 'SITE_NAME',
|
||||
'sc_val' => '网站名称',
|
||||
'sc_description' => '网站名称',
|
||||
],
|
||||
[
|
||||
'sc_code' => 'YONG_JIU_DOMAIN',
|
||||
'sc_val' => 'https://xx.COM',
|
||||
'sc_description' => '永久域名',
|
||||
],
|
||||
[
|
||||
'sc_code' => 'YOU_XIANG',
|
||||
'sc_val' => 'TEST@USA.COM',
|
||||
'sc_description' => '邮箱',
|
||||
],
|
||||
[
|
||||
'sc_code' => 'DIAN_BAO_MING_ZI',
|
||||
'sc_val' => '@111111',
|
||||
'sc_description' => '电报名字',
|
||||
],
|
||||
[
|
||||
'sc_code' => 'DIAN_BAO_DI_ZHI',
|
||||
'sc_val' => '@111111',
|
||||
'sc_description' => '电报地址',
|
||||
],
|
||||
[
|
||||
'sc_code' => 'STATIC_FILE_VERSION',
|
||||
'sc_val' => time(),
|
||||
'sc_description' => '静态文件版本号',
|
||||
],
|
||||
|
||||
[
|
||||
'sc_code' => 'SHARE_DOMAIN',
|
||||
'sc_val' => "https://share.com",
|
||||
'sc_description' => '分享域名',
|
||||
],
|
||||
[
|
||||
'sc_code' => 'DL_API_DOMAIN',
|
||||
'sc_val' => "dl",
|
||||
'sc_description' => '代理商API域名-解析前缀dl-open. 后缀是.xyz ,但这里不需要填前缀和后缀',
|
||||
],
|
||||
[
|
||||
'sc_code' => 'LOGO_IS_IMT_OR_TEXT',
|
||||
'sc_val' => "2",
|
||||
'sc_description' => 'logo 是图片还是文字,1:图片,2:文字',
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($arrData as $arrSystemConfig) {
|
||||
$SystemConfigModel = SystemConfigModel::where('sc_code', $arrSystemConfig['sc_code'])->find();
|
||||
|
||||
if (empty($SystemConfigModel)) {
|
||||
SystemConfigModel::insert($arrSystemConfig);
|
||||
}
|
||||
}
|
||||
|
||||
SystemConfigModel::flushCache();
|
||||
|
||||
|
||||
$arrData = [
|
||||
|
||||
[
|
||||
'cjpz_code' => 'AILISI_DOMAIN',
|
||||
'cjpz_val' => 'https://www.123yqw.com',
|
||||
'cjpz_description' => '123小说主站域名',
|
||||
],
|
||||
[
|
||||
'cjpz_code' => 'AILISI_COOKIE',
|
||||
'cjpz_val' => 'fontFamily=null; fontColor=null; fontSize=null; bg=null; HstCfa4825157=1719515765978; HstCmu4825157=1719515765978; HstCnv4825157=1; __dtsu=104017181364393C07A241A233B7F357; lf_reader_num_33724=2; lf_reader_num_32663=7; PHPSESSID=rd7eervf3m5hsq6629va4ki0l6; lf_user_auth=think%3A%7B%22uid%22%3A%2263234%22%2C%22username%22%3A%22fuckusa%22%7D; lf_user_auth_sign=a72a7c954fed581c73cddc462847ff817c282a85; lf_user_recommend=1719516174; reader_config_web=0%7C18%7C1%7C0%7C1; lf_read_log=think%3A%7B%2232162%22%3A%2233724%257C5339f996a809d%257C1719515981%22%2C%2231743%22%3A%2232663%257C5d31940dbd7b3%257C1719516204%22%2C%2232083%22%3A%2233098%257Cf826dc7bf1eba%257C1719516318%22%2C%2230460%22%3A%2231268%257Ce18a0ef2441a3%257C1719516591%22%7D; lf___forward__=%2F; HstCns4825157=2; HstCla4825157=1719517404420; HstPn4825157=26; HstPt4825157=26',
|
||||
'cjpz_description' => '小说主站登录COOKIE',
|
||||
],
|
||||
[
|
||||
'cjpz_code' => 'TIANLAI_DOMAIN',
|
||||
'cjpz_val' => 'https://www.tzkczc.com',
|
||||
'cjpz_description' => '天籁小说主站域名',
|
||||
],
|
||||
[
|
||||
'cjpz_code' => 'TIANLAI_COOKIE',
|
||||
'cjpz_val' => 'fontFamily=null; fontColor=null; fontSize=null; bg=null; HstCfa4825157=1719515765978; HstCmu4825157=1719515765978; HstCnv4825157=1; __dtsu=104017181364393C07A241A233B7F357; lf_reader_num_33724=2; lf_reader_num_32663=7; PHPSESSID=rd7eervf3m5hsq6629va4ki0l6; lf_user_auth=think%3A%7B%22uid%22%3A%2263234%22%2C%22username%22%3A%22fuckusa%22%7D; lf_user_auth_sign=a72a7c954fed581c73cddc462847ff817c282a85; lf_user_recommend=1719516174; reader_config_web=0%7C18%7C1%7C0%7C1; lf_read_log=think%3A%7B%2232162%22%3A%2233724%257C5339f996a809d%257C1719515981%22%2C%2231743%22%3A%2232663%257C5d31940dbd7b3%257C1719516204%22%2C%2232083%22%3A%2233098%257Cf826dc7bf1eba%257C1719516318%22%2C%2230460%22%3A%2231268%257Ce18a0ef2441a3%257C1719516591%22%7D; lf___forward__=%2F; HstCns4825157=2; HstCla4825157=1719517404420; HstPn4825157=26; HstPt4825157=26',
|
||||
'cjpz_description' => '天籁小说主站登录COOKIE',
|
||||
],
|
||||
[
|
||||
'cjpz_code' => 'BIQUXS_DOMAIN',
|
||||
'cjpz_val' => 'http://www.biquxs.com',
|
||||
'cjpz_description' => '笔趣阁biquxs小说主站域名',
|
||||
],
|
||||
[
|
||||
'cjpz_code' => '5CCC_DOMAIN',
|
||||
'cjpz_val' => 'https://www.5ccc.org',
|
||||
'cjpz_description' => '笔趣阁5ccc小说主站域名',
|
||||
]
|
||||
,
|
||||
[
|
||||
'cjpz_code' => '630zw_DOMAIN',
|
||||
'cjpz_val' => 'https://630zw.org',
|
||||
'cjpz_description' => '笔趣阁630zw.org小说主站域名',
|
||||
]
|
||||
,
|
||||
[
|
||||
'cjpz_code' => 'DADI_DOMAIN',
|
||||
'cjpz_val' => 'https://www.czdadi.net',
|
||||
'cjpz_description' => '大地影视主站域名',
|
||||
],
|
||||
[
|
||||
'cjpz_code' => 'HEIMUER_DOMAIN',
|
||||
'cjpz_val' => 'https://json02.heimuer.xyz',
|
||||
'cjpz_description' => '黑木耳资源主站域名',
|
||||
]
|
||||
,
|
||||
[
|
||||
'cjpz_code' => 'YZZY_DOMAIN',
|
||||
'cjpz_val' => 'https://1080zyk1.com',
|
||||
'cjpz_description' => '优质资源主站域名',
|
||||
]
|
||||
];
|
||||
|
||||
foreach ($arrData as $arrCaiJiPeiZhi) {
|
||||
$CaiJiPeiZhiModel = CaiJiPeiZhiModel::where('cjpz_code', $arrCaiJiPeiZhi['cjpz_code'])->find();
|
||||
|
||||
if (empty($CaiJiPeiZhiModel)) {
|
||||
CaiJiPeiZhiModel::insert($arrCaiJiPeiZhi);
|
||||
}
|
||||
}
|
||||
|
||||
CaiJiPeiZhiModel::flushCache();
|
||||
|
||||
|
||||
$arrData = [
|
||||
[
|
||||
'ggpz_code' => 'TONG_JI_DAI_MA',
|
||||
'ggpz_val' => '',
|
||||
'ggpz_description' => '统计代码',
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($arrData as $arrGuangGaoPeiZhi) {
|
||||
$GuangGaoPeiZhiModel = GuangGaoPeiZhiModel::where('ggpz_code', $arrGuangGaoPeiZhi['ggpz_code'])->find();
|
||||
|
||||
if (empty($GuangGaoPeiZhiModel)) {
|
||||
$GuangGaoPeiZhiModel = GuangGaoPeiZhiModel::insert($arrGuangGaoPeiZhi);
|
||||
}
|
||||
}
|
||||
|
||||
GuangGaoPeiZhiModel::flushCache();
|
||||
}
|
||||
}
|
||||
318
code/database/seeders/VideoInfoSeeder.php
Normal file
318
code/database/seeders/VideoInfoSeeder.php
Normal file
@@ -0,0 +1,318 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
use app\admin\model\VideoInfoModel;
|
||||
use app\admin\model\XiaoShuoXiangQingModel;
|
||||
|
||||
class VideoInfoSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
/*
|
||||
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 206.69 WHERE `v_name` = '阿凡达';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 203.15 WHERE `v_name` = '复仇者联盟4:终局之战';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 168.25 WHERE `v_name` = '阿凡达:水之道';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 161.58 WHERE `v_name` = '泰坦尼克号';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 143.69 WHERE `v_name` = '星球大战7:原力觉醒';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 136.78 WHERE `v_name` = '复仇者联盟3:无限战争';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 130.20 WHERE `v_name` = '蜘蛛侠:英雄无归';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 129.95 WHERE `v_name` = '侏罗纪世界';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 118.23 WHERE `v_name` = '狮子王(2019)';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 117.94 WHERE `v_name` = '复仇者联盟';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 116.24 WHERE `v_name` = '速度与激情7';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 114.54 WHERE `v_name` = '冰雪奇缘2';
|
||||
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 112.57 WHERE `v_name` = '复仇者联盟2:奥创纪元';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 110.45 WHERE `v_name` = '黑豹';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 108.34 WHERE `v_name` = '哈利·波特与死亡圣器(下)';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 106.82 WHERE `v_name` = '超人总动员2';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 104.85 WHERE `v_name` = '速度与激情8';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 103.76 WHERE `v_name` = '美女与野兽(2017)';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 101.75 WHERE `v_name` = '小黄人大眼萌';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 95.75 WHERE `v_name` = '哪吒之魔童闹海';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 98.99 WHERE `v_name` = '钢铁侠3';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 96.45 WHERE `v_name` = '海王';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 95.78 WHERE `v_name` = '美国队长3:内战';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 94.63 WHERE `v_name` = '变形金刚4:绝迹重生';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 93.58 WHERE `v_name` = '哈利·波特与魔法石';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 92.47 WHERE `v_name` = '蜘蛛侠:英雄归来';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 91.23 WHERE `v_name` = '蝙蝠侠:黑暗骑士';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 90.15 WHERE `v_name` = '超凡蜘蛛侠';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 89.78 WHERE `v_name` = '星球大战8:最后的绝地武士';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 87.45 WHERE `v_name` = '星球大战9:天行者崛起';
|
||||
UPDATE `video_info` SET `v_ticket_sales` = 86.12 WHERE `v_name` = '小丑';
|
||||
|
||||
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 10.00 WHERE `v_name` = '哪吒之魔童闹海';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 9.80 WHERE `v_name` = '遮天';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 9.50 WHERE `v_name` = '熊出没·重启未来';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 9.20 WHERE `v_name` = '唐人街探案2';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 9.00 WHERE `v_name` = '美国队长4';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 9.00 WHERE `v_name` = '超凡蜘蛛侠';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 7.90 WHERE `v_name` = '复仇者联盟2:奥创纪元';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 7.80 WHERE `v_name` = '哈利·波特与死亡圣器(下)';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 7.70 WHERE `v_name` = '速度与激情8';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 7.60 WHERE `v_name` = '狮子王(2019)';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 7.60 WHERE `v_name` = '星球大战8:最后的绝地武士';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 7.50 WHERE `v_name` = '海王';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 7.40 WHERE `v_name` = '变形金刚4:绝迹重生';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 7.30 WHERE `v_name` = '星球大战9:天行者崛起';
|
||||
UPDATE `video_info` SET `v_recommend` = 9 , `v_pingfen` = 7.20 WHERE `v_name` = '小丑';
|
||||
|
||||
|
||||
*/
|
||||
$arrData = [
|
||||
['v_name' => '阿凡达', 'v_ticket_sales' => 206.69],
|
||||
['v_name' => '复仇者联盟4:终局之战', 'v_ticket_sales' => 203.15],
|
||||
['v_name' => '阿凡达:水之道', 'v_ticket_sales' => 168.25],
|
||||
['v_name' => '泰坦尼克号', 'v_ticket_sales' => 161.58],
|
||||
['v_name' => '哪吒之魔童闹海', 'v_ticket_sales' => 145],
|
||||
['v_name' => '星球大战7:原力觉醒', 'v_ticket_sales' => 143.69],
|
||||
['v_name' => '复仇者联盟3:无限战争', 'v_ticket_sales' => 136.78],
|
||||
['v_name' => '蜘蛛侠:英雄无归', 'v_ticket_sales' => 130.20],
|
||||
['v_name' => '侏罗纪世界', 'v_ticket_sales' => 129.95],
|
||||
['v_name' => '狮子王(2019)', 'v_ticket_sales' => 118.23],
|
||||
['v_name' => '复仇者联盟', 'v_ticket_sales' => 117.94],
|
||||
['v_name' => '速度与激情7', 'v_ticket_sales' => 116.24],
|
||||
['v_name' => '冰雪奇缘2', 'v_ticket_sales' => 114.54],
|
||||
['v_name' => '复仇者联盟2:奥创纪元', 'v_ticket_sales' => 112.57],
|
||||
['v_name' => '黑豹', 'v_ticket_sales' => 110.45],
|
||||
|
||||
['v_name' => '哈利·波特与死亡圣器(下)', 'v_ticket_sales' => 108.34],
|
||||
['v_name' => '超人总动员2', 'v_ticket_sales' => 106.82],
|
||||
['v_name' => '速度与激情8', 'v_ticket_sales' => 104.85],
|
||||
['v_name' => '美女与野兽(2017)', 'v_ticket_sales' => 103.76],
|
||||
['v_name' => '小黄人大眼萌', 'v_ticket_sales' => 101.75],
|
||||
['v_name' => '钢铁侠3', 'v_ticket_sales' => 98.99],
|
||||
['v_name' => '海王', 'v_ticket_sales' => 96.45],
|
||||
['v_name' => '美国队长3:内战', 'v_ticket_sales' => 95.78],
|
||||
['v_name' => '变形金刚4:绝迹重生', 'v_ticket_sales' => 94.63],
|
||||
['v_name' => '哈利·波特与魔法石', 'v_ticket_sales' => 93.58],
|
||||
['v_name' => '蜘蛛侠:英雄归来', 'v_ticket_sales' => 92.47],
|
||||
['v_name' => '蝙蝠侠:黑暗骑士', 'v_ticket_sales' => 91.23],
|
||||
['v_name' => '超凡蜘蛛侠', 'v_ticket_sales' => 90.15],
|
||||
['v_name' => '星球大战8:最后的绝地武士', 'v_ticket_sales' => 89.78],
|
||||
['v_name' => '冰雪奇缘', 'v_ticket_sales' => 88.69],
|
||||
['v_name' => '星球大战9:天行者崛起', 'v_ticket_sales' => 87.45],
|
||||
['v_name' => '小丑', 'v_ticket_sales' => 86.12],
|
||||
];
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$VideoInfoModel = VideoInfoModel::where('v_name', $arrDataOne['v_name'])->find();
|
||||
if (!empty($VideoInfoModel)) {
|
||||
try {
|
||||
$VideoInfoModel->v_ticket_sales = $arrDataOne['v_ticket_sales'];
|
||||
$VideoInfoModel->save();
|
||||
} catch (\Exception $e) {
|
||||
echo "Error: " . $e->getMessage();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
self::updateVideo();
|
||||
self::updateNovel();
|
||||
|
||||
|
||||
}
|
||||
|
||||
static public function updateVideo()
|
||||
{
|
||||
/*
|
||||
|
||||
推荐
|
||||
*/
|
||||
$arrData = [
|
||||
['v_name' => '遮天'],
|
||||
['v_name' => '滤镜'],
|
||||
['v_name' => '战狼'],
|
||||
['v_name' => '战狼2'],
|
||||
['v_name' => '天道'],
|
||||
['v_name' => '黑冰'],
|
||||
['v_name' => '长城'],
|
||||
['v_name' => '异型'],
|
||||
['v_name' => '滴滴代驾'],
|
||||
['v_name' => '我靠鉴宝走向人生巅峰'],
|
||||
['v_name' => '我叫苏妲己'],
|
||||
['v_name' => '九州战神'],
|
||||
['v_name' => '仙逆'],
|
||||
['v_name' => '似锦'],
|
||||
['v_name' => '斗破苍穹'],
|
||||
['v_name' => '庆余年'],
|
||||
['v_name' => '庆余年第二季'],
|
||||
['v_name' => '繁花'],
|
||||
['v_name' => '玫瑰的故事'],
|
||||
['v_name' => '大奉打更人'],
|
||||
['v_name' => '县委大院'],
|
||||
['v_name' => '三国演义'],
|
||||
['v_name' => '三体'],
|
||||
['v_name' => '鬼吹灯'],
|
||||
['v_name' => '云顶天宫'],
|
||||
['v_name' => '盗墓笔记'],
|
||||
['v_name' => '家有儿女'],
|
||||
['v_name' => '湄公河大案'],
|
||||
['v_name' => '亮剑'],
|
||||
['v_name' => '爱情公寓'],
|
||||
['v_name' => '爱情公寓2'],
|
||||
['v_name' => '爱情公寓3'],
|
||||
['v_name' => '我叫王土地'],
|
||||
['v_name' => '唐人街探索案'],
|
||||
['v_name' => '唐人街探索案2'],
|
||||
['v_name' => '唐人街探索案3'],
|
||||
['v_name' => '749局'],
|
||||
['v_name' => '红海行动'],
|
||||
['v_name' => '僵尸叔叔'],
|
||||
['v_name' => '哈利·波特与死亡圣器(下'],
|
||||
['v_name' => '超人总动员2'],
|
||||
['v_name' => '速度与激情8'],
|
||||
['v_name' => '美女与野兽(2017)'],
|
||||
['v_name' => '小黄人大眼萌'],
|
||||
['v_name' => '钢铁侠3'],
|
||||
['v_name' => '毒液'],
|
||||
['v_name' => '海王'],
|
||||
['v_name' => '美国队长3:内战'],
|
||||
['v_name' => '变形金刚4:绝迹重生'],
|
||||
['v_name' => '哈利·波特与魔法石'],
|
||||
['v_name' => '蜘蛛侠:英雄归来'],
|
||||
['v_name' => '蝙蝠侠:黑暗骑士'],
|
||||
['v_name' => '超凡蜘蛛侠'],
|
||||
['v_name' => '星球大战8:最后的绝地武士'],
|
||||
['v_name' => '冰雪奇缘'],
|
||||
['v_name' => '星球大战9:天行者崛起'],
|
||||
['v_name' => '小丑'],
|
||||
['v_name' => '阿凡达'],
|
||||
['v_name' => '复仇者联盟4:终局之战'],
|
||||
['v_name' => '阿凡达:水之道'],
|
||||
['v_name' => '泰坦尼克号'],
|
||||
['v_name' => '哪吒之魔童闹海'],
|
||||
['v_name' => '星球大战7:原力觉醒'],
|
||||
['v_name' => '复仇者联盟3:无限战争'],
|
||||
['v_name' => '蜘蛛侠:英雄无归'],
|
||||
['v_name' => '侏罗纪世界'],
|
||||
['v_name' => '狮子王(2019)'],
|
||||
['v_name' => '复仇者联盟'],
|
||||
['v_name' => '速度与激情7'],
|
||||
['v_name' => '冰雪奇缘2'],
|
||||
['v_name' => '复仇者联盟2:奥创纪元'],
|
||||
['v_name' => '黑豹'],
|
||||
['v_name' => '六姊妹'],
|
||||
['v_name' => '侏罗纪世界3'],
|
||||
['v_name' => '唐伯虎点点秋香'],
|
||||
['v_name' => '欢乐颂'],
|
||||
['v_name' => '人再囧途之泰囧'],
|
||||
['v_name' => '囧途'],
|
||||
['v_name' => '速度与激情10'],
|
||||
['v_name' => '绝地战警:生死与共'],
|
||||
['v_name' => '毒液:最后一舞'],
|
||||
['v_name' => '食神'],
|
||||
['v_name' => '终极代码'],
|
||||
['v_name' => '终极代码'],
|
||||
['v_name' => '前任4:英年早婚'],
|
||||
['v_name' => '前任3:再见前任'],
|
||||
['v_name' => '前任2:备胎反击战'],
|
||||
['v_name' => '前任攻略'],
|
||||
['v_name' => '下一任:前任'],
|
||||
['v_name' => '诡迷心笑'],
|
||||
['v_name' => '城中之城'],
|
||||
['v_name' => '精英律师'],
|
||||
['v_name' => '走走停停'],
|
||||
['v_name' => '猎场'],
|
||||
['v_name' => '深海狂鲨2'],
|
||||
];
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$VideoInfoModel = VideoInfoModel::where('v_name', $arrDataOne['v_name'])->find();
|
||||
if (!empty($VideoInfoModel)) {
|
||||
try {
|
||||
$VideoInfoModel->v_recommend = 9;
|
||||
$VideoInfoModel->save();
|
||||
} catch (\Exception $e) {
|
||||
echo "Error: " . $e->getMessage();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static public function updateNovel(){
|
||||
$arrData = [
|
||||
['xsxq_ming_zi' => '遮天', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '完美世界', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '圣墟', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '斗破苍穹', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '武动乾坤', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '大主宰', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '雪中悍刀行', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '择天记', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '凡人修仙传', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '仙逆', 'xsxq_tui_jian' => 1],
|
||||
|
||||
['xsxq_ming_zi' => '人间有剑', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '步步高升:从省考状元到权力巅峰', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '源力过载', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '天下长宁', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '剑来', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '捞尸人', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '轮回乐园', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '没钱修什么仙?', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '夜无疆', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '谁让他盛世美颜', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '牧神记', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '吞噬星空', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '全家偷听我心声杀疯了,我负责吃奶', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '盖世神医', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '太荒吞天诀', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '不朽剑神', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '乾坤剑神', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '帝武丹尊', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '都市武圣', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '我们的火红年代', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '利欲升迁记', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '做局', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '巅峰权力', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '狂少下山', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '对手', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '人间政道', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '官道之绝对权力', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '我的透视超给力', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '穿书七零:作精女配她暴富了', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '长生仙游', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '分手后我成了前任他小婶', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '农门长姐:我娇养了五个哥哥', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '龙血战神', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '修罗武神', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '穿到三千小世界里当炮灰', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '女总裁的全能兵王', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '九星霸体诀', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '天官赐福', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '全球高考', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '撒野', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '修罗武神', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '人皇纪', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '万古仙穹', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '元尊', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '妙医鸿途', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '最强逆袭', 'xsxq_tui_jian' => 1],
|
||||
['xsxq_ming_zi' => '重生之国民男神', 'xsxq_tui_jian' => 1],
|
||||
|
||||
|
||||
];
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$XiaoShuoXiangQingModel = XiaoShuoXiangQingModel::where('xsxq_ming_zi', $arrDataOne['xsxq_ming_zi'])->find();
|
||||
if (!empty($XiaoShuoXiangQingModel)) {
|
||||
try {
|
||||
$XiaoShuoXiangQingModel->xsxq_tui_jian = $arrDataOne['xsxq_tui_jian'];
|
||||
$XiaoShuoXiangQingModel->save();
|
||||
} catch (\Exception $e) {
|
||||
echo "Error: " . $e->getMessage();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
35
code/database/seeders/VideoSeoSeeder.php
Normal file
35
code/database/seeders/VideoSeoSeeder.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
use app\admin\model\VideoInfoSeoModel;
|
||||
|
||||
class VideoSeoSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
$arrData = [
|
||||
|
||||
[
|
||||
'vis_name' => '哪吒2',
|
||||
'v_id' => '33572',
|
||||
],
|
||||
[
|
||||
'vis_name' => '哪吒之魔童闹海票房',
|
||||
'v_id' => '33572',
|
||||
],
|
||||
[
|
||||
'vis_name' => '哪吒之魔童闹海最新票房',
|
||||
'v_id' => '33572',
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$arrDataOne['vis_md5'] = md5($arrDataOne['vis_name'] . $arrDataOne['v_id']);
|
||||
$VideoInfoSeoModel = VideoInfoSeoModel::where('vis_md5', $arrDataOne['vis_md5'])->find();
|
||||
if (empty($VideoInfoSeoModel)) {
|
||||
VideoInfoSeoModel::insert($arrDataOne);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
76
code/database/seeders/ZiYuanDuanDianSeeder.php
Normal file
76
code/database/seeders/ZiYuanDuanDianSeeder.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
use app\admin\model\AdminUserModel;
|
||||
use app\admin\model\GuangGaoFenZuModel;
|
||||
use app\admin\model\PlanTaskModel;
|
||||
use app\admin\model\ZiYuanDuanDianModel;
|
||||
|
||||
class ZiYuanDuanDianSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
$arrData = [
|
||||
|
||||
[
|
||||
'zydd_ming_zi' => '小说封面',
|
||||
'zydd_code' => 'AI_LI_SI_COVER',
|
||||
'zydd_domain' => '',
|
||||
],
|
||||
[
|
||||
'zydd_ming_zi' => '天籁小说封面',
|
||||
'zydd_code' => 'TIAN_LAI_COVER',
|
||||
'zydd_domain' => '',
|
||||
],
|
||||
[
|
||||
'zydd_ming_zi' => '笔趣阁小说封面',
|
||||
'zydd_code' => 'BI_QU_XS_COVER',
|
||||
'zydd_domain' => '',
|
||||
],
|
||||
[
|
||||
'zydd_ming_zi' => '笔趣阁5CCC小说封面',
|
||||
'zydd_code' => '5CCC_XS_COVER',
|
||||
'zydd_domain' => '',
|
||||
],
|
||||
[
|
||||
'zydd_ming_zi' => '笔趣阁630zw.org小说封面',
|
||||
'zydd_code' => '630_ZW_XS_COVER',
|
||||
'zydd_domain' => '',
|
||||
],
|
||||
[
|
||||
'zydd_ming_zi' => '大地影视封面',
|
||||
'zydd_code' => 'DADI_YINGSHI_COVER',
|
||||
'zydd_domain' => '',
|
||||
],
|
||||
[
|
||||
'zydd_ming_zi' => '黑木耳资源封面',
|
||||
'zydd_code' => 'HEIMUER_SOURCE_COVER',
|
||||
'zydd_domain' => '',
|
||||
],
|
||||
[
|
||||
'zydd_ming_zi' => '黑木耳资源m3u8',
|
||||
'zydd_code' => 'HEIMUER_SOURCE_PLAY',
|
||||
'zydd_domain' => '',
|
||||
],
|
||||
[
|
||||
'zydd_ming_zi' => '优质资源封面',
|
||||
'zydd_code' => 'YOUZHI_SOURCE_COVER',
|
||||
'zydd_domain' => '',
|
||||
],
|
||||
[
|
||||
'zydd_ming_zi' => '优质耳资源m3u8',
|
||||
'zydd_code' => 'YOUZHI_SOURCE_PLAY',
|
||||
'zydd_domain' => '',
|
||||
]
|
||||
];
|
||||
|
||||
foreach ($arrData as $arrDataOne) {
|
||||
$ZiYuanDuanDianModel = ZiYuanDuanDianModel::where('zydd_code', $arrDataOne['zydd_code'])->find();
|
||||
|
||||
if (empty($ZiYuanDuanDianModel)) {
|
||||
ZiYuanDuanDianModel::insert($arrDataOne);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user