作者 lyh

gx

... ... @@ -61,8 +61,8 @@ class NewsLogic extends BaseLogic
public function newsSave()
{
//拼接参数
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'];
... ... @@ -80,12 +80,12 @@ class NewsLogic extends BaseLogic
$route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_NEWS, $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_NEWS,$route);
$this->curlDelRoute(['new_route'=>$route]);
return $this->success(['id'=>$id]);
... ...