|
...
|
...
|
@@ -56,7 +56,9 @@ class ProductLogic extends BaseLogic |
|
|
|
$id = $this->param['id'];
|
|
|
|
}else{
|
|
|
|
$this->param = $this->addHandleParam($this->param);
|
|
|
|
$this->param['sort'] = $this->setNewsSort();
|
|
|
|
if($this->user['project_id'] != 2059){//2059项目不处理排序
|
|
|
|
$this->param['sort'] = $this->setProductSort();
|
|
|
|
}
|
|
|
|
$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]);
|
|
...
|
...
|
@@ -81,7 +83,7 @@ class ProductLogic extends BaseLogic |
|
|
|
* @method :post
|
|
|
|
* @time :2023/12/25 9:27
|
|
|
|
*/
|
|
|
|
public function setNewsSort(){
|
|
|
|
public function setProductSort(){
|
|
|
|
$info = $this->model->orderBy('sort','desc')->first();
|
|
|
|
if(empty($info)){
|
|
|
|
return 1;
|
...
|
...
|
|