合并分支 'master-server' 到 'master'
gx2059项目单独设置产品及设置 查看合并请求 !826
正在显示
2 个修改的文件
包含
8 行增加
和
2 行删除
| @@ -206,8 +206,12 @@ class ProductController extends BaseController | @@ -206,8 +206,12 @@ class ProductController extends BaseController | ||
| 206 | $query = $query->where('created_uid',$this->map['created_uid']); | 206 | $query = $query->where('created_uid',$this->map['created_uid']); |
| 207 | } | 207 | } |
| 208 | if(!empty($this->param['start_at']) && !empty($this->param['end_at'])){ | 208 | if(!empty($this->param['start_at']) && !empty($this->param['end_at'])){ |
| 209 | + if($this->user['project_id'] == 2059){ | ||
| 210 | + $query->where('send_time', '>=' ,$this->param['start_at'].' 00:00:00')->where('send_time', '<=' ,$this->param['end_at'].' 59:59:59'); | ||
| 211 | + }else{ | ||
| 209 | $query->where('created_at', '>=' ,$this->param['start_at'].' 00:00:00')->where('created_at', '<=' ,$this->param['end_at'].' 59:59:59'); | 212 | $query->where('created_at', '>=' ,$this->param['start_at'].' 00:00:00')->where('created_at', '<=' ,$this->param['end_at'].' 59:59:59'); |
| 210 | } | 213 | } |
| 214 | + } | ||
| 211 | $this->param['featured_status'] = $this->param['featured_status'] ?? 0; | 215 | $this->param['featured_status'] = $this->param['featured_status'] ?? 0; |
| 212 | if($this->param['featured_status'] != Category::STATUS_ACTIVE) { | 216 | if($this->param['featured_status'] != Category::STATUS_ACTIVE) { |
| 213 | $cateModel = new Category(); | 217 | $cateModel = new Category(); |
| @@ -56,7 +56,9 @@ class ProductLogic extends BaseLogic | @@ -56,7 +56,9 @@ class ProductLogic extends BaseLogic | ||
| 56 | $id = $this->param['id']; | 56 | $id = $this->param['id']; |
| 57 | }else{ | 57 | }else{ |
| 58 | $this->param = $this->addHandleParam($this->param); | 58 | $this->param = $this->addHandleParam($this->param); |
| 59 | - $this->param['sort'] = $this->setNewsSort(); | 59 | + if($this->user['project_id'] != 2059){//2059项目不处理排序 |
| 60 | + $this->param['sort'] = $this->setProductSort(); | ||
| 61 | + } | ||
| 60 | $id = $this->model->addReturnId($this->param); | 62 | $id = $this->model->addReturnId($this->param); |
| 61 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']); | 63 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']); |
| 62 | $this->model->edit(['route'=>$route],['id'=>$id]); | 64 | $this->model->edit(['route'=>$route],['id'=>$id]); |
| @@ -81,7 +83,7 @@ class ProductLogic extends BaseLogic | @@ -81,7 +83,7 @@ class ProductLogic extends BaseLogic | ||
| 81 | * @method :post | 83 | * @method :post |
| 82 | * @time :2023/12/25 9:27 | 84 | * @time :2023/12/25 9:27 |
| 83 | */ | 85 | */ |
| 84 | - public function setNewsSort(){ | 86 | + public function setProductSort(){ |
| 85 | $info = $this->model->orderBy('sort','desc')->first(); | 87 | $info = $this->model->orderBy('sort','desc')->first(); |
| 86 | if(empty($info)){ | 88 | if(empty($info)){ |
| 87 | return 1; | 89 | return 1; |
-
请 注册 或 登录 后发表评论