diff --git a/app/Amqp/Consumer/SendStationMessageConsumer.php b/app/Amqp/Consumer/SendStationMessageConsumer.php index 0bd7c5c..4a0efe2 100644 --- a/app/Amqp/Consumer/SendStationMessageConsumer.php +++ b/app/Amqp/Consumer/SendStationMessageConsumer.php @@ -199,6 +199,10 @@ class SendStationMessageConsumer extends ConsumerMessage $notice_data['notice_system_type'] = $push_data['notice_system_type'] ; } + if (isset($push_data['inquiry_type'])){ + $notice_data['inquiry_type'] = $push_data['inquiry_type'] ; + } + $notice_data['read_status'] = 0; if (isset($push_data['from_name'])){ diff --git a/app/Command/getProductCommand.php b/app/Command/getProductCommand.php index b861f10..88fbe71 100644 --- a/app/Command/getProductCommand.php +++ b/app/Command/getProductCommand.php @@ -11,6 +11,7 @@ use Extend\Prescription\Prescription; use Hyperf\Command\Command as HyperfCommand; use Hyperf\Command\Annotation\Command; use Hyperf\DbConnection\Db; +use Hyperf\Utils\Coroutine\Concurrent; use Psr\Container\ContainerInterface; use Symfony\Component\Console\Input\InputArgument; @@ -40,12 +41,16 @@ class getProductCommand extends HyperfCommand $prescription = new Prescription(); $page = 1; - $page_size = 10; - $result = $prescription->getProd(1, 10); + $page_size = 100; + $result = $prescription->getProd(1, 100); if (!empty($result['rows'])){ + $concurrent = new Concurrent(10); + foreach ($result['rows'] as $item) { - // 执行入库 - $this->handleData($item); + $concurrent->create(function () use($item) { + // 执行入库 + $this->handleData($item); + }); } $count = ceil($result['count'] / $page * $page_size); @@ -54,8 +59,10 @@ class getProductCommand extends HyperfCommand for ($i = 2; $i < $count; $i++) { $result = $prescription->getProd($i, $page_size); foreach ($result['rows'] as $item) { - // 执行入库 - $this->handleData($item); + $concurrent->create(function () use($item) { + // 执行入库 + $this->handleData($item); + }); } } } diff --git a/app/Controller/TestController.php b/app/Controller/TestController.php index f01f2e3..40a6c2e 100644 --- a/app/Controller/TestController.php +++ b/app/Controller/TestController.php @@ -35,6 +35,7 @@ use Extend\RegulatoryPlatform\regulatoryPlatform; use Hyperf\Amqp\Producer; use Hyperf\DbConnection\Db; use Hyperf\Utils\ApplicationContext; +use Hyperf\Utils\Coroutine\Concurrent; use Imagick; use Intervention\Image\ImageManager; use Spatie\PdfToImage\Pdf; diff --git a/app/Model/OrderInquiry.php b/app/Model/OrderInquiry.php index dd0ca8c..afc2a2a 100644 --- a/app/Model/OrderInquiry.php +++ b/app/Model/OrderInquiry.php @@ -351,7 +351,7 @@ class OrderInquiry extends Model { $raw = self::where($params) ->whereIn('inquiry_status',$inquiry_status_params) - ->orderBy('created_at','desc') + ->orderBy('complete_time','desc') ->paginate($per_page, $fields, "page", $page); $data = array();