|
...
|
...
|
@@ -51,7 +51,6 @@ class ProductLogic extends BaseLogic |
|
|
|
$this->saveExtendInfo($data['id'],$this->param['extend'] ?? []);//扩展字段
|
|
|
|
$this->saveDetail($data['id'],$this->param['detail'] ?? []);
|
|
|
|
$this->addUpdateNotify(RouteMap::SOURCE_PRODUCT,$data['route'] ?? '');
|
|
|
|
$this->curlDelRoute(['new_route'=>$data['route'] ?? '']);
|
|
|
|
return $this->success(['id'=>$data['id']]);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -73,6 +72,7 @@ class ProductLogic extends BaseLogic |
|
|
|
$id = $this->model->addReturnId($param);
|
|
|
|
$route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']);
|
|
|
|
$this->model->edit(['route'=>$route],['id'=>$id]);
|
|
|
|
$this->curlDelRoute(['new_route'=>$route ?? '']);
|
|
|
|
return $this->success(['id'=>$id,'route'=>$route]);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -84,6 +84,7 @@ class ProductLogic extends BaseLogic |
|
|
|
* @time :2024/12/18 10:09
|
|
|
|
*/
|
|
|
|
public function editProduct(){
|
|
|
|
$info = $this->model->read(['id'=>$this->param['id']],['id','route']);
|
|
|
|
//处理字段
|
|
|
|
$param = $this->handleSaveParam($this->param);
|
|
|
|
$route = $param['route'];
|
|
...
|
...
|
@@ -95,6 +96,7 @@ class ProductLogic extends BaseLogic |
|
|
|
$param['route'] = RouteMap::setRoute($param['route'], RouteMap::SOURCE_PRODUCT, $this->param['id'], $this->user['project_id']);
|
|
|
|
}
|
|
|
|
$this->model->edit($param,['id'=>$this->param['id']]);
|
|
|
|
$this->curlDelRoute(['new_route'=>$route ?? '','old_route'=>$info['route'] ?? '']);
|
|
|
|
return $this->success(['id'=>$this->param['id'],'route'=>$route]);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|