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();
|
||||
}
|
||||
}
|
||||
10
code/database/mongo/migrations/category.php
Normal file
10
code/database/mongo/migrations/category.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
return [
|
||||
'collection' => 'category',
|
||||
'indexes' => [
|
||||
[
|
||||
'key' => ['ca_name' => 1],
|
||||
'options' => ['unique' => true]
|
||||
],
|
||||
]
|
||||
];
|
||||
23
code/database/mongo/migrations/chapter.php
Normal file
23
code/database/mongo/migrations/chapter.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
return [
|
||||
'collection' => 'chapter',
|
||||
'indexes' => [
|
||||
[
|
||||
'key' => ['c_source_uuid' => 1],
|
||||
'options' => ['unique' => true]
|
||||
],
|
||||
|
||||
[
|
||||
'key' => ['n_id' => 1],
|
||||
'options' => ['unique' => false]
|
||||
],
|
||||
[
|
||||
'key' => ['c_sort_num' => 1],
|
||||
'options' => ['unique' => false]
|
||||
],
|
||||
[
|
||||
'key' => ['c_page' => 1],
|
||||
'options' => ['unique' => false]
|
||||
],
|
||||
]
|
||||
];
|
||||
10
code/database/mongo/migrations/config_subject_fomart.php
Normal file
10
code/database/mongo/migrations/config_subject_fomart.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
return [
|
||||
'collection' => 'config_subject_fomart',
|
||||
'indexes' => [
|
||||
[
|
||||
'key' => ['csf_key' => 1],
|
||||
'options' => ['unique' => true]
|
||||
],
|
||||
]
|
||||
];
|
||||
10
code/database/mongo/migrations/gan_rao_ma.php
Normal file
10
code/database/mongo/migrations/gan_rao_ma.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
return [
|
||||
'collection' => 'gan_rao_ma',
|
||||
'indexes' => [
|
||||
[
|
||||
'key' => ['grm_domain' => 1, 'grm_page_code' => 1, 'grm_page_diff' => 1],
|
||||
'options' => ['unique' => true]
|
||||
],
|
||||
]
|
||||
];
|
||||
50
code/database/mongo/migrations/novel.php
Normal file
50
code/database/mongo/migrations/novel.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
return [
|
||||
'collection' => 'novel',
|
||||
'indexes' => [
|
||||
[
|
||||
'key' => ['n_id' => 1],
|
||||
'options' => ['unique' => true]
|
||||
],
|
||||
[
|
||||
'key' => ['n_name' => 1],
|
||||
'options' => ['unique' => false]
|
||||
],
|
||||
[
|
||||
'key' => ['n_author' => 1],
|
||||
'options' => ['unique' => false]
|
||||
],
|
||||
[
|
||||
'key' => ['n_description' => 1],
|
||||
'options' => ['unique' => false]
|
||||
],
|
||||
[
|
||||
'key' => ['n_category' => 1],
|
||||
'options' => ['unique' => false]
|
||||
],
|
||||
[
|
||||
'key' => ['n_category_sex_en' => 1],
|
||||
'options' => ['unique' => false]
|
||||
],
|
||||
[
|
||||
'key' => ['n_status' => 1],
|
||||
'options' => ['unique' => false]
|
||||
],
|
||||
[
|
||||
'key' => ['n_source_uuid' => 1],
|
||||
'options' => ['unique' => true]
|
||||
],
|
||||
[
|
||||
'key' => ['n_related_novel.n_id' => 1],
|
||||
'options' => ['unique' => false]
|
||||
],
|
||||
[
|
||||
'key' => ['n_forge_novel.n_forge_id' => 1],
|
||||
'options' => ['unique' => false]
|
||||
],
|
||||
[
|
||||
'key' => ['n_have_chapter' => 1],
|
||||
'options' => ['unique' => false]
|
||||
],
|
||||
]
|
||||
];
|
||||
10
code/database/mongo/migrations/novel_clicks.php
Normal file
10
code/database/mongo/migrations/novel_clicks.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
return [
|
||||
'collection' => 'novel_clicks',
|
||||
'indexes' => [
|
||||
[
|
||||
'key' => ['n_id' => 1, 'nc_date' => 1, 'nc_type' => 1],
|
||||
'options' => ['unique' => true]
|
||||
],
|
||||
]
|
||||
];
|
||||
274
code/database/schema/mysql-schema.dump
Normal file
274
code/database/schema/mysql-schema.dump
Normal file
@@ -0,0 +1,274 @@
|
||||
-- MySQL dump 10.13 Distrib 8.0.41, for Linux (x86_64)
|
||||
--
|
||||
-- Host: 127.0.0.1 Database: seo
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 8.0.41
|
||||
|
||||
/*!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=3 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=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `domain`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `domain`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `domain` (
|
||||
`d_id` int NOT NULL AUTO_INCREMENT COMMENT '域名ID',
|
||||
`d_domain` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '域名',
|
||||
`t_id` int DEFAULT NULL COMMENT '模板ID',
|
||||
`d_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '站点名',
|
||||
`d_keywords` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '站点关键词',
|
||||
`d_description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '站点描述',
|
||||
`d_index_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '首页title模板',
|
||||
`d_index_keywords` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '首页keywords模板',
|
||||
`d_index_description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '首页description模板',
|
||||
`d_statis` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '单域名统计',
|
||||
`d_logo_type` tinyint(1) DEFAULT NULL,
|
||||
`d_text_logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`d_img_logo` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`d_content_encode` tinyint unsigned DEFAULT '0',
|
||||
`t_cfg` json DEFAULT NULL,
|
||||
`info_id` int DEFAULT '0' COMMENT '详情id',
|
||||
PRIMARY KEY (`d_id`),
|
||||
UNIQUE KEY `d_domain` (`d_domain`) USING BTREE,
|
||||
KEY `t_id` (`t_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='域名表';
|
||||
/*!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,
|
||||
`gg_status` int DEFAULT '0',
|
||||
`gg_sort` int DEFAULT NULL,
|
||||
`site_id` int DEFAULT '1' COMMENT '站点ID',
|
||||
PRIMARY KEY (`gg_id`),
|
||||
KEY `ggfz_id` (`ggfz_id`),
|
||||
KEY `site_id` (`site_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=21 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,
|
||||
`site_id` int DEFAULT '1' COMMENT '站点ID',
|
||||
PRIMARY KEY (`ggfz_id`),
|
||||
UNIQUE KEY `ggfz_code` (`ggfz_code`) USING BTREE,
|
||||
KEY `site_id` (`site_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=11 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,
|
||||
`site_id` int DEFAULT '1' COMMENT '站点ID',
|
||||
PRIMARY KEY (`ggpz_id`),
|
||||
KEY `ggpz_code` (`ggpz_code`),
|
||||
KEY `site_id` (`site_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 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) CHARACTER SET utf8mb4 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=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `subject_fomart`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `subject_fomart`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `subject_fomart` (
|
||||
`sf_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`sfg_id` int DEFAULT NULL COMMENT '所属格式化分组ID',
|
||||
`sf_val` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '待格式化内容',
|
||||
PRIMARY KEY (`sf_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2468 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `subject_fomart_group`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `subject_fomart_group`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `subject_fomart_group` (
|
||||
`sfg_id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`sfg_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`sfg_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
||||
PRIMARY KEY (`sfg_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=120 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
|
||||
/*!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,
|
||||
`site_id` int DEFAULT '1' COMMENT '站点ID',
|
||||
PRIMARY KEY (`sc_id`),
|
||||
KEY `site_id` (`site_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `templates`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `templates`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `templates` (
|
||||
`t_id` int NOT NULL AUTO_INCREMENT COMMENT '视图模板ID',
|
||||
`t_default` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否默认模板',
|
||||
`t_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '模板编码',
|
||||
`t_path` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '模板位置',
|
||||
`t_cfg_template` json DEFAULT NULL COMMENT '模板需要配置的变量',
|
||||
PRIMARY KEY (`t_id`),
|
||||
KEY `t_code` (`t_code`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='模板表';
|
||||
/*!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=22 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 2025-04-21 15:51:05
|
||||
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\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'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
65
code/database/seeders/PlanTaskSeeder.php
Normal file
65
code/database/seeders/PlanTaskSeeder.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
use app\model\AdminUserModel;
|
||||
use app\model\PlanTaskModel;
|
||||
|
||||
class PlanTaskSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
self::addNovelTypePlanTask();
|
||||
}
|
||||
|
||||
|
||||
static public function addNovelTypePlanTask()
|
||||
{
|
||||
$arrDataNovel = [
|
||||
|
||||
[
|
||||
'pt_name' => '630小说全量扫描',
|
||||
'pt_code' => 'PULL_630_ZW_NOVEL',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 10 * 24 * 3600 * 3,
|
||||
],
|
||||
[
|
||||
'pt_name' => '630小说每日增量',
|
||||
'pt_code' => 'PULL_630_ZW_NOVEL_LATEST',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 1 * 24 * 3600,
|
||||
],
|
||||
|
||||
|
||||
|
||||
[
|
||||
'pt_name' => '74小说全量扫描',
|
||||
'pt_code' => 'PULL_74_ZW_NOVEL',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 10 * 24 * 3600 * 3,
|
||||
],
|
||||
[
|
||||
'pt_name' => '74小说每日增量',
|
||||
'pt_code' => 'PULL_74_ZW_NOVEL_LATEST',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 1 * 24 * 3600,
|
||||
],
|
||||
|
||||
|
||||
[
|
||||
'pt_name' => '优质资源库全量采集',
|
||||
'pt_code' => 'PULL_YOU_ZHI_SHI_PIN',
|
||||
'pt_enable' => 0,
|
||||
'pt_limit' => 1 * 24 * 3600,
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($arrDataNovel as $arrPlanTask) {
|
||||
$NovelOnePlanTaskModel = PlanTaskModel::where('pt_code', $arrPlanTask['pt_code'])->find();
|
||||
|
||||
if (empty($NovelOnePlanTaskModel)) {
|
||||
PlanTaskModel::insert($arrPlanTask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
15
code/database/seeders/SeedManager.php
Normal file
15
code/database/seeders/SeedManager.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
class SeedManager
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
AdminUserSeeder::handle();
|
||||
PlanTaskSeeder::handle();
|
||||
SystemConfigSeeder::handle();
|
||||
ZiYuanDuanDianSeeder::handle();
|
||||
TemplateSeeder::handle();
|
||||
}
|
||||
}
|
||||
119
code/database/seeders/SystemConfigSeeder.php
Normal file
119
code/database/seeders/SystemConfigSeeder.php
Normal file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
use app\model\AdminUserModel;
|
||||
use app\model\CaiJiPeiZhiModel;
|
||||
use app\model\PlanTaskModel;
|
||||
use app\model\SystemConfigModel;
|
||||
|
||||
class SystemConfigSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
$arrData = [
|
||||
[
|
||||
'sc_code' => 'YOU_XIANG',
|
||||
'sc_val' => 'TEST@USA.COM',
|
||||
'sc_description' => '邮箱',
|
||||
],
|
||||
[
|
||||
'sc_code' => 'LIAN_XI_FANG_SHI',
|
||||
'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' => 'PUSH_API_DOMAIN',
|
||||
'sc_val' => "api.test.com",
|
||||
'sc_description' => 'api',
|
||||
],
|
||||
[
|
||||
'sc_code' => 'PUBLIC_TONGJI_CODE',
|
||||
'sc_val' => "",
|
||||
'sc_description' => '全局刚刚统计代码',
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($arrData as $arrSystemConfig) {
|
||||
$SystemConfigModel = SystemConfigModel::where('sc_code', $arrSystemConfig['sc_code'])->find();
|
||||
|
||||
if (empty($SystemConfigModel)) {
|
||||
SystemConfigModel::insert($arrSystemConfig);
|
||||
}
|
||||
}
|
||||
|
||||
SystemConfigModel::flushCache();
|
||||
|
||||
|
||||
$arrCaiJiPeiZhiData = [
|
||||
|
||||
[
|
||||
'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' => 'HEIMUER_DOMAIN',
|
||||
'cjpz_val' => 'https://json02.heimuer.xyz',
|
||||
'cjpz_description' => '黑木耳资源主站域名',
|
||||
],
|
||||
[
|
||||
'cjpz_code' => 'YZZY_DOMAIN',
|
||||
'cjpz_val' => 'https://1080zyk1.com',
|
||||
'cjpz_description' => '优质资源主站域名',
|
||||
]
|
||||
];
|
||||
|
||||
foreach ($arrCaiJiPeiZhiData as $arrCaiJiPeiZhi) {
|
||||
$CaiJiPeiZhiModel = CaiJiPeiZhiModel::where('cjpz_code', $arrCaiJiPeiZhi['cjpz_code'])->find();
|
||||
|
||||
if (empty($CaiJiPeiZhiModel)) {
|
||||
CaiJiPeiZhiModel::insert($arrCaiJiPeiZhi);
|
||||
}
|
||||
}
|
||||
|
||||
CaiJiPeiZhiModel::flushCache();
|
||||
|
||||
}
|
||||
}
|
||||
556
code/database/seeders/TemplateSeeder.php
Normal file
556
code/database/seeders/TemplateSeeder.php
Normal file
@@ -0,0 +1,556 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;;
|
||||
|
||||
use app\model\TemplatesModel;
|
||||
use app\model\SubjectFomartGroupModel;
|
||||
use app\model\SubjectFomartModel;
|
||||
use app\model\DomainModel;
|
||||
|
||||
class TemplateSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
|
||||
$strInitDataFilePath = public_path('initdata');
|
||||
|
||||
/**
|
||||
* 替换模板分组 - url - 补充数据
|
||||
*/
|
||||
$arrUrlSubjectFomartGroupData = include $strInitDataFilePath . '/novel/urlSubjectFomartGroup.php';
|
||||
|
||||
/**
|
||||
* 替换模板分组 - tkd - 补充数据
|
||||
*/
|
||||
$arrTkdSubjectFomartGroupData = include $strInitDataFilePath . '/novel/tkdSubjectFomartGroup.php';
|
||||
|
||||
/**
|
||||
* 替换模板分组 基础数据播种
|
||||
* 狂雨模板
|
||||
*/
|
||||
$arrSubjectFomartGroupData = [
|
||||
// TKD
|
||||
'INDEX@INDEX@TITLE' => [
|
||||
'description' => '首页Title 模板分组',
|
||||
'sfg_id' => 1,
|
||||
'arrSubjectFomart' => [
|
||||
'{strIndexTitle}',
|
||||
]
|
||||
],
|
||||
'INDEX@INDEX@KEYWORDS' => [
|
||||
'description' => '首页Keywords 模板分组',
|
||||
'sfg_id' => 2,
|
||||
'arrSubjectFomart' => [
|
||||
'{strIndexKeywords}',
|
||||
]
|
||||
],
|
||||
'INDEX@INDEX@DESCRIPTION' => [
|
||||
'description' => '首页Description 模板分组',
|
||||
'sfg_id' => 3,
|
||||
'arrSubjectFomart' => [
|
||||
'{strIndexDescription}',
|
||||
]
|
||||
],
|
||||
|
||||
'NOVEL@GETLIBRARY@TITLE' => [
|
||||
'description' => '分类书库Title 模板分组',
|
||||
'sfg_id' => 4,
|
||||
'arrSubjectFomart' => [
|
||||
'{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETLIBRARY@KEYWORDS' => [
|
||||
'description' => '分类书库Keywords 模板分组',
|
||||
'sfg_id' => 5,
|
||||
'arrSubjectFomart' => [
|
||||
'{strNovelCategoryName}小说, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费小说, 在线阅读',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETLIBRARY@DESCRIPTION' => [
|
||||
'description' => '分类书库Description 模板分组',
|
||||
'sfg_id' => 6,
|
||||
'arrSubjectFomart' => [
|
||||
'{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说免费在线阅读,第{intPage}页精选热门作品,畅享{strSiteDomain}!',
|
||||
]
|
||||
],
|
||||
|
||||
'NOVEL@GETNOVELCHANNEL@TITLE' => [
|
||||
'description' => '男女生Title 模板分组',
|
||||
'sfg_id' => 7,
|
||||
'arrSubjectFomart' => [
|
||||
'{strNovelSex}小说 - {strSiteName} - 免费阅读 - 第{intPage}页',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETNOVELCHANNEL@KEYWORDS' => [
|
||||
'description' => '男女生Keywords 模板分组',
|
||||
'sfg_id' => 8,
|
||||
'arrSubjectFomart' => [
|
||||
'{strNovelSex}小说 - {strSiteKeywords} - 免费阅读 - 第{intPage}页',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETNOVELCHANNEL@DESCRIPTION' => [
|
||||
'description' => '男女生Description 模板分组',
|
||||
'sfg_id' => 9,
|
||||
'arrSubjectFomart' => [
|
||||
'{strNovelSex}小说 - {strSiteName} - 免费阅读 - 第{intPage}页',
|
||||
]
|
||||
],
|
||||
|
||||
'NOVEL@GETNOVELINFO@TITLE' => [
|
||||
'description' => '详情Title 模板分组',
|
||||
'sfg_id' => 10,
|
||||
'arrSubjectFomart' => [
|
||||
'{strNovelName} - {strNovelAuthor}- {strNovelCategoryName} - 免费在线阅读 - {strSiteName}',
|
||||
]
|
||||
|
||||
],
|
||||
'NOVEL@GETNOVELINFO@KEYWORDS' => [
|
||||
'description' => '详情Keywords 模板分组',
|
||||
'sfg_id' => 11,
|
||||
'arrSubjectFomart' => [
|
||||
'{strNovelName}, {strNovelAuthor}, {strNovelCategoryName}, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费阅读',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETNOVELINFO@DESCRIPTION' => [
|
||||
'description' => '详情Description 模板分组',
|
||||
'sfg_id' => 12,
|
||||
'arrSubjectFomart' => [
|
||||
'{strSiteName}提供{strNovelName}免费在线阅读,{strNovelAuthor}创作的{strNovelCategoryName}{strNovelStatus}小说,{strNovelDescription},欢迎体验{strSiteDomain}!',
|
||||
]
|
||||
],
|
||||
|
||||
'NOVEL@GETNOVELCATALOG@TITLE' => [
|
||||
'description' => '目录Title 模板分组',
|
||||
'sfg_id' => 13,
|
||||
'arrSubjectFomart' => [
|
||||
'{strNovelName}章节目录 - {strNovelAuthor} - 免费查看 - {strSiteName} 第{intPage}页',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETNOVELCATALOG@KEYWORDS' => [
|
||||
'description' => '目录Keywords 模板分组',
|
||||
'sfg_id' => 14,
|
||||
'arrSubjectFomart' => [
|
||||
'{strNovelName}, 章节目录, {strNovelAuthor}, {strNovelCategoryName}, 免费阅读,{strNovelSex}小说, {strSiteKeywords}, {strSiteName}',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETNOVELCATALOG@DESCRIPTION' => [
|
||||
'description' => '目录Description 模板分组',
|
||||
'sfg_id' => 15,
|
||||
'arrSubjectFomart' => [
|
||||
'{strSiteName}提供{strNovelName}章节目录免费查看,第{intPage}页包含最新{strNovelStatus}章节,{strNovelAuthor}创作,畅享{strSiteDomain}!',
|
||||
]
|
||||
],
|
||||
|
||||
'NOVEL@GETNOVELCHAPTER@TITLE' => [
|
||||
'description' => '内容Title 模板分组',
|
||||
'sfg_id' => 16,
|
||||
'arrSubjectFomart' => [
|
||||
'{strNovelName} {strNovelChapterName} - {strNovelAuthor} - 免费阅读 - {strSiteName}',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETNOVELCHAPTER@KEYWORDS' => [
|
||||
'description' => '内容Keywords 模板分组',
|
||||
'sfg_id' => 17,
|
||||
'arrSubjectFomart' => [
|
||||
'{strNovelName}, {strNovelChapterName}, {strNovelAuthor}, {strSiteKeywords}, 免费阅读, {strSiteName}',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETNOVELCHAPTER@DESCRIPTION' => [
|
||||
'description' => '内容Description 模板分组',
|
||||
'sfg_id' => 18,
|
||||
'arrSubjectFomart' => [
|
||||
'{strNovelName}{strNovelChapterName}免费在线阅读,{strNovelAuthor}著。{strChapterDescription},快来{strSiteName}畅读精彩章节!',
|
||||
]
|
||||
],
|
||||
|
||||
'NOVEL@GETNOVELRANK@TITLE' => [
|
||||
'description' => '排行榜Title 模板分组',
|
||||
'sfg_id' => 19,
|
||||
'arrSubjectFomart' => [
|
||||
'小说排行榜 - {strSiteName} - 第{intPage}页',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETNOVELRANK@KEYWORDS' => [
|
||||
'description' => '排行榜Keywords 模板分组',
|
||||
'sfg_id' => 20,
|
||||
'arrSubjectFomart' => [
|
||||
'小说排行榜, 热门小说, 小说推荐, {strSiteKeywords}, {strSiteName}, 免费阅读',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETNOVELRANK@DESCRIPTION' => [
|
||||
'description' => '排行榜Description 模板分组',
|
||||
'sfg_id' => 21,
|
||||
'arrSubjectFomart' => [
|
||||
'{strSiteName}提供小说排行榜,第{intPage}页精选热门小说免费阅读,最新排行一览无余,畅享{strSiteDomain}!',
|
||||
]
|
||||
],
|
||||
|
||||
'NOVEL@GETSEARCHNOVEL@TITLE' => [
|
||||
'description' => '搜索页Title 模板分组',
|
||||
'sfg_id' => 22,
|
||||
'arrSubjectFomart' => [
|
||||
'{strSearchKeywords} - {strSiteName}搜索 - 第{intPage}页',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETSEARCHNOVEL@KEYWORDS' => [
|
||||
'description' => '搜索页Keywords 模板分组',
|
||||
'sfg_id' => 23,
|
||||
'arrSubjectFomart' => [
|
||||
'{strSearchKeywords}, {strSiteName}, 免费阅读, 在线搜索, 第{intPage}页',
|
||||
]
|
||||
],
|
||||
'NOVEL@GETSEARCHNOVEL@DESCRIPTION' => [
|
||||
'description' => '搜索页Description 模板分组',
|
||||
'sfg_id' => 24,
|
||||
'arrSubjectFomart' => [
|
||||
'{strSearchKeywords}搜索结果尽在{strSiteName},第{intPage}页提供免费阅读,访问{strSiteDomain}立即体验!',
|
||||
]
|
||||
],
|
||||
|
||||
// URL
|
||||
'CATEGORY_INFO_URL' => [
|
||||
'description' => '分类书库URL 模板1',
|
||||
'sfg_id' => 25,
|
||||
'arrSubjectFomart' => [
|
||||
'/shuku/{strGender}/{strCategory}/{strStatus}/{strOrder}/page{intPage}',
|
||||
]
|
||||
],
|
||||
'NAN_SHENG_URL' => [
|
||||
'description' => '男生URL 模板1',
|
||||
'sfg_id' => 26,
|
||||
'arrSubjectFomart' => [
|
||||
'/nansheng-xiaoshuo',
|
||||
]
|
||||
],
|
||||
'NV_SHENG_URL' => [
|
||||
'description' => '女生URL 模板1',
|
||||
'sfg_id' => 27,
|
||||
'arrSubjectFomart' => [
|
||||
'/nvsheng-xiaoshuo',
|
||||
]
|
||||
],
|
||||
'RANK_INFO_URL' => [
|
||||
'description' => '排行榜URL 模板1',
|
||||
'sfg_id' => 28,
|
||||
'arrSubjectFomart' => [
|
||||
'/paihang/all',
|
||||
]
|
||||
],
|
||||
'NOVEL_INFO_URL' => [
|
||||
'description' => '小说详情URL 模板1',
|
||||
'sfg_id' => 29,
|
||||
'arrSubjectFomart' => [
|
||||
'/xiaoshuo/{strPinYin}-{intNId}',
|
||||
]
|
||||
],
|
||||
'KAN_NOVEL_INFO_URL' => [
|
||||
'description' => 'kan小说详情URL 模板1',
|
||||
'sfg_id' => 30,
|
||||
'arrSubjectFomart' => [
|
||||
'/kan-xiaoshuo/{strPinYin}-{intNId}-{intNForgeId}',
|
||||
]
|
||||
],
|
||||
'NOVEL_CATALOG_URL' => [
|
||||
'description' => '小说目录URL 模板1',
|
||||
'sfg_id' => 31,
|
||||
'arrSubjectFomart' => [
|
||||
'/xiaoshuo/{strPinYin}-{intNId}/mulu/{strOrder}/{intPage}',
|
||||
]
|
||||
],
|
||||
'CONTENT_INFO_URL' => [
|
||||
'description' => '内容章节URL 模板1',
|
||||
'sfg_id' => 32,
|
||||
'arrSubjectFomart' => [
|
||||
'/xiaoshuo/{strPinYin}-{intNId}/zhang-{intChapterSort}/{intChapterPage}',
|
||||
]
|
||||
],
|
||||
'NEWS_CONTENT_INFO_URL' => [
|
||||
'description' => '最新章节特殊页URL 模板1',
|
||||
'sfg_id' => 33,
|
||||
'arrSubjectFomart' => [
|
||||
'/xiaoshuo/{strPinYin}-{intNId}/chapter/latest',
|
||||
]
|
||||
],
|
||||
'SEARCH_INFO_URL' => [
|
||||
'description' => '搜索页URL 模板1',
|
||||
'sfg_id' => 34,
|
||||
'arrSubjectFomart' => [
|
||||
'/search.html?keyword={strSearchKeywords}&page={intPage}',
|
||||
]
|
||||
],
|
||||
'HISTORY_INFO_URL' => [
|
||||
'description' => '历史记录URL 模板1',
|
||||
'sfg_id' => 89,
|
||||
'arrSubjectFomart' => [
|
||||
'/history',
|
||||
]
|
||||
],
|
||||
'SHUJIA_INFO_URL' => [
|
||||
'description' => '书架URL 模板1',
|
||||
'sfg_id' => 90,
|
||||
'arrSubjectFomart' => [
|
||||
'/bookshelf',
|
||||
]
|
||||
],
|
||||
'USER_INFO_URL' => [
|
||||
'description' => '用户中心URL 模板1',
|
||||
'sfg_id' => 91,
|
||||
'arrSubjectFomart' => [
|
||||
'/user',
|
||||
]
|
||||
],
|
||||
'PC_URL_PATH' => [
|
||||
'description' => 'pc端URL目录 模板',
|
||||
'sfg_id' => 107,
|
||||
'arrSubjectFomart' => ['/pc', '/web', '/desktop', '/index', '/shouye', '/zhuomian']
|
||||
],
|
||||
'CATEGORY_INDEX_URL' => [
|
||||
'description' => '书库首页URL 模板1',
|
||||
'sfg_id' => 108,
|
||||
'arrSubjectFomart' => ['/shuku/index',]
|
||||
],
|
||||
'SEARCH_INDEX_URL' => [
|
||||
'description' => '搜索首页URL 模板1',
|
||||
'sfg_id' => 114,
|
||||
'arrSubjectFomart' => [
|
||||
'/search.html',
|
||||
]
|
||||
],
|
||||
|
||||
|
||||
// SEO 丰富内容
|
||||
'INDEX_POPULAR_NOVELS' => [
|
||||
'description' => '首页热门小说介绍 模板分组',
|
||||
'sfg_id' => 35,
|
||||
'arrSubjectFomart' => [
|
||||
'精选全网热评佳作,涵盖玄幻冒险、都市传奇、穿越重生等多种类型,带你领略最受欢迎的阅读热潮,快来发现你的下一本心动之作!',
|
||||
]
|
||||
],
|
||||
'INDEX_NEWS_NOVELS' => [
|
||||
'description' => '首页最新小说介绍 模板分组',
|
||||
'sfg_id' => 37,
|
||||
'arrSubjectFomart' => [
|
||||
'每日更新最新章节,囊括玄幻修真、都市爽文、重生逆袭等热门题材,紧跟作者步伐,第一时间畅读新鲜故事!',
|
||||
]
|
||||
],
|
||||
'INDEX_RANK_NOVELS' => [
|
||||
'description' => '首页小说排行榜介绍 模板分组',
|
||||
'sfg_id' => 38,
|
||||
'arrSubjectFomart' => [
|
||||
'汇聚读者最爱的小说排行,日榜、周榜、月榜一网打尽,玄幻巅峰、都市热血、完结经典全都有,助你快速找到高人气好书!',
|
||||
]
|
||||
],
|
||||
|
||||
// 最新替换模板分组id 119
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 视图模板 数据播种
|
||||
*/
|
||||
$arrTemplateData = [
|
||||
[
|
||||
't_id' => 1,
|
||||
't_default' => 1,
|
||||
't_code' => 'default',
|
||||
't_path' => '/app/home/view/default/',
|
||||
't_cfg_template' => $arrSubjectFomartGroupData,
|
||||
],
|
||||
[
|
||||
't_id' => 2,
|
||||
't_default' => 0,
|
||||
't_code' => 'kuangYu',
|
||||
't_path' => '/app/home/view/kuangYu/',
|
||||
't_cfg_template' => $arrSubjectFomartGroupData,
|
||||
],
|
||||
[
|
||||
't_id' => 3,
|
||||
't_default' => 0,
|
||||
't_code' => 'shikong',
|
||||
't_path' => '/app/home/view/shikong/',
|
||||
't_cfg_template' => $arrSubjectFomartGroupData,
|
||||
],
|
||||
[
|
||||
't_id' => 4,
|
||||
't_default' => 0,
|
||||
't_code' => 'haoZi',
|
||||
't_path' => '/app/home/view/haoZi/',
|
||||
't_cfg_template' => $arrSubjectFomartGroupData,
|
||||
],
|
||||
[
|
||||
't_id' => 5,
|
||||
't_default' => 0,
|
||||
't_code' => 'xiongMao',
|
||||
't_path' => '/app/home/view/xiongMao/',
|
||||
't_cfg_template' => $arrSubjectFomartGroupData,
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* 站点列表 数据播种
|
||||
*/
|
||||
$arrSiteData = [
|
||||
[
|
||||
'd_id' => 1,
|
||||
'd_domain' => 'seo.com',
|
||||
'd_name' => '狂雨小说',
|
||||
't_id' => '1',
|
||||
'd_keywords' => '狂雨小说',
|
||||
'd_description' => '欢迎来到狂雨小说 - 您的免费小说阅读天堂!这里汇聚了玄幻修真、穿越重生、都市热血、言情甜宠等多种热门小说类型,无论您是喜欢热血激战的主角成长故事,还是钟情于逆袭人生的穿越传奇,亦或是沉浸于都市生活的浪漫情缘,狂雨小说都能满足您的阅读渴望。我们每日更新最新章节,确保您第一时间追更心仪作品;更有小说排行榜精选全网热评佳作,从日榜到完结榜,助您轻松找到高人气好书。无需注册,免费畅读,狂雨小说致力于为您打造极致阅读体验,快来加入我们,开启属于您的故事冒险之旅吧!',
|
||||
'd_index_title' => '狂雨小说 - 免费在线阅读热门玄幻、穿越、都市小说',
|
||||
'd_index_keywords' => '狂雨小说, 小说在线阅读, 玄幻小说, 穿越小说, 热门小说排行榜',
|
||||
'd_index_description' => '狂雨小说提供免费在线阅读,涵盖玄幻、穿越、都市等热门小说,最新排行榜每日更新,尽享阅读乐趣!',
|
||||
'd_text_logo' => '热门小说阅读平台',
|
||||
't_cfg' => $arrSubjectFomartGroupData,
|
||||
],
|
||||
[
|
||||
'd_id' => 2,
|
||||
'd_domain' => 'novel2.com',
|
||||
'd_name' => '狂雨小说',
|
||||
't_id' => '2',
|
||||
'd_keywords' => '狂雨小说',
|
||||
'd_description' => '欢迎来到狂雨小说 - 您的免费小说阅读天堂!这里汇聚了玄幻修真、穿越重生、都市热血、言情甜宠等多种热门小说类型,无论您是喜欢热血激战的主角成长故事,还是钟情于逆袭人生的穿越传奇,亦或是沉浸于都市生活的浪漫情缘,狂雨小说都能满足您的阅读渴望。我们每日更新最新章节,确保您第一时间追更心仪作品;更有小说排行榜精选全网热评佳作,从日榜到完结榜,助您轻松找到高人气好书。无需注册,免费畅读,狂雨小说致力于为您打造极致阅读体验,快来加入我们,开启属于您的故事冒险之旅吧!',
|
||||
'd_index_title' => '狂雨小说 - 免费在线阅读热门玄幻、穿越、都市小说',
|
||||
'd_index_keywords' => '狂雨小说, 小说在线阅读, 玄幻小说, 穿越小说, 热门小说排行榜',
|
||||
'd_index_description' => '狂雨小说提供免费在线阅读,涵盖玄幻、穿越、都市等热门小说,最新排行榜每日更新,尽享阅读乐趣!',
|
||||
'd_text_logo' => '热门小说阅读平台',
|
||||
't_cfg' => $arrSubjectFomartGroupData,
|
||||
],
|
||||
[
|
||||
'd_id' => 3,
|
||||
'd_domain' => 'novel3.com',
|
||||
'd_name' => '时空小说',
|
||||
't_id' => '3',
|
||||
'd_keywords' => '狂雨小说',
|
||||
'd_description' => '欢迎来到狂雨小说 - 您的免费小说阅读天堂!这里汇聚了玄幻修真、穿越重生、都市热血、言情甜宠等多种热门小说类型,无论您是喜欢热血激战的主角成长故事,还是钟情于逆袭人生的穿越传奇,亦或是沉浸于都市生活的浪漫情缘,狂雨小说都能满足您的阅读渴望。我们每日更新最新章节,确保您第一时间追更心仪作品;更有小说排行榜精选全网热评佳作,从日榜到完结榜,助您轻松找到高人气好书。无需注册,免费畅读,狂雨小说致力于为您打造极致阅读体验,快来加入我们,开启属于您的故事冒险之旅吧!',
|
||||
'd_index_title' => '狂雨小说 - 免费在线阅读热门玄幻、穿越、都市小说',
|
||||
'd_index_keywords' => '狂雨小说, 小说在线阅读, 玄幻小说, 穿越小说, 热门小说排行榜',
|
||||
'd_index_description' => '狂雨小说提供免费在线阅读,涵盖玄幻、穿越、都市等热门小说,最新排行榜每日更新,尽享阅读乐趣!',
|
||||
'd_text_logo' => '热门小说阅读平台',
|
||||
't_cfg' => $arrSubjectFomartGroupData,
|
||||
],
|
||||
[
|
||||
'd_id' => 4,
|
||||
'd_domain' => 'novel4.com',
|
||||
'd_name' => '耗子小说',
|
||||
't_id' => '4',
|
||||
'd_keywords' => '狂雨小说',
|
||||
'd_description' => '欢迎来到狂雨小说 - 您的免费小说阅读天堂!这里汇聚了玄幻修真、穿越重生、都市热血、言情甜宠等多种热门小说类型,无论您是喜欢热血激战的主角成长故事,还是钟情于逆袭人生的穿越传奇,亦或是沉浸于都市生活的浪漫情缘,狂雨小说都能满足您的阅读渴望。我们每日更新最新章节,确保您第一时间追更心仪作品;更有小说排行榜精选全网热评佳作,从日榜到完结榜,助您轻松找到高人气好书。无需注册,免费畅读,狂雨小说致力于为您打造极致阅读体验,快来加入我们,开启属于您的故事冒险之旅吧!',
|
||||
'd_index_title' => '狂雨小说 - 免费在线阅读热门玄幻、穿越、都市小说',
|
||||
'd_index_keywords' => '狂雨小说, 小说在线阅读, 玄幻小说, 穿越小说, 热门小说排行榜',
|
||||
'd_index_description' => '狂雨小说提供免费在线阅读,涵盖玄幻、穿越、都市等热门小说,最新排行榜每日更新,尽享阅读乐趣!',
|
||||
'd_text_logo' => '热门小说阅读平台',
|
||||
't_cfg' => $arrSubjectFomartGroupData,
|
||||
],
|
||||
[
|
||||
'd_id' => 5,
|
||||
'd_domain' => 'novel5.com',
|
||||
'd_name' => '熊猫小说',
|
||||
't_id' => '5',
|
||||
'd_keywords' => '狂雨小说',
|
||||
'd_description' => '欢迎来到狂雨小说 - 您的免费小说阅读天堂!这里汇聚了玄幻修真、穿越重生、都市热血、言情甜宠等多种热门小说类型,无论您是喜欢热血激战的主角成长故事,还是钟情于逆袭人生的穿越传奇,亦或是沉浸于都市生活的浪漫情缘,狂雨小说都能满足您的阅读渴望。我们每日更新最新章节,确保您第一时间追更心仪作品;更有小说排行榜精选全网热评佳作,从日榜到完结榜,助您轻松找到高人气好书。无需注册,免费畅读,狂雨小说致力于为您打造极致阅读体验,快来加入我们,开启属于您的故事冒险之旅吧!',
|
||||
'd_index_title' => '狂雨小说 - 免费在线阅读热门玄幻、穿越、都市小说',
|
||||
'd_index_keywords' => '狂雨小说, 小说在线阅读, 玄幻小说, 穿越小说, 热门小说排行榜',
|
||||
'd_index_description' => '狂雨小说提供免费在线阅读,涵盖玄幻、穿越、都市等热门小说,最新排行榜每日更新,尽享阅读乐趣!',
|
||||
'd_text_logo' => '热门小说阅读平台',
|
||||
't_cfg' => $arrSubjectFomartGroupData,
|
||||
],
|
||||
];
|
||||
|
||||
self::initTemplate($arrTemplateData);
|
||||
|
||||
self::initSubjectFomartGroup($arrSubjectFomartGroupData);
|
||||
self::initSubjectFomartGroup($arrUrlSubjectFomartGroupData);
|
||||
self::initSubjectFomartGroup($arrTkdSubjectFomartGroupData);
|
||||
|
||||
self::initSite($arrSiteData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 视图模板 数据播种
|
||||
*
|
||||
* @param [type] $arrTemplateData
|
||||
* @return void
|
||||
*/
|
||||
static public function initTemplate($arrTemplateData)
|
||||
{
|
||||
foreach ($arrTemplateData as $arrTemplate) {
|
||||
$TemplatesModel = TemplatesModel::where('t_id', $arrTemplate['t_id'])->find();
|
||||
foreach ($arrTemplate['t_cfg_template'] as $key => $arrCfgTemplate) {
|
||||
unset($arrTemplate['t_cfg_template'][$key]['arrSubjectFomart']);
|
||||
}
|
||||
if (empty($TemplatesModel)) {
|
||||
TemplatesModel::insert($arrTemplate);
|
||||
} else {
|
||||
// 如果记录存在,更新记录
|
||||
$TemplatesModel->update($arrTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
TemplatesModel::flushAllTemplateOnCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换模板分组/替换模板 数据播种
|
||||
*
|
||||
* @param [type] $arrTemplateData
|
||||
* @return void
|
||||
*/
|
||||
static public function initSubjectFomartGroup($arrSubjectFomartGroupData)
|
||||
{
|
||||
foreach ($arrSubjectFomartGroupData as $SubjectFomartGroup) {
|
||||
$SubjectFomartGroupModel = SubjectFomartGroupModel::where('sfg_id', $SubjectFomartGroup['sfg_id'])->find();
|
||||
|
||||
$SubjectFomartGroupItem = [
|
||||
'sfg_id' => $SubjectFomartGroup['sfg_id'],
|
||||
'sfg_name' => str_replace(" 模板分组", "", $SubjectFomartGroup['description']),
|
||||
'sfg_description' => str_replace(" 模板分组", "", $SubjectFomartGroup['description']),
|
||||
];
|
||||
|
||||
foreach ($SubjectFomartGroup['arrSubjectFomart'] as $SubjectFomart) {
|
||||
$SubjectFomartItem = [
|
||||
'sfg_id' => $SubjectFomartGroup['sfg_id'],
|
||||
'sf_val' => $SubjectFomart
|
||||
];
|
||||
$SubjectFomartModel = SubjectFomartModel::where('sfg_id', $SubjectFomartItem['sfg_id'])->where('sf_val', $SubjectFomart)->find();
|
||||
if (empty($SubjectFomartModel)) {
|
||||
SubjectFomartModel::insert($SubjectFomartItem);
|
||||
}
|
||||
};
|
||||
|
||||
if (empty($SubjectFomartGroupModel)) {
|
||||
SubjectFomartGroupModel::insert($SubjectFomartGroupItem);
|
||||
} else {
|
||||
// 如果记录存在,更新记录
|
||||
$SubjectFomartGroupModel->update($SubjectFomartGroupItem);
|
||||
}
|
||||
}
|
||||
|
||||
// SubjectFomartGroupModel::flushCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* 站点列表 数据播种 --
|
||||
*
|
||||
* @param [type] $arrTemplateData
|
||||
* @return void
|
||||
*/
|
||||
static public function initSite($arrSiteData)
|
||||
{
|
||||
foreach ($arrSiteData as $arrSite) {
|
||||
$SiteModel = DomainModel::where('d_id', $arrSite['d_id'])->find();
|
||||
|
||||
if (empty($SiteModel)) {
|
||||
DomainModel::insert($arrSite);
|
||||
} else {
|
||||
// 如果记录存在,更新记录
|
||||
//$SiteModel->update($arrSite);
|
||||
}
|
||||
}
|
||||
|
||||
DomainModel::flushAllDomianOnCache();
|
||||
}
|
||||
}
|
||||
56
code/database/seeders/ZiYuanDuanDianSeeder.php
Normal file
56
code/database/seeders/ZiYuanDuanDianSeeder.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
use app\model\AdminUserModel;
|
||||
use app\model\GuangGaoFenZuModel;
|
||||
use app\model\PlanTaskModel;
|
||||
use app\model\ZiYuanDuanDianModel;
|
||||
|
||||
class ZiYuanDuanDianSeeder
|
||||
{
|
||||
static public function handle()
|
||||
{
|
||||
$arrData = [
|
||||
|
||||
[
|
||||
'zydd_ming_zi' => '小说封面',
|
||||
'zydd_code' => '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