feat: 初始化雄戈商城服务端代码与Webhook自动部署配置
这个提交包含在:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace addons\shopro_huifu\command;
|
||||
|
||||
use addons\shopro_huifu\library\Installer;
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
|
||||
class RepairMenu extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('shopro_huifu:repair-menu')
|
||||
->setDescription('Repair shopro_huifu install (files + SQL + menus)');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$shopro = \think\Db::name('auth_rule')->where('name', 'shopro')->find();
|
||||
if (!$shopro) {
|
||||
$output->error('未找到 Shopro 父菜单 (auth_rule.name=shopro),请先安装 Shopro 商城插件');
|
||||
return;
|
||||
}
|
||||
|
||||
Installer::installMenu($output);
|
||||
Installer::installSplitMenu($output);
|
||||
Installer::upgradePayTypeColumn($output);
|
||||
\app\common\library\Menu::enable('shopro_huifu/config');
|
||||
\app\common\library\Menu::enable('shopro/split');
|
||||
Installer::grantRulesToShoproGroups($output);
|
||||
Installer::clearMenuCache();
|
||||
Installer::setAddonState('shopro_huifu', 1, $output);
|
||||
$output->writeln('请退出后台重新登录,然后执行 php think shopro_huifu:verify 复查');
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户