| xqd
@@ -656,7 +656,7 @@ class AlbumController extends Controller
|
|
|
* @apiVersion 0.1.0
|
|
|
* @apiParam {int} [store_id] 商户id 模拟值为0
|
|
|
* @apiParam {int} [type] 查询方式 1 按用户 2 按时间 3 按类型
|
|
|
- * @apiParam {int} [user_id] 用户id
|
|
|
+ * @apiParam {int} [openid] 用户openid
|
|
|
* @apiParam {int} [action] 行为类型 1 收藏 2查看类目 3查看商品 4登陆 5点击图片 6 点击导航 7一键拨号
|
|
|
* @apiParam {int} [start_time] 查询开始时间
|
|
|
* @apiParam {int} [end_time] 查询结束时间
|
| xqd
@@ -713,9 +713,8 @@ class AlbumController extends Controller
|
|
|
$query = AlbumWatchRecord::where([['agent_id',$user_agent->id],['store_id',$store_id]]);
|
|
|
switch ($type){
|
|
|
case '1':
|
|
|
- if(!$request->input('user_id')) return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!');
|
|
|
- $user_id = $request->input('user_id');\Log::info($user_id);
|
|
|
- $query = $query->where('user_id',request('user_id'));
|
|
|
+ if(!$request->input('openid')) return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!');
|
|
|
+ $query = $query->where('open_id',request('openid'));
|
|
|
break;
|
|
|
case '2':
|
|
|
if(!$request->input('start_time')||!$request->input('end_time')) return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!');
|