Commit 2faa9bc6 by duwenjun

队列

parent 0885c14f
Showing with 8 additions and 3 deletions
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Http\Queue\RabbitQueueModel;
use App\Model\CommonModel; use App\Model\CommonModel;
use App\Model\InquiryItemsAssignModel; use App\Model\InquiryItemsAssignModel;
use App\Model\InquiryItemsReportModel; use App\Model\InquiryItemsReportModel;
...@@ -69,9 +70,13 @@ class ApiController extends Controller ...@@ -69,9 +70,13 @@ class ApiController extends Controller
public function ApiInquiryItemsClose($input, $id){ public function ApiInquiryItemsClose($input, $id){
$res = (new InquiryItemsModel())->inquiryItemsClose($input); $res = (new InquiryItemsModel())->inquiryItemsClose($input);
$url = Config('website.cloud_domain') . "/inner/inquiry/closeautoinquiry"; // 加入队列, 后续会关闭云芯询价
$http = new \GuzzleHttp\Client; $RabbitQueueModel = new RabbitQueueModel();
$response = $http->post($url, ["form_params" => ["inquiry_items_id" => $input['inquiry_items_id']]]); $queue_data = [
"queue_route_key" => '/inquiry/closeautoinquiry',
"inquiry_items_id" => $input['inquiry_items_id'],
];
$RabbitQueueModel->push("cloud_common_queue", json_encode($queue_data));
Export($res); Export($res);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment