|
...
|
...
|
@@ -51,8 +51,8 @@ class ProductLogic extends BaseLogic |
|
|
|
$category_ids = $this->getLastCategoryArr($this->param['category_id']);
|
|
|
|
$this->param['category_id'] = ','.implode(',',$category_ids).',';
|
|
|
|
}
|
|
|
|
// DB::connection('custom_mysql')->beginTransaction();
|
|
|
|
// try {
|
|
|
|
DB::connection('custom_mysql')->beginTransaction();
|
|
|
|
try {
|
|
|
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
|
|
|
$id = $this->param['id'];
|
|
|
|
//查看路由是否更新
|
|
...
|
...
|
@@ -68,11 +68,11 @@ class ProductLogic extends BaseLogic |
|
|
|
CategoryRelated::saveRelated($id, $category_ids);
|
|
|
|
//保存扩展字段
|
|
|
|
$this->saveExtendInfo($id,$extend);
|
|
|
|
// 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'=>$this->param['route']]);
|
|
|
|
return $this->success();
|
...
|
...
|
|