| xqd
@@ -292,8 +292,10 @@ class AlbumController extends Controller
|
|
|
$add_record['store_id'] = $datas['store_id'];
|
|
|
$add_record['detail'] = null;
|
|
|
AlbumWatchRecord::create($add_record);
|
|
|
+ $user_agent = AlbumAgentModel::where('user_id',$add_record['agent_id'])->first();
|
|
|
+ $agent = AlbumUserModel::where('id',$user_agent->user_id)->first();
|
|
|
try{
|
|
|
- $this->sendLogsMessage($datas['store_id'],$userAuth->wechat_open_id,4);
|
|
|
+ $this->sendLogsMessage($datas['store_id'],$agent->wechat_open_id,4);
|
|
|
}catch (\Exception $e){
|
|
|
|
|
|
}
|
| xqd
@@ -413,8 +415,10 @@ class AlbumController extends Controller
|
|
|
$add_record['store_id'] = $store_id;
|
|
|
$add_record['detail'] = json_encode($select_info);
|
|
|
AlbumWatchRecord::create($add_record);
|
|
|
+ $user_agent = AlbumAgentModel::where('user_id',$userAuth->up_agent_id)->first();
|
|
|
+ $agent = AlbumUserModel::where('id',$user_agent->user_id)->first();
|
|
|
try{
|
|
|
- $this->sendLogsMessage($store_id,$userAuth->wechat_open_id,2);
|
|
|
+ $this->sendLogsMessage($store_id,$agent->wechat_open_id,2);
|
|
|
}catch (\Exception $e){
|
|
|
|
|
|
}
|
| xqd
@@ -542,8 +546,10 @@ class AlbumController extends Controller
|
|
|
$add_record['store_id'] = $store_id;
|
|
|
$add_record['detail'] = json_encode($select_info);
|
|
|
AlbumWatchRecord::create($add_record);
|
|
|
+ $user_agent = AlbumAgentModel::where('user_id',$userAuth->up_agent_id)->first();
|
|
|
+ $agent = AlbumUserModel::where('id',$user_agent->user_id)->first();
|
|
|
try{
|
|
|
- $this->sendLogsMessage($store_id,$userAuth->wechat_open_id,3);
|
|
|
+ $this->sendLogsMessage($store_id,$agent->wechat_open_id,3);
|
|
|
}catch (\Exception $e){
|
|
|
|
|
|
}
|
| xqd
@@ -1087,8 +1093,10 @@ class AlbumController extends Controller
|
|
|
$add_record['action'] = 1;
|
|
|
$add_record['store_id'] = $data['store_id'];
|
|
|
$add_record['detail'] = json_encode($select_info);
|
|
|
+ $user_agent = AlbumAgentModel::where('user_id',$userAuth->up_agent_id)->first();
|
|
|
+ $agent = AlbumUserModel::where('id',$user_agent->user_id)->first();
|
|
|
try{
|
|
|
- $this->sendLogsMessage($data['store_id'],$userAuth->wechat_open_id,1);
|
|
|
+ $this->sendLogsMessage($data['store_id'],$agent->wechat_open_id,1);
|
|
|
}catch (\Exception $e){
|
|
|
|
|
|
}
|
| xqd
@@ -1467,9 +1475,11 @@ class AlbumController extends Controller
|
|
|
$add_record['detail'] = json_encode($select_info);
|
|
|
// dd($add_record);
|
|
|
$res = AlbumWatchRecord::create($add_record);
|
|
|
+ $user_agent = AlbumAgentModel::where('user_id',$userAuth->up_agent_id)->first();
|
|
|
+ $agent = AlbumUserModel::where('id',$user_agent->user_id)->first();
|
|
|
if($res){
|
|
|
try{
|
|
|
- $this->sendLogsMessage($data['store_id'],$userAuth->wechat_open_id,$data['type']);
|
|
|
+ $this->sendLogsMessage($data['store_id'],$agent->wechat_open_id,$data['type']);
|
|
|
}catch (\Exception $e){
|
|
|
|
|
|
}
|