|
@@ -57,9 +57,9 @@ class NewsCategoryLogic extends BaseLogic |
|
@@ -57,9 +57,9 @@ class NewsCategoryLogic extends BaseLogic |
|
57
|
*/
|
57
|
*/
|
|
58
|
public function newsCategorySave(){
|
58
|
public function newsCategorySave(){
|
|
59
|
//验证名称是否存在
|
59
|
//验证名称是否存在
|
|
60
|
- $this->verifyParamName($this->param['name']);
|
|
|
|
61
|
- DB::beginTransaction();
|
|
|
|
62
|
- try {
|
60
|
+// $this->verifyParamName($this->param['name']);
|
|
|
|
61
|
+// DB::beginTransaction();
|
|
|
|
62
|
+// try {
|
|
63
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
63
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
|
64
|
//验证是否可编辑
|
64
|
//验证是否可编辑
|
|
65
|
$this->verifyEditParam($this->param['id'],$this->param['pid']);
|
65
|
$this->verifyEditParam($this->param['id'],$this->param['pid']);
|
|
@@ -74,11 +74,11 @@ class NewsCategoryLogic extends BaseLogic |
|
@@ -74,11 +74,11 @@ class NewsCategoryLogic extends BaseLogic |
|
74
|
}
|
74
|
}
|
|
75
|
$route = RouteMap::setRoute($this->param['alias'] ?: $this->param['name'], RouteMap::SOURCE_NEWS_CATE, $id, $this->user['project_id']);
|
75
|
$route = RouteMap::setRoute($this->param['alias'] ?: $this->param['name'], RouteMap::SOURCE_NEWS_CATE, $id, $this->user['project_id']);
|
|
76
|
$this->model->edit(['alias'=>$route],['id'=>$id]);
|
76
|
$this->model->edit(['alias'=>$route],['id'=>$id]);
|
|
77
|
- DB::commit();
|
|
|
|
78
|
- }catch (\Exception $e){
|
|
|
|
79
|
- DB::rollBack();
|
|
|
|
80
|
- $this->fail('error');
|
|
|
|
81
|
- }
|
77
|
+// DB::commit();
|
|
|
|
78
|
+// }catch (\Exception $e){
|
|
|
|
79
|
+// DB::rollBack();
|
|
|
|
80
|
+// $this->fail('error');
|
|
|
|
81
|
+// }
|
|
82
|
//更新通知记录表
|
82
|
//更新通知记录表
|
|
83
|
$this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_NEWS_CATE, 'route'=>$this->param['alias']]);
|
83
|
$this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_NEWS_CATE, 'route'=>$this->param['alias']]);
|
|
84
|
return $this->success();
|
84
|
return $this->success();
|
|
@@ -205,18 +205,6 @@ class NewsCategoryLogic extends BaseLogic |
|
@@ -205,18 +205,6 @@ class NewsCategoryLogic extends BaseLogic |
|
205
|
return $this->success();
|
205
|
return $this->success();
|
|
206
|
}
|
206
|
}
|
|
207
|
|
207
|
|
|
208
|
- /**
|
|
|
|
209
|
- * @name :(参数处理)paramProcessing
|
|
|
|
210
|
- * @author :lyh
|
|
|
|
211
|
- * @method :post
|
|
|
|
212
|
- * @time :2023/6/13 11:30
|
|
|
|
213
|
- */
|
|
|
|
214
|
- public function addParamProcessing($param){
|
|
|
|
215
|
- $param['project_id'] = $this->user['project_id'];
|
|
|
|
216
|
- $param['operator_id'] = $this->user['id'];
|
|
|
|
217
|
- $param['create_id'] = $this->user['id'];
|
|
|
|
218
|
- return $this->success($param);
|
|
|
|
219
|
- }
|
|
|
|
220
|
|
208
|
|
|
221
|
/**
|
209
|
/**
|
|
222
|
* @name :(添加分类时处理子集分类)addProcessingSon
|
210
|
* @name :(添加分类时处理子集分类)addProcessingSon
|