reset
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
<?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'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace database\seeders;
|
||||
|
||||
class SeedManager
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
AdminUserSeeder::handle();
|
||||
PlanTaskSeeder::handle();
|
||||
SystemConfigSeeder::handle();
|
||||
ZiYuanDuanDianSeeder::handle();
|
||||
TemplateSeeder::handle();
|
||||
}
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
<?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();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,540 +0,0 @@
|
||||
<?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' => 'haoZi',
|
||||
// 't_path' => '/app/home/view/haoZi/',
|
||||
// ],
|
||||
// [
|
||||
// 't_id' => 4,
|
||||
// 't_default' => 0,
|
||||
// 't_code' => 'xiongMao',
|
||||
// 't_path' => '/app/home/view/xiongMao/',
|
||||
// ],
|
||||
// [
|
||||
// 't_id' => 5,
|
||||
// 't_default' => 0,
|
||||
// 't_code' => 'shiKong',
|
||||
// 't_path' => '/app/home/view/shiKong/',
|
||||
// ],
|
||||
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* 站点列表 数据播种
|
||||
*/
|
||||
$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' => '2',
|
||||
'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' => '2',
|
||||
'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();
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
<?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