|
...
|
...
|
@@ -38,8 +38,8 @@ class ProductLogic extends BaseLogic |
|
|
|
// $category_ids = $this->param['category_id'] ?? [];
|
|
|
|
//参数处理
|
|
|
|
$this->param = $this->handleSaveParam($this->param);
|
|
|
|
DB::connection('custom_mysql')->beginTransaction();
|
|
|
|
try {
|
|
|
|
// DB::connection('custom_mysql')->beginTransaction();
|
|
|
|
// try {
|
|
|
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
|
|
|
//查看路由是否更新
|
|
|
|
$id = $this->editProductRoute($this->param['id'],$this->param['route']);
|
|
...
|
...
|
@@ -55,11 +55,11 @@ class ProductLogic extends BaseLogic |
|
|
|
$this->model->edit(['route'=>$route],['id'=>$id]);
|
|
|
|
//产品分类关联
|
|
|
|
// CategoryRelated::saveRelated($id, $category_ids);
|
|
|
|
DB::connection('custom_mysql')->commit();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
DB::connection('custom_mysql')->rollBack();
|
|
|
|
$this->fail('系统错误请联系管理员');
|
|
|
|
}
|
|
|
|
// DB::connection('custom_mysql')->commit();
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// DB::connection('custom_mysql')->rollBack();
|
|
|
|
// $this->fail('系统错误请联系管理员');
|
|
|
|
// }
|
|
|
|
//通知更新
|
|
|
|
$this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT, 'route'=>$route]);
|
|
|
|
return $this->success();
|
...
|
...
|
|