作者 liyuhang

gx

@@ -59,19 +59,19 @@ class NewsLogic extends BaseLogic @@ -59,19 +59,19 @@ class NewsLogic extends BaseLogic
59 $this->param['created_at'] = date('Y-m-d H:i:s',time()); 59 $this->param['created_at'] = date('Y-m-d H:i:s',time());
60 $this->param['updated_at'] = date('Y-m-d H:i:s',time()); 60 $this->param['updated_at'] = date('Y-m-d H:i:s',time());
61 $this->param['category_id'] = ','.$this->param['category_id'].','; 61 $this->param['category_id'] = ','.$this->param['category_id'].',';
62 - DB::beginTransaction();  
63 - try { 62 +// DB::beginTransaction();
  63 +// try {
64 if(isset($this->param['image'])){ 64 if(isset($this->param['image'])){
65 $data = $this->upload(); 65 $data = $this->upload();
66 $this->param['image'] = $data; 66 $this->param['image'] = $data;
67 } 67 }
68 $rs = $this->model->insertGetId($this->param); 68 $rs = $this->model->insertGetId($this->param);
69 RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_NEWS, $rs, $this->user['project_id']); 69 RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_NEWS, $rs, $this->user['project_id']);
70 - DB::commit();  
71 - }catch (\Exception $e){  
72 - DB::rollBack();  
73 - $this->fail('添加失败',Code::USER_ERROR);  
74 - } 70 +// DB::commit();
  71 +// }catch (\Exception $e){
  72 +// DB::rollBack();
  73 +// $this->fail('添加失败',Code::USER_ERROR);
  74 +// }
75 //TODO::写入日志 75 //TODO::写入日志
76 $this->success(); 76 $this->success();
77 } 77 }