作者 Your Name
... ... @@ -69,7 +69,7 @@ class TemplateLog extends Command
$templateLogModel->del(['created_at'=>['<=',$date],'source'=>['!=',1]]);
//首页保存最新的20条记录
$latestIds = $templateLogModel->where(['source'=>1,'is_custom'=>0])->orderBy('created_at', 'desc')->take(20)->pluck('id'); // 仅提取ID字段
return $templateLogModel->del(['id'=>['not in',$latestIds],'source'=>1]);
return $templateLogModel->del(['id'=>['not in',$latestIds],'source'=>1,'is_custom'=>0]);
}
/**
... ...
... ... @@ -360,7 +360,7 @@ class ProductLogic extends BaseLogic
if($info['status'] == Product::STATUS_RECYCLE){
$this->delRoute($id);
//删除当前产品模版
$this->delProductModule($id);
// $this->delProductModule($id);
$this->model->del(['id'=>$id]);
//删除关联表
$cateRelate->del(['product_id'=>$id]);
... ... @@ -598,7 +598,8 @@ class ProductLogic extends BaseLogic
'source' => BTemplate::SOURCE_PRODUCT,
'source_id' => $id,
'project_id'=>$this->user['project_id'],
'is_list'=>0
'is_list'=>0,
'is_custom'=>0
];
$bTemplateModel = new BTemplate();
$rs = $bTemplateModel->del($param);
... ...