|
...
|
...
|
@@ -35,8 +35,8 @@ class ProductLogic extends BaseLogic |
|
|
|
public function productSave(){
|
|
|
|
//参数处理
|
|
|
|
$this->param = $this->handleSaveParam($this->param);
|
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
// DB::beginTransaction();
|
|
|
|
// try {
|
|
|
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
|
|
|
//查看路由是否更新
|
|
|
|
$id = $this->editProductRoute($this->param['id'],$this->param['route']);
|
|
...
|
...
|
@@ -50,11 +50,11 @@ class ProductLogic extends BaseLogic |
|
|
|
//路由映射
|
|
|
|
$route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']);
|
|
|
|
$this->model->edit(['route'=>$route],['id'=>$id]);
|
|
|
|
DB::commit();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
DB::rollBack();
|
|
|
|
$this->fail('保存失败');
|
|
|
|
}
|
|
|
|
// DB::commit();
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// DB::rollBack();
|
|
|
|
// $this->fail('保存失败');
|
|
|
|
// }
|
|
|
|
//通知更新
|
|
|
|
$this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT, 'route'=>$route]);
|
|
|
|
return $this->success();
|
...
|
...
|
|