...
|
...
|
@@ -58,6 +58,7 @@ class Hot extends Api |
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/hot/store_list)
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
* @ApiParams (name="store_id", type="integer", required=false, description="店铺id")
|
|
|
* @ApiParams (name="page", type="integer", required=true, description="页数")
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
|
|
|
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
|
...
|
...
|
@@ -103,7 +104,7 @@ class Hot extends Api |
|
|
{
|
|
|
if($this->request->isPost()){
|
|
|
$page = $this->request->param('page',1,'intval');
|
|
|
// $this->store_id = $this->request->param('store_id',0,'intval');
|
|
|
$store_id = $this->request->param('store_id',0,'intval');
|
|
|
// $house_ids = $this->user_house_model->where('user_id',$this->user_id)->column('house_id');
|
|
|
// $query = function ($query) use ($house_ids){
|
|
|
// if($this->store_id) {
|
...
|
...
|
@@ -118,8 +119,16 @@ class Hot extends Api |
|
|
// }
|
|
|
// }
|
|
|
// };
|
|
|
$where_h = [
|
|
|
'status'=>2,
|
|
|
];
|
|
|
if($store_id) {
|
|
|
$where_h['store_id'] = $store_id;
|
|
|
} else {
|
|
|
$where_h['house_ids'] = ['like',['%'.$this->auth->house_id.'%']];
|
|
|
}
|
|
|
$where = [
|
|
|
'where' => ['status'=>2,'house_ids'=>['like',['%'.$this->auth->house_id.'%']]],
|
|
|
'where' => $where_h,
|
|
|
'with' => ['store']
|
|
|
];
|
|
|
$order = ['number'=>'DESC','createtime'=>'DESC'];
|
...
|
...
|
|