更新推送信息

This commit is contained in:
yaooo 2023-08-16 16:50:35 +08:00
parent e6d3e45905
commit 974b3b0af4

View File

@ -81,17 +81,19 @@ class JgPush
$merUserId = Merchant::where('mer_id', $order['mer_id'])->value('uid'); $merUserId = Merchant::where('mer_id', $order['mer_id'])->value('uid');
$jgRegisterId = User::where('uid', $merUserId)->value('jg_register_id'); $jgRegisterId = User::where('uid', $merUserId)->value('jg_register_id');
if (empty($jgRegisterId)) { if (empty($jgRegisterId)) {
Log::info("ORDER_CREATE 1");
break; break;
} }
Log::info("ORDER_CREATE ============= 您有新的订单111请注意查看。");
$this->addRegistrationId($jgRegisterId); $this->addRegistrationId($jgRegisterId);
$this->androidNotification('您有新的订单请注意查看111。', ['extras' => ['route' => $route, 'type' =>'ORDER_CREATE']]); $this->androidNotification('您有新的订单请注意查看111。', ['extras' => ['route' => $route, 'type' =>'ORDER_CREATE']]);
$this->iosNotification('您有新的订单请注意查看111。', ['extras' => ['route' => $route, 'type' =>'ORDER_CREATE']]); $this->iosNotification('您有新的订单请注意查看111。', ['extras' => ['route' => $route, 'type' =>'ORDER_CREATE']]);
$this->push->send(); $this->push->send();
Log::info("ORDER_CREATE ============= 您有新的订单111请注意查看。");
break; break;
case 'ORDER_PAY_SUCCESS': case 'ORDER_PAY_SUCCESS':
$order = app()->make(StoreOrderRepository::class)->get($data['id']); $order = app()->make(StoreOrderRepository::class)->get($data['id']);
if ($order->pay_type != StoreGroupOrder::PAY_TYPE_CREDIT_BUY) { if ($order->pay_type != StoreGroupOrder::PAY_TYPE_CREDIT_BUY) {
Log::info("ORDER_CREATE 2");
break; break;
} }
$route = "/pages/admin/orderDetail/index?id={$order['order_id']}&mer_id={$order['mer_id']}"; $route = "/pages/admin/orderDetail/index?id={$order['order_id']}&mer_id={$order['mer_id']}";
@ -100,11 +102,11 @@ class JgPush
if (empty($jgRegisterId)) { if (empty($jgRegisterId)) {
break; break;
} }
Log::info("ORDER_PAY_SUCCESS ============= 您有新的订单222请注意查看。");
$this->addRegistrationId($jgRegisterId); $this->addRegistrationId($jgRegisterId);
$this->androidNotification('您有新的订单请注意查看222。', ['extras' => ['route' => $route, 'type' =>'ORDER_PAY_SUCCESS']]); $this->androidNotification('您有新的订单请注意查看222。', ['extras' => ['route' => $route, 'type' =>'ORDER_PAY_SUCCESS']]);
$this->iosNotification('您有新的订单请注意查看222。', ['extras' => ['route' => $route, 'type' =>'ORDER_PAY_SUCCESS']]); $this->iosNotification('您有新的订单请注意查看222。', ['extras' => ['route' => $route, 'type' =>'ORDER_PAY_SUCCESS']]);
$this->push->send(); $this->push->send();
Log::info("ORDER_PAY_SUCCESS ============= 您有新的订单222请注意查看。");
break; break;
default: default:
break; break;