|
|
@@ -22,11 +22,35 @@ class ShopExtClass extends BaseClass
|
|
|
$mtSn = $order->thirdSn ?? 0;
|
|
|
$sound = '美团' . $mtSn . '号单有修改,请注意';
|
|
|
}
|
|
|
- $lbSn = $order->fromType == 4 ? $shopExt->mtLbSn : $shopExt->makeLbSn;
|
|
|
- $lbVersion = $order->fromType == 4 ? $shopExt->mtLbVersion : $shopExt->makeLbVersion;
|
|
|
- $url = "https://speaker.17laimai.cn/notify.php?id={$lbSn}&token=HK1626595800&version={$lbVersion}&message=" . $sound;
|
|
|
- $curl = new curl\Curl();
|
|
|
- $curl->get($url);
|
|
|
+ $hasSh = 0;
|
|
|
+ $hasHs = 0;
|
|
|
+ $workList = WorkClass::getAllByCondition(['orderId' => $order->id], null, '*', null, true);
|
|
|
+ if (!empty($workList)) {
|
|
|
+ foreach ($workList as $work) {
|
|
|
+ if ($work->preNum > $work->num && $work->status == 0) {
|
|
|
+ $sh = $work->sh ?? 0;
|
|
|
+ if ($sh == 0) {
|
|
|
+ $hasHs = 1;
|
|
|
+ } else {
|
|
|
+ $hasSh = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ($hasHs == 1) {
|
|
|
+ $lbSn = $order->fromType == 4 ? $shopExt->mtLbSn : $shopExt->makeLbSn;
|
|
|
+ $lbVersion = $order->fromType == 4 ? $shopExt->mtLbVersion : $shopExt->makeLbVersion;
|
|
|
+ $url = "https://speaker.17laimai.cn/notify.php?id={$lbSn}&token=HK1626595800&version={$lbVersion}&message=" . $sound;
|
|
|
+ $curl = new curl\Curl();
|
|
|
+ $curl->get($url);
|
|
|
+ }
|
|
|
+ if ($hasSh == 1) {
|
|
|
+ $lbSn = $shopExt->lbSn ?? '';
|
|
|
+ $lbVersion = $shopExt->lbVersion;
|
|
|
+ $url = "https://speaker.17laimai.cn/notify.php?id={$lbSn}&token=HK1626595800&version={$lbVersion}&message=" . $sound;
|
|
|
+ $curl = new curl\Curl();
|
|
|
+ $curl->get($url);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public static function orderCancelRemind($shopExt, $order)
|