Browse Source

add:包审核;

Wang Chen 4 years ago
parent
commit
ca40359c2d
3 changed files with 42 additions and 38 deletions
  1. 18 18
      app/Jobs/QappTikTokUser.php
  2. 20 20
      app/Jobs/QappTikTokUserCharge.php
  3. 4 0
      config/audit.php

+ 18 - 18
app/Jobs/QappTikTokUser.php

@@ -32,13 +32,13 @@ class QappTikTokUser implements ShouldQueue
      */
     public function __construct(string $ip, string $device_no, string $mac, int $channel_id, int $uid, string $register_time, bool $is_report = false)
     {
-        $this->ip = $ip;
-        $this->device_no = $device_no;
-        $this->mac = $mac;
-        $this->channel_id = $channel_id;
-        $this->uid = $uid;
+        $this->ip            = $ip;
+        $this->device_no     = $device_no;
+        $this->mac           = $mac;
+        $this->channel_id    = $channel_id;
+        $this->uid           = $uid;
         $this->register_time = $register_time;
-        $this->is_report = $is_report;
+        $this->is_report     = $is_report;
     }
 
     /**
@@ -48,22 +48,22 @@ class QappTikTokUser implements ShouldQueue
      */
     public function handle()
     {
-        $client = new Client();
-        $params = [
-            'ip' => $this->ip,
-            'device_no' => $this->device_no,
-            'mac' => $this->mac ?? '',
-            'channel_id' => $this->channel_id,
-            'uid' => $this->uid,
+        $client         = new Client();
+        $params         = [
+            'ip'            => $this->ip,
+            'device_no'     => $this->device_no,
+            'mac'           => $this->mac ?? '',
+            'channel_id'    => $this->channel_id,
+            'uid'           => $this->uid,
             'register_time' => $this->register_time,
-            'is_report' => (string) $this->is_report,
-            'source' => 'zsy'
+            'is_report'     => (string)$this->is_report,
+            'source'        => 'zsy'
         ];
         $params['sign'] = _sign($params, SysConsts::TIKTOK_KEY);
-        $url = 'https://newtrackapi.zhuishuyun.com/api/qappuser/register';
-        $response =  $client->request('post', $url, ['form_params' => $params])->getBody()->getContents();
+        $url            = 'https://newtrackapi.zhuishuyun.com/api/qappuser/register';
+        $response       = $client->request('post', $url, ['form_params' => $params])->getBody()->getContents();
         myLog('qapp_user_register')->info($response);
-        $result =  json_decode($response);
+        $result = json_decode($response);
         if ($result) {
             if ($result->code != 0) {
                 myLog('qapp_user_register')->info($response);

+ 20 - 20
app/Jobs/QappTikTokUserCharge.php

@@ -54,13 +54,13 @@ class QappTikTokUserCharge implements ShouldQueue
      */
     public function __construct(int $uid, float $amount, string $pay_time, string $type, string $book_id, string $book_name, int $molecule = 1, int $denominator = 1)
     {
-        $this->uid = $uid;
-        $this->amount = $amount;
-        $this->pay_time = $pay_time;
-        $this->type = $type;
-        $this->book_id = $book_id;
-        $this->book_name = $book_name;
-        $this->molecule = $molecule;
+        $this->uid         = $uid;
+        $this->amount      = $amount;
+        $this->pay_time    = $pay_time;
+        $this->type        = $type;
+        $this->book_id     = $book_id;
+        $this->book_name   = $book_name;
+        $this->molecule    = $molecule;
         $this->denominator = $denominator;
     }
 
@@ -71,22 +71,22 @@ class QappTikTokUserCharge implements ShouldQueue
      */
     public function handle()
     {
-        $client = new Client();
-        $params = [
-            'uid' => $this->uid,
-            'amount' => $this->amount,
-            'pay_time' => $this->pay_time,
-            'type' => $this->type,
-            'book_id' => $this->book_id,
-            'book_name' => $this->book_name,
-            'molecule' => $this->molecule,
+        $client         = new Client();
+        $params         = [
+            'uid'         => $this->uid,
+            'amount'      => $this->amount,
+            'pay_time'    => $this->pay_time,
+            'type'        => $this->type,
+            'book_id'     => $this->book_id,
+            'book_name'   => $this->book_name,
+            'molecule'    => $this->molecule,
             'denominator' => $this->denominator,
-            'source' => 'zsy'
+            'source'      => 'zsy'
         ];
-        $params['sign'] = _sign($params,  SysConsts::TIKTOK_KEY);
-        $response =  $client->request('post', $this->url, ['form_params' => $params])->getBody()->getContents();
+        $params['sign'] = _sign($params, SysConsts::TIKTOK_KEY);
+        $response       = $client->request('post', $this->url, ['form_params' => $params])->getBody()->getContents();
         myLog('qapp_user_charge')->info($response);
-        $result =  json_decode($response);
+        $result = json_decode($response);
         if ($result) {
             if ($result->code != 0) {
                 myLog('qapp_user_charge')->info($response);

+ 4 - 0
config/audit.php

@@ -12,4 +12,8 @@ return [
         'brand'       => 'huawei',
         'codeVersion' => '0.0.2'
     ],
+    'com.app.kyy.qnxs' => [
+        'brand'       => 'huawei',
+        'codeVersion' => '0.0.2'
+    ],
 ];