作者 lyh

gx

... ... @@ -44,7 +44,6 @@ class ProductLogic extends BaseLogic
$category_ids = $this->handleCategory();
//处理其他字段
$this->param = $this->handleSaveParam($this->param);
DB::connection('custom_mysql')->beginTransaction();
try {
if(isset($this->param['id']) && !empty($this->param['id'])){
$this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $this->param['id'], $this->user['project_id']);
... ... @@ -63,9 +62,7 @@ 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('系统错误请联系管理员');
}
return $this->success();
... ...