|
|
@@ -5,6 +5,7 @@ namespace biz\shop\classes;
|
|
|
use biz\notice\classes\NoticeClass;
|
|
|
use bizHd\order\classes\OrderClass;
|
|
|
use bizHd\purchase\classes\PurchaseClass;
|
|
|
+use bizHd\work\classes\WorkClass;
|
|
|
use common\components\dict;
|
|
|
use linslin\yii2\curl;
|
|
|
use biz\base\classes\BaseClass;
|
|
|
@@ -14,6 +15,25 @@ class ShopExtClass extends BaseClass
|
|
|
|
|
|
public static $baseFile = '\biz\shop\models\ShopExt';
|
|
|
|
|
|
+ //美团有新的制作单
|
|
|
+ public static function newMtWork($shopExt, $order)
|
|
|
+ {
|
|
|
+ $alone = $shopExt->mtAlone ?? 0;
|
|
|
+ $id = $order->id ?? 0;
|
|
|
+ $work = WorkClass::getByCondition(['orderId' => $id], true);
|
|
|
+ if (empty($work)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $lbSn = $shopExt->makeLbSn ?? '';
|
|
|
+ if ($alone == 1) {
|
|
|
+ $lbSn = $shopExt->mtLbSn ?? '';
|
|
|
+ }
|
|
|
+ $sound = "您有新的美团制作单";
|
|
|
+ $url = "https://speaker.17laimai.cn/notify.php?id={$lbSn}&token=HK1626595800&version=3&message=" . $sound;
|
|
|
+ $curl = new curl\Curl();
|
|
|
+ $curl->get($url);
|
|
|
+ }
|
|
|
+
|
|
|
//花店采购供应商端播放声音
|
|
|
public static function hdCgGhsReport($orderSn)
|
|
|
{
|