1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- namespace General\Services\Report;
- use General\Models\Report\ReportUserBindRecord;
- /**
- * uc数据上报
- */
- class QappUchcReport extends BaseReport
- {
- public function __construct()
- {
- $this->charge_event_type = 69;
- $this->register_event_type = 67;
- $this->add_desk_event_type = 68;
- $this->report_url = '';// 同callback参数
- }
- public function getRegisterQueryParams(ReportUserBindRecord $user): array
- {
- $this->report_url = $user->callback;
-
- return [
- 'type' => $this->register_event_type,
- 'event_time' => time() * 100,
- 'source' => $user->source,
- 'money' => 0,
- ];
- }
- public function getChargeQueryParams(ReportUserBindRecord $user, float $amount): array
- {
- // uc回传用的地址是callback的
- $this->report_url = $user->callback;
-
- return [
- 'type' => $this->charge_event_type,
- 'event_time' => time() * 100,
- 'source' => $user->source,
- 'money' => $amount,
- ];
- }
- public function getAddDeskQueryParams(ReportUserBindRecord $user): array
- {
- $this->report_url = $user->callback;
- return [
- 'type' => $this->add_desk_event_type,
- 'event_time' => time() * 100,
- 'source' => BaseConst::Platform,
- 'money' => 0,
- ];
- }
- }
|