|
...
|
...
|
@@ -11,6 +11,7 @@ namespace App\Http\Logic\Bside\CustomModule; |
|
|
|
|
|
|
|
use App\Http\Logic\Bside\BaseLogic;
|
|
|
|
use App\Models\CustomModule\CustomModuleExtend;
|
|
|
|
use App\Models\CustomModule\CustomModuleExtentContent;
|
|
|
|
|
|
|
|
class CustomModuleExtendLogic extends BaseLogic
|
|
|
|
{
|
|
...
|
...
|
@@ -115,10 +116,14 @@ class CustomModuleExtendLogic extends BaseLogic |
|
|
|
* @time :2023/12/4 15:47
|
|
|
|
*/
|
|
|
|
public function extendDel(){
|
|
|
|
$rs = $this->model->del($this->param);
|
|
|
|
if($rs === false){
|
|
|
|
$this->fail('系统错误,请联系管理员');
|
|
|
|
$info = $this->model->read(['id'=>$this->param['id']]);
|
|
|
|
//查看当前扩展字段是否设置了值
|
|
|
|
$extendInfoModel = new CustomModuleExtentContent();
|
|
|
|
$extendInfo = $extendInfoModel->read(['key'=>$info['key']]);
|
|
|
|
if($extendInfo !== false){
|
|
|
|
$this->fail('当前扩展字段已有产品在使用,不允许删除');
|
|
|
|
}
|
|
|
|
$this->model->del(['id'=>$this->param['id']]);
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|