作者 lyh

gx

... ... @@ -51,7 +51,7 @@ class CustomModuleLogic extends BaseLogic
public function customModuleSave(){
ProjectServer::useProject($this->param['project_id']);
$this->param = $this->handleParam($this->param);
// $this->checkIsName($this->param['name'],$this->param['id'] ?? 0);
$this->checkIsName($this->param['name'],$this->param['id'] ?? 0);
if(isset($this->param['id']) && !empty($this->param['id'])){
$this->moduleEdit();
}else{
... ... @@ -116,7 +116,7 @@ class CustomModuleLogic extends BaseLogic
public function checkIsName($name,$id = 0){
$param['name'] = $name;
if(!empty($id)){
$param['id'] = ['id'=>['!=',$id]];
$param['id'] = ['!=',$id];
}
$info = (new CustomModule())->read($param);
if($info !== false){
... ...