|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace console\controllers;
|
|
|
|
|
|
+use bizHd\purchase\classes\PurchaseClass;
|
|
|
use bizHd\shop\classes\ShopClass;
|
|
|
use biz\wx\classes\WxMessageClass;
|
|
|
use yii\console\Controller;
|
|
|
@@ -32,4 +33,25 @@ class MqController extends Controller
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //供货商开单通知花店 ssh 20231129
|
|
|
+ public function actionGhsKdNoticeHd()
|
|
|
+ {
|
|
|
+ $noticeKey = "ghsKdNoticeHd";
|
|
|
+ while ($count = Yii::$app->redis->executeCommand('LLEN', [$noticeKey])) {
|
|
|
+ $json = Yii::$app->redis->executeCommand('RPOP', [$noticeKey]);
|
|
|
+ if (!empty($json)) {
|
|
|
+ $arr = json_decode($json, true);
|
|
|
+ $id = $arr['id'] ?? 0;
|
|
|
+ if (!empty($id)) {
|
|
|
+ $cg = PurchaseClass::getById($id, true);
|
|
|
+ $shopId = $cg->shopId ?? 0;
|
|
|
+ $shop = ShopClass::getById($shopId, true);
|
|
|
+ if (!empty($shop)) {
|
|
|
+ WxMessageClass::hdNewCgOrderInform($shop, $cg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|