作者 Your Name
... ... @@ -47,17 +47,6 @@ class EmergencyRenewSite extends Command
continue;
}
//获取站点其他域名
$other_domain = [];
if (strpos($domain_info['domain'], 'www.') === 0) {
$other_domain[] = str_replace('www', '*', $domain_info['domain']);
$top_domain = str_replace('www.', '', $domain_info['domain']);
if ($this->check_cname($top_domain, $target_server)) {
$other_domain[] = $top_domain;
}
}
//创建目标服务器建站任务
$map_create = [
'type' => DomainCreateTask::TYPE_MAIN,
... ... @@ -68,7 +57,6 @@ class EmergencyRenewSite extends Command
];
$task_info = $create_model->read($map_create, ['id']);
if (!$task_info) {
$other_domain && $map_create['other_domain'] = json_encode($other_domain);
$create_model->add($map_create);
}
... ...
... ... @@ -350,6 +350,8 @@ class ProductLogic extends BaseLogic
DB::connection('custom_mysql')->beginTransaction();
try {
$cateRelate = new CategoryRelated();
//删除扩展字段
$extendInfoModel = new ExtendInfo();
foreach ($this->param['ids'] as $id) {
$info = $this->model->read(['id'=>$id],['id','status']);
if($info['status'] == Product::STATUS_RECYCLE){
... ... @@ -359,6 +361,7 @@ class ProductLogic extends BaseLogic
$this->model->del(['id'=>$id]);
//删除关联表
$cateRelate->del(['product_id'=>$id]);
$extendInfoModel->del(['product_id'=>$id]);
}else{
//回收站
$this->model->edit(['status'=>Product::STATUS_RECYCLE],['id'=>$id]);
... ...