|
|
@@ -3,6 +3,8 @@
|
|
|
namespace ghs\controllers;
|
|
|
|
|
|
use biz\admin\classes\AdminClass;
|
|
|
+use biz\common\classes\GhsNotifyClass;
|
|
|
+use biz\common\classes\HdNotifyClass;
|
|
|
use biz\shop\classes\ShopClass;
|
|
|
use biz\sj\services\MerchantService;
|
|
|
use biz\wx\classes\WxMessageClass;
|
|
|
@@ -44,13 +46,8 @@ class TestController extends BaseController
|
|
|
public function actionRabbit()
|
|
|
{
|
|
|
try{
|
|
|
- $producer = Yii::$app->rabbitmq->getProducer('importDataProducer');
|
|
|
- $msg = serialize(['user_id' => rand(111, 999)]);
|
|
|
- $producer->publish($msg, 'ex1', 'route1');
|
|
|
-
|
|
|
- $producer = Yii::$app->rabbitmq->getProducer('notifyProducer');
|
|
|
- $msg = serialize(['type' => 'order_new', 'msg' => '你有新的订单']);
|
|
|
- $producer->publish($msg, 'notifyExchange', 'notifyRoute');
|
|
|
+ GhsNotifyClass::newOrderNotify(3414434);
|
|
|
+ HdNotifyClass::newCgNotify(3456923);
|
|
|
}catch (\Exception $e){
|
|
|
$msg = $e->getMessage();
|
|
|
noticeUtil::push($msg, '15280215347');
|