|
...
|
...
|
@@ -30,8 +30,8 @@ class BlogLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function blogSave(){
|
|
|
|
//拼接参数
|
|
|
|
// DB::beginTransaction();
|
|
|
|
// try {
|
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
$this->param = $this->paramProcessing($this->param);
|
|
|
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
|
|
|
$id = $this->param['id'];
|
|
...
|
...
|
@@ -48,11 +48,11 @@ class BlogLogic extends BaseLogic |
|
|
|
$route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_BLOG, $id, $this->user['project_id']);
|
|
|
|
$this->edit(['url'=>$route],['id'=>$id]);
|
|
|
|
}
|
|
|
|
// DB::commit();
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// DB::rollBack();
|
|
|
|
// $this->fail('系统错误,请联系管理员');
|
|
|
|
// }
|
|
|
|
DB::commit();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
DB::rollBack();
|
|
|
|
$this->fail('系统错误,请联系管理员');
|
|
|
|
}
|
|
|
|
$this->addUpdateNotify(RouteMap::SOURCE_BLOG,$route);
|
|
|
|
$this->curlDelRoute(['new_route'=>$route]);
|
|
|
|
return $this->success(['id'=>$id]);
|
...
|
...
|
|