|
|
@@ -46,16 +46,21 @@ class TestController extends BaseController
|
|
|
// ./yii test/rabbit 0
|
|
|
public function actionRabbit()
|
|
|
{
|
|
|
- $get = Yii::$app->request->get();
|
|
|
- $id = $get['id'] ?? 0;
|
|
|
- $event = '跑腿已经取消了' . rand(1, 999);
|
|
|
- if ($id == 0) {
|
|
|
- $orderId = 5231;
|
|
|
- GhsNotifyClass::ptErrorNotify($orderId, $event);
|
|
|
- } else {
|
|
|
- $orderId = 525111;
|
|
|
- HdNotifyClass::ptErrorNotify($orderId, $event);
|
|
|
- }
|
|
|
+// $get = Yii::$app->request->get();
|
|
|
+// $id = $get['id'] ?? 0;
|
|
|
+// $event = '跑腿已经取消了' . rand(1, 999);
|
|
|
+// if ($id == 0) {
|
|
|
+// $orderId = 5231;
|
|
|
+// GhsNotifyClass::ptErrorNotify($orderId, $event);
|
|
|
+// } else {
|
|
|
+// $orderId = 525111;
|
|
|
+// HdNotifyClass::ptErrorNotify($orderId, $event);
|
|
|
+// }
|
|
|
+
|
|
|
+ $producer = Yii::$app->rabbitmq->getProducer('customProducer');
|
|
|
+ $msg = serialize(['type' => 'pull_custom_from_other_shop', 'toShopId' => 7609, 'fromShopId' => 33904]);
|
|
|
+ $producer->publish($msg, 'customExchange', 'customRoute', ['delivery_mode' => 2, 'content_type' => 'application/octet-stream']);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public function actionFx()
|