feat: 新增会员浏览/拨打额度并优化无图展示逻辑
新增会员每日浏览完整信息和拨打电话的额度配置,调整付费查看接口描述为解锁完整信息,优化帖子无图时的兜底展示逻辑,修复图片加载路径问题,删除废弃工具脚本。
这个提交包含在:
@@ -215,6 +215,24 @@ class FcInstall extends Command
|
||||
$output->writeln(' - ' . $planTable . ' 新增列 post_discount');
|
||||
$changed++;
|
||||
}
|
||||
if (!$this->hasColumn($planTable, 'view_quota')) {
|
||||
Db::execute("ALTER TABLE `{$planTable}` ADD COLUMN `view_quota` int(10) NOT NULL DEFAULT 20"
|
||||
. " COMMENT '会员每日免费浏览完整信息条数(0=不限)' AFTER `free_view_quota`");
|
||||
Db::execute("UPDATE `{$planTable}` SET `view_quota` = 20 WHERE `plan_code` = 'M1'");
|
||||
Db::execute("UPDATE `{$planTable}` SET `view_quota` = 50 WHERE `plan_code` = 'M3'");
|
||||
Db::execute("UPDATE `{$planTable}` SET `view_quota` = 0 WHERE `plan_code` = 'M12'");
|
||||
$output->writeln(' - ' . $planTable . ' 新增列 view_quota(0=不限次浏览)');
|
||||
$changed++;
|
||||
}
|
||||
if (!$this->hasColumn($planTable, 'call_quota')) {
|
||||
Db::execute("ALTER TABLE `{$planTable}` ADD COLUMN `call_quota` int(10) NOT NULL DEFAULT 30"
|
||||
. " COMMENT '会员每日拨打电话次数(0=不限)' AFTER `view_quota`");
|
||||
Db::execute("UPDATE `{$planTable}` SET `call_quota` = 30 WHERE `plan_code` = 'M1'");
|
||||
Db::execute("UPDATE `{$planTable}` SET `call_quota` = 40 WHERE `plan_code` = 'M3'");
|
||||
Db::execute("UPDATE `{$planTable}` SET `call_quota` = 0 WHERE `plan_code` = 'M12'");
|
||||
$output->writeln(' - ' . $planTable . ' 新增列 call_quota(0=不限次拨打)');
|
||||
$changed++;
|
||||
}
|
||||
if (!$this->hasColumn($extTable, 'free_view_quota')) {
|
||||
Db::execute("ALTER TABLE `{$extTable}` ADD COLUMN `free_view_quota` int(10) NOT NULL DEFAULT 20"
|
||||
. " COMMENT '当前会员每日免费查看条数(0=无限)' AFTER `free_view_used`");
|
||||
@@ -256,6 +274,7 @@ class FcInstall extends Command
|
||||
$deprecated = [
|
||||
'post.monthPrice', 'post.monthQuota', 'post.yearPrice', 'post.yearQuota',
|
||||
'fee.singlePost', 'fee.freePostPerDay', 'fee.memberMonth', 'fee.memberQuarter', 'fee.memberYear',
|
||||
'call.vipDailyQuota',
|
||||
];
|
||||
$removedKeys = Db::name('fc_config')->where('key', 'in', $deprecated)->delete();
|
||||
if ($removedKeys) {
|
||||
@@ -943,6 +962,17 @@ class FcInstall extends Command
|
||||
KEY `target` (`target_type`, `target_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='同城-电话拨打次数记录';",
|
||||
|
||||
'view_log' => "CREATE TABLE IF NOT EXISTS `#P#view_log` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '浏览用户ID',
|
||||
`post_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '信息ID',
|
||||
`view_date` date NOT NULL COMMENT '浏览日期',
|
||||
`createtime` int(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uniq_user_post_date` (`user_id`, `post_id`, `view_date`),
|
||||
KEY `idx_user_date` (`user_id`, `view_date`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='同城-完整信息每日浏览记录';",
|
||||
|
||||
'category' => "CREATE TABLE IF NOT EXISTS `#P#category` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(32) NOT NULL DEFAULT '' COMMENT '分类名',
|
||||
|
||||
在新工单中引用
屏蔽一个用户