Переглянути джерело

Merge branch 'kuaiyingyong' of iqiyoo:zhuishuyun_wap into kuaiyingyong

zz 4 роки тому
батько
коміт
8039cc6cc6

+ 1 - 1
app/Console/Commands/Push/PushTest.php

@@ -64,7 +64,7 @@ class PushTest extends Command
 
         $title   = '这是' . $name . '标题';
         $content = '这是' . $name . '内容,创建于' . date('Y-m-d H:i:s');
-        $url     = 'hap://app/com.app.kyy.xnyd/views/Reader?send_order_id=1643289&bid=vdqY7p15xnZQzK4VzzgmMD6wG2yr8BNX&chapter_id=4774851';
+        $url     = '/views/Reader?send_order_id=1643289&bid=vdqY7p15xnZQzK4VzzgmMD6wG2yr8BNX&chapter_id=4774851';
         var_dump('uid:' . $uid);
         var_dump('title:' . $title);
         var_dump('content:' . $content);

+ 1 - 1
app/Http/Controllers/QuickApp/User/UserController.php

@@ -339,7 +339,7 @@ class UserController extends BaseController
         $service = new UserTaskService($this->uid);
         $result  = $service->getTaskReward($id);
         if ($result == 1) {
-            return response()->success();
+            return response()->success(['is_sign' => true]);
         } else if ($result == -1) {
             return response()->error('REWARD_GOTTEN_ERROR');
         } else if ($result == 0) {

+ 3 - 3
app/Modules/Push/Services/PushService.php

@@ -30,14 +30,14 @@ class PushService
      */
     public static function setUserRegId($uid, string $regId, string $provider, string $package): bool
     {
-        myLog('push')->info('setUserRegId', compact('uid', 'regId', 'provider', 'package'));
-
         // push服务商(转小写)
         $provider = strtolower($provider);
-        if (empty($uid) || empty($regId) || empty($package) || empty($provider)) {
+        if (empty($uid) || empty($regId) || empty($package) || empty($provider) || $package !== 'com.app.kyy.xnyd') {
             return false;
         }
 
+        myLog('push')->info('setUserRegId', compact('uid', 'regId', 'provider', 'package'));
+
         // 获取缓存
         $userCacheRegId = PushCache::getUserPushRegId($uid);
         if ($regId === $userCacheRegId) {

+ 1 - 1
app/Modules/Trade/Pay/AliOrderArousePay.php

@@ -14,7 +14,7 @@ class AliOrderArousePay extends OrderArousePayAbstract
         $pay_merchant_id = (int) $data['pay_merchant_id'];
         $ali_param = [
             'body' => '小说阅读',
-            'subject' => '追书云',
+            'subject' => $this->getSubjectName($data['distribution_channel_id']),
             'out_trade_no' => $data['trade_no'],
             'timeout_express' => '90m',
             'total_amount' => $data['price'] / 100,

+ 8 - 0
app/Modules/Trade/Pay/OrderArousePayAbstract.php

@@ -3,6 +3,7 @@
 namespace App\Modules\Trade\Pay;
 
 use App\Modules\Subscribe\Models\Order;
+use App\Modules\User\Models\QappPackage;
 
 abstract class OrderArousePayAbstract
 {
@@ -50,4 +51,11 @@ abstract class OrderArousePayAbstract
         ];
         Order::firstOrCreate($params);
     }
+
+    protected function getSubjectName(int $channel_id)
+    {
+        $package = QappPackage::where('channel_id', $channel_id)->select('name')->first();
+        $name = $package ? $package->name : '';
+        return "搜索快应用({$name})继续阅读,投诉电话:0571-56680189";
+    }
 }

+ 1 - 1
app/Modules/Trade/Pay/WxOrderArousePay.php

@@ -19,7 +19,7 @@ class WxOrderArousePay extends OrderArousePayAbstract
                 'trade_type'     => $data['trade_type'], // 交易类型
                 'trade_no'     => $data['trade_no'], // 订单号
                 'price'        => $data['price'], // 订单金额,单位:分
-                'body'             => '快应用 小说', // 订单描述
+                'body'             => $this->getSubjectName($data['distribution_channel_id']), // 订单描述
                 'create_ip' => _getIp(), // 支付人的 IP
                 'remark'            =>  $pay_merchant_id
             ];

+ 0 - 1
app/Modules/Trade/Services/PayMerchantService.php

@@ -9,7 +9,6 @@
 
 namespace App\Modules\Trade\Services;
 
-use App\Modules\BaseService;
 use App\Modules\Trade\Models\PayMerchant;
 
 class PayMerchantService

+ 2 - 1
app/Modules/User/Models/QappPackage.php

@@ -10,6 +10,7 @@ class QappPackage extends Model
 
     protected $fillable =
     [
+        'name',
         'package',
         'channel_id',
         'company',
@@ -21,7 +22,7 @@ class QappPackage extends Model
 
     static function getPackage($channel_id)
     {
-        return self::where('channel_id',$channel_id)->first();
+        return self::where('channel_id', $channel_id)->first();
     }
 
     public static function getPackageByPackage($package)