|
...
|
...
|
@@ -52,6 +52,7 @@ class ProductLogic extends BaseLogic |
|
|
|
$id = $this->param['id'];
|
|
|
|
}else{
|
|
|
|
$this->param = $this->addHandleParam($this->param);
|
|
|
|
$this->param['sort'] = $this->setNewsSort();
|
|
|
|
$id = $this->model->addReturnId($this->param);
|
|
|
|
$route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']);
|
|
|
|
$this->model->edit(['route'=>$route],['id'=>$id]);
|
|
...
|
...
|
@@ -76,7 +77,7 @@ class ProductLogic extends BaseLogic |
|
|
|
* @time :2023/12/25 9:27
|
|
|
|
*/
|
|
|
|
public function setNewsSort(){
|
|
|
|
$info = $this->model->orderBy('sort','desc')->first();
|
|
|
|
$info = $this->model->select(['id','sort'])->orderBy('sort','desc')->first();
|
|
|
|
if($info === false){
|
|
|
|
return 1;
|
|
|
|
}
|
...
|
...
|
|