|
...
|
...
|
@@ -62,12 +62,9 @@ class NewsCategoryLogic extends BaseLogic |
|
|
|
if($info !== false){
|
|
|
|
$this->fail('当前分类名称已存在');
|
|
|
|
}
|
|
|
|
//参数处理
|
|
|
|
$this->param = $this->addParamProcessing($this->param);
|
|
|
|
DB::beginTransaction();
|
|
|
|
$this->param['project_id'] = $this->user['project_id'];
|
|
|
|
$this->param['operator_id'] = $this->user['id'];
|
|
|
|
$this->param['create_id'] = $this->user['id'];
|
|
|
|
$this->param['created_at'] = date('Y-m-d H:i:s');
|
|
|
|
$this->param['updated_at'] = date('Y-m-d H:i:s');
|
|
|
|
try {
|
|
|
|
$cate_id = $this->model->insertGetId($this->param);
|
|
|
|
if(isset($this->param['pid']) && !empty($this->param['pid'])) {
|
|
...
|
...
|
@@ -188,4 +185,33 @@ class NewsCategoryLogic extends BaseLogic |
|
|
|
$list = $this->model->list($map);
|
|
|
|
return $this->success($list);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function verifyParam(){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(参数处理)paramProcessing
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/6/13 11:30
|
|
|
|
*/
|
|
|
|
public function addParamProcessing($param){
|
|
|
|
$param['project_id'] = $this->user['project_id'];
|
|
|
|
$param['operator_id'] = $this->user['id'];
|
|
|
|
$param['create_id'] = $this->user['id'];
|
|
|
|
$param['created_at'] = date('Y-m-d H:i:s');
|
|
|
|
$param['updated_at'] = date('Y-m-d H:i:s');
|
|
|
|
return $this->success($param);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(添加分类时处理子集分类)addProcessingSon
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/6/13 11:34
|
|
|
|
*/
|
|
|
|
public function addProcessingSon(){
|
|
|
|
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|