|
@@ -243,6 +243,14 @@ class LandingPageLinkService
|
|
|
->where('report_user_bind_records.adid', $params['adid']);
|
|
|
});
|
|
|
}
|
|
|
+ if (isset($params['promotion_id']) && $params['promotion_id']) {
|
|
|
+ $sql->whereExists(function ($query) use ($params) {
|
|
|
+ $query->select(DB::raw(1))
|
|
|
+ ->from('report_user_bind_records')
|
|
|
+ ->whereRaw('report_user_bind_records.uid = orders.uid')
|
|
|
+ ->where('report_user_bind_records.promotion_id', $params['promotion_id']);
|
|
|
+ });
|
|
|
+ }
|
|
|
if (isset($params['link_source']) && $params['link_source']) {
|
|
|
$sql->whereExists(function ($query) use ($params) {
|
|
|
$query->select(DB::raw(1))
|