From c4956205b4b90db0b84ef9e982d05b2de35f80f2 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Mon, 29 May 2023 14:06:38 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9config=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=AF=BB=E5=8F=96=EF=BC=8C=E5=8E=BB=E9=99=A4=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=8E=AF=E5=A2=83=E9=93=B6=E8=A1=8C=E5=8D=A1=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/UserDoctorService.php | 21 ++++++++++++--------- config/config.php | 1 + 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/Services/UserDoctorService.php b/app/Services/UserDoctorService.php index 5596271..b28f075 100644 --- a/app/Services/UserDoctorService.php +++ b/app/Services/UserDoctorService.php @@ -281,16 +281,19 @@ class UserDoctorService extends BaseService // 处理银行卡掩码 $bank_card_code_mask = Mask::maskBankCard($bank_card_code); - // 验证银行卡 - $BankCard = new BankCard(); + $app_env = config('app_env','dev'); + if ($app_env != "dev"){ + // 验证银行卡 + $BankCard = new BankCard(); - $params = array(); - $params['bankCardNo'] = $bank_card_code; - $params['name'] = $user_doctor_info['card_name']; - $params['idCardNo'] = $user_doctor_info['card_num']; - $res = $BankCard->checkBankCard($params); - if (!empty($res)){ - return fail(HttpEnumCode::HTTP_ERROR,$res); + $params = array(); + $params['bankCardNo'] = $bank_card_code; + $params['name'] = $user_doctor_info['card_name']; + $params['idCardNo'] = $user_doctor_info['card_num']; + $res = $BankCard->checkBankCard($params); + if (!empty($res)){ + return fail(HttpEnumCode::HTTP_ERROR,$res); + } } Db::beginTransaction(); diff --git a/config/config.php b/config/config.php index 3197055..abed1e8 100644 --- a/config/config.php +++ b/config/config.php @@ -11,6 +11,7 @@ declare(strict_types=1); */ use Hyperf\Contract\StdoutLoggerInterface; use Psr\Log\LogLevel; +use function Hyperf\Support\env; return [ 'app_name' => env('APP_NAME', 'gdxz'), From 10d02d51423bfc8b818010a7b24e0eeeeda213f3 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Mon, 29 May 2023 14:12:29 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9config=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.php | 1 - 1 file changed, 1 deletion(-) diff --git a/config/config.php b/config/config.php index abed1e8..3197055 100644 --- a/config/config.php +++ b/config/config.php @@ -11,7 +11,6 @@ declare(strict_types=1); */ use Hyperf\Contract\StdoutLoggerInterface; use Psr\Log\LogLevel; -use function Hyperf\Support\env; return [ 'app_name' => env('APP_NAME', 'gdxz'), From 0d0cc7ace1513d24efa03427732111fafe3ee25e Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Mon, 29 May 2023 14:17:31 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9config=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/autoload/databases.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/autoload/databases.php b/config/autoload/databases.php index b231787..33bb059 100644 --- a/config/autoload/databases.php +++ b/config/autoload/databases.php @@ -26,8 +26,8 @@ return [ 'pool' => [ 'min_connections' => 100, 'max_connections' => 300, - 'connect_timeout' => 15.0, - 'wait_timeout' => 10.0, + 'connect_timeout' => 10.0, + 'wait_timeout' => 5.0, 'heartbeat' => -1, 'max_idle_time' => (float) env('DB_MAX_IDLE_TIME', 60), ], From 447855e20cb5f085a266d3a7fc1151bf75888e67 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Mon, 29 May 2023 14:29:10 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9config=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/composer.json b/composer.json index d80a530..5c46563 100644 --- a/composer.json +++ b/composer.json @@ -95,5 +95,14 @@ "Composer\\Config::disableProcessTimeout", "php ./bin/hyperf.php start" ] + }, + "repositories": { + "proxy": { + "type": "composer", + "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy", + "only": [ + "hyperf/*" + ] + } } } From 873fee6ac0ebc71dd4df0179293ddca302f063cb Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Mon, 29 May 2023 16:12:53 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9composer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.lock | 166 +++++++++++++++++++++++++------------------------- 1 file changed, 83 insertions(+), 83 deletions(-) diff --git a/composer.lock b/composer.lock index 4f13e43..5b1651f 100644 --- a/composer.lock +++ b/composer.lock @@ -1362,8 +1362,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/async-queue/v3.0.18", - "reference": "76ea152cb74d72318e2420fd54e632c7d14ab65a", - "shasum": "76ea152cb74d72318e2420fd54e632c7d14ab65a" + "reference": "c30814944d5f8f3b42f0104a14578ccb97ba0277", + "shasum": "c30814944d5f8f3b42f0104a14578ccb97ba0277" }, "require": { "hyperf/codec": "~3.0.0", @@ -1423,8 +1423,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/cache/v3.0.18", - "reference": "279e0347cb06b0ebe1cca8c3870da544f9c5984b", - "shasum": "279e0347cb06b0ebe1cca8c3870da544f9c5984b" + "reference": "9f78ce5a4c2039081112b462a13f06b4c80c8eb9", + "shasum": "9f78ce5a4c2039081112b462a13f06b4c80c8eb9" }, "require": { "hyperf/codec": "~3.0.0", @@ -1481,8 +1481,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/code-parser/v3.0.18", - "reference": "cd347a94a26f72ec62651733c2b15d32adafc403", - "shasum": "cd347a94a26f72ec62651733c2b15d32adafc403" + "reference": "3ebddf735c12a8d59eb6fd0d0447cf39530bd7da", + "shasum": "3ebddf735c12a8d59eb6fd0d0447cf39530bd7da" }, "require": { "hyperf/collection": "~3.0.0", @@ -1533,8 +1533,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/codec/v3.0.1", - "reference": "56c0ddec38ba317a15113cb5572e9288c9171adb", - "shasum": "56c0ddec38ba317a15113cb5572e9288c9171adb" + "reference": "8b9684d8e5c84c6c975d7b9cac4f1494361379a2", + "shasum": "8b9684d8e5c84c6c975d7b9cac4f1494361379a2" }, "require": { "ext-json": "*", @@ -1581,8 +1581,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/collection/v3.0.21", - "reference": "373715bf15cf6b229be62b5601a5c16bd9864c8f", - "shasum": "373715bf15cf6b229be62b5601a5c16bd9864c8f" + "reference": "39638c022cb93010c4ef4a1d684205a0150a5d64", + "shasum": "39638c022cb93010c4ef4a1d684205a0150a5d64" }, "require": { "hyperf/contract": "~3.0.0", @@ -1631,8 +1631,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/command/v3.0.18", - "reference": "d153d3e3b26aa16a285ec78a5e3e71a59288ac1f", - "shasum": "d153d3e3b26aa16a285ec78a5e3e71a59288ac1f" + "reference": "c81bf578aad2ff6110ae578cf02e7b2f1a524d02", + "shasum": "c81bf578aad2ff6110ae578cf02e7b2f1a524d02" }, "require": { "hyperf/support": "~3.0.0", @@ -1677,8 +1677,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/conditionable/v3.0.0", - "reference": "b06dbeaeff3e73460164be9329e728aa6ad0a2a9", - "shasum": "b06dbeaeff3e73460164be9329e728aa6ad0a2a9" + "reference": "5a4bc369949586c131352c29a6e57a737d235126", + "shasum": "5a4bc369949586c131352c29a6e57a737d235126" }, "require": { "php": ">=7.4" @@ -1722,8 +1722,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/config/v3.0.20", - "reference": "7838dde1bfaf7b2a8939db057c029138caa3f999", - "shasum": "7838dde1bfaf7b2a8939db057c029138caa3f999" + "reference": "03ff9c294efa60b7913a0dbed3be7bad4742cc83", + "shasum": "03ff9c294efa60b7913a0dbed3be7bad4742cc83" }, "require": { "hyperf/collection": "~3.0.0", @@ -1786,8 +1786,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/constants/v3.0.18", - "reference": "4f7c2c4c4d7a3ed9ef04501193f65da1031ee404", - "shasum": "4f7c2c4c4d7a3ed9ef04501193f65da1031ee404" + "reference": "396c71c34f5791bed5fa46991bb208804110da12", + "shasum": "396c71c34f5791bed5fa46991bb208804110da12" }, "require": { "hyperf/di": "~3.0.0", @@ -1839,8 +1839,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/context/v3.0.18", - "reference": "0638f67630002a645d2ee279f05be4f6be293f50", - "shasum": "0638f67630002a645d2ee279f05be4f6be293f50" + "reference": "05329e81a18fdfaaff9d68c937ffff2bb2ce8f7f", + "shasum": "05329e81a18fdfaaff9d68c937ffff2bb2ce8f7f" }, "require": { "hyperf/engine": "^1.2|^2.0", @@ -1885,8 +1885,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/contract/v3.0.10", - "reference": "c949a60256b71b8ce2c4cf17982a970f6e0500d4", - "shasum": "c949a60256b71b8ce2c4cf17982a970f6e0500d4" + "reference": "8574e6d25fba72b7b56a62501f8d91a849af2b24", + "shasum": "8574e6d25fba72b7b56a62501f8d91a849af2b24" }, "require": { "php": ">=8.0" @@ -1920,12 +1920,12 @@ }, { "name": "hyperf/coordinator", - "version": "v3.0.18", + "version": "v3.0.22", "dist": { "type": "zip", - "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/coordinator/v3.0.18", - "reference": "baff70859d3a777ecbcacf70c975d4ccee415e2d", - "shasum": "baff70859d3a777ecbcacf70c975d4ccee415e2d" + "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/coordinator/v3.0.22", + "reference": "6bf47be908593f292017bda90ca3c8f9c1ce4013", + "shasum": "6bf47be908593f292017bda90ca3c8f9c1ce4013" }, "require": { "hyperf/engine": "^1.2|^2.0", @@ -1970,8 +1970,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/coroutine/v3.0.16", - "reference": "74e6d5ad3bf10bfb9a62a921672a7221b37059d6", - "shasum": "74e6d5ad3bf10bfb9a62a921672a7221b37059d6" + "reference": "e4429e17dcbd1542dc3b2a67863e08164f667061", + "shasum": "e4429e17dcbd1542dc3b2a67863e08164f667061" }, "require": { "hyperf/context": "~3.0.0", @@ -2068,12 +2068,12 @@ }, { "name": "hyperf/database", - "version": "v3.0.21", + "version": "v3.0.22", "dist": { "type": "zip", - "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/database/v3.0.21", - "reference": "d43d90e65331d7a35d7a347d6adbb62bc475aa91", - "shasum": "d43d90e65331d7a35d7a347d6adbb62bc475aa91" + "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/database/v3.0.22", + "reference": "02878a5932edae45d97ae236fc2931d596403779", + "shasum": "02878a5932edae45d97ae236fc2931d596403779" }, "require": { "hyperf/code-parser": "~3.0.0", @@ -2130,8 +2130,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/db-connection/v3.0.18", - "reference": "ad6fe69823a5114f126db4672bfeac7202cbe780", - "shasum": "ad6fe69823a5114f126db4672bfeac7202cbe780" + "reference": "fd38368cac80e3efccd16b7d8ddb951dcc8a2983", + "shasum": "fd38368cac80e3efccd16b7d8ddb951dcc8a2983" }, "require": { "hyperf/database": "~3.0.0", @@ -2186,8 +2186,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/di/v3.0.18", - "reference": "2b436bca986b15ea2c619a259c78c18bb9e76f35", - "shasum": "2b436bca986b15ea2c619a259c78c18bb9e76f35" + "reference": "f31f4f398c6f0a33a47e8ed6cd7789f65e432d79", + "shasum": "f31f4f398c6f0a33a47e8ed6cd7789f65e432d79" }, "require": { "doctrine/instantiator": "^1.0", @@ -2248,8 +2248,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/dispatcher/v3.0.16", - "reference": "6c1d4943a6ca6f786ce86891d9df867822e6d0e2", - "shasum": "6c1d4943a6ca6f786ce86891d9df867822e6d0e2" + "reference": "f6eb0275707653c2c6bb457b3a0840d59d7c0990", + "shasum": "f6eb0275707653c2c6bb457b3a0840d59d7c0990" }, "require": { "hyperf/contract": "~3.0.0", @@ -2353,8 +2353,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/event/v3.0.0", - "reference": "92be7f636ad0e040351c47cdf46bb650de56af4e", - "shasum": "92be7f636ad0e040351c47cdf46bb650de56af4e" + "reference": "68cc8ad51e3171d880932f546122e45b6e424540", + "shasum": "68cc8ad51e3171d880932f546122e45b6e424540" }, "require": { "hyperf/contract": "~3.0.0", @@ -2406,8 +2406,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/exception-handler/v3.0.18", - "reference": "44e357581bd8781a98a4958cbd68a3994d07c780", - "shasum": "44e357581bd8781a98a4958cbd68a3994d07c780" + "reference": "15e97d85d6c8e4ce4d0986f1053429adbcdef7b2", + "shasum": "15e97d85d6c8e4ce4d0986f1053429adbcdef7b2" }, "require": { "hyperf/contract": "~3.0.0", @@ -2459,8 +2459,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/framework/v3.0.18", - "reference": "34add1d544771e9d8c40d64c07d1fea497b6b9da", - "shasum": "34add1d544771e9d8c40d64c07d1fea497b6b9da" + "reference": "1eb181950f889712c0a82776a7010f6c74bb3ea5", + "shasum": "1eb181950f889712c0a82776a7010f6c74bb3ea5" }, "require": { "fig/http-message-util": "^1.1.2", @@ -2523,8 +2523,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/guzzle/v3.0.18", - "reference": "acb156755030b43934148962fc695f80e4ca9364", - "shasum": "acb156755030b43934148962fc695f80e4ca9364" + "reference": "32ba44e75a5ec3dd1c72c1158ccedb312b62750a", + "shasum": "32ba44e75a5ec3dd1c72c1158ccedb312b62750a" }, "require": { "guzzlehttp/guzzle": "^6.3|^7.0", @@ -2572,8 +2572,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/http-message/v3.0.18", - "reference": "e82c884c36da2039662e371ca7e65ce56a88439c", - "shasum": "e82c884c36da2039662e371ca7e65ce56a88439c" + "reference": "4bc8ac220338fe2ee3d0f369019b593820a2ffb7", + "shasum": "4bc8ac220338fe2ee3d0f369019b593820a2ffb7" }, "require": { "hyperf/codec": "~3.0.0", @@ -2623,8 +2623,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/http-server/v3.0.21", - "reference": "99bc0349474977a2052d678b97bb28b35679e360", - "shasum": "99bc0349474977a2052d678b97bb28b35679e360" + "reference": "b58ce3e1920b5c62d4599c98e5c2024929a382cc", + "shasum": "b58ce3e1920b5c62d4599c98e5c2024929a382cc" }, "require": { "hyperf/codec": "~3.0.0", @@ -2690,8 +2690,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/logger/v3.0.20", - "reference": "7538fd9850221173eecad1ce7298c9dc96268f60", - "shasum": "7538fd9850221173eecad1ce7298c9dc96268f60" + "reference": "a2c7793d3bcb7aa6b69843f76ab280ec7ec909f9", + "shasum": "a2c7793d3bcb7aa6b69843f76ab280ec7ec909f9" }, "require": { "hyperf/contract": "~3.0.0", @@ -2743,8 +2743,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/macroable/v3.0.0", - "reference": "dec34b600f49d315e0fab1c5df9af60921bd8948", - "shasum": "dec34b600f49d315e0fab1c5df9af60921bd8948" + "reference": "a3c368e1c8332a2521c963cd02b7aae7869e5980", + "shasum": "a3c368e1c8332a2521c963cd02b7aae7869e5980" }, "require": { "php": ">=7.4" @@ -2832,8 +2832,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/model-listener/v3.0.18", - "reference": "04aa82319f313cf65271ec15af908bccc7e4e166", - "shasum": "04aa82319f313cf65271ec15af908bccc7e4e166" + "reference": "043a8903c006aab15b043dc25be76d2bcc0b2e95", + "shasum": "043a8903c006aab15b043dc25be76d2bcc0b2e95" }, "require": { "hyperf/contract": "~3.0.0", @@ -2938,8 +2938,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/pipeline/v3.0.16", - "reference": "f77f6d34bc9b7cb46ae12febabe08a7086e55bf0", - "shasum": "f77f6d34bc9b7cb46ae12febabe08a7086e55bf0" + "reference": "a5f5ad155c713df38fc3241a090e7fcb5a40bd59", + "shasum": "a5f5ad155c713df38fc3241a090e7fcb5a40bd59" }, "require": { "php": ">=8.0", @@ -2984,8 +2984,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/pool/v3.0.18", - "reference": "661fe6ae08d8c06d697518d4b590cb099625e73d", - "shasum": "661fe6ae08d8c06d697518d4b590cb099625e73d" + "reference": "8e3c09aeff5c3b97e763afb4547da7c3e4a3ff36", + "shasum": "8e3c09aeff5c3b97e763afb4547da7c3e4a3ff36" }, "require": { "hyperf/contract": "~3.0.0", @@ -3032,12 +3032,12 @@ }, { "name": "hyperf/process", - "version": "v3.0.18", + "version": "v3.0.22", "dist": { "type": "zip", - "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/process/v3.0.18", - "reference": "9893fc60acad08f653c5b2ea6819d8a9c3de1276", - "shasum": "9893fc60acad08f653c5b2ea6819d8a9c3de1276" + "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/process/v3.0.22", + "reference": "1fa386a3b7b55da08b61f5ecc8f8c7103b3df06d", + "shasum": "1fa386a3b7b55da08b61f5ecc8f8c7103b3df06d" }, "require": { "hyperf/contract": "~3.0.0", @@ -3093,8 +3093,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/redis/v3.0.21", - "reference": "b9eac4e83133aa217a98c5f79518d1a24836e1ec", - "shasum": "b9eac4e83133aa217a98c5f79518d1a24836e1ec" + "reference": "b9eab6b6ab98f182ea3684baedc3475204c7d121", + "shasum": "b9eab6b6ab98f182ea3684baedc3475204c7d121" }, "require": { "ext-redis": "*", @@ -3152,8 +3152,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/serializer/v3.0.0", - "reference": "adb721b8080c76c63cf3fca2cade510bc2c68b30", - "shasum": "adb721b8080c76c63cf3fca2cade510bc2c68b30" + "reference": "f55a94193ca59af15f089446e5dd05f742dff56f", + "shasum": "f55a94193ca59af15f089446e5dd05f742dff56f" }, "require": { "hyperf/contract": "~3.0.0", @@ -3206,8 +3206,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/server/v3.0.20", - "reference": "b24d8736ca4c1fcadb6d7cb066ec9eac76108220", - "shasum": "b24d8736ca4c1fcadb6d7cb066ec9eac76108220" + "reference": "97e59a8aa97fcd1302537eb08815f95dc0179c5e", + "shasum": "97e59a8aa97fcd1302537eb08815f95dc0179c5e" }, "require": { "hyperf/contract": "~3.0.0", @@ -3315,8 +3315,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/stringable/v3.0.18", - "reference": "0df890c78f02daf27a1d915162fc1c310696fd0b", - "shasum": "0df890c78f02daf27a1d915162fc1c310696fd0b" + "reference": "5acb246644b554d8a0833113afd4863956beaa84", + "shasum": "5acb246644b554d8a0833113afd4863956beaa84" }, "require": { "hyperf/collection": "~3.0.0", @@ -3372,8 +3372,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/support/v3.0.1", - "reference": "d96bf030d17df2fe585451543dd3ed21f99bddcf", - "shasum": "d96bf030d17df2fe585451543dd3ed21f99bddcf" + "reference": "a50821c84bd14f0ff92cc1164b33f5e465fbd0ba", + "shasum": "a50821c84bd14f0ff92cc1164b33f5e465fbd0ba" }, "require": { "hyperf/collection": "~3.0.0", @@ -3429,8 +3429,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/tappable/v3.0.0", - "reference": "9bf4ebb123a00f1f11b4952a6f3f5557a2602feb", - "shasum": "9bf4ebb123a00f1f11b4952a6f3f5557a2602feb" + "reference": "d79c8d7bcf128fbac299a89683647c5a1d61a13d", + "shasum": "d79c8d7bcf128fbac299a89683647c5a1d61a13d" }, "require": { "php": ">=7.4" @@ -3525,8 +3525,8 @@ "dist": { "type": "zip", "url": "https://hyperf-cloud-composer.pkg.coding.net/limingxinleo/proxy/archive/hyperf/utils/v3.0.18", - "reference": "8b0f73fa6fb8e309bcc06115c114f2a8efccdc2e", - "shasum": "8b0f73fa6fb8e309bcc06115c114f2a8efccdc2e" + "reference": "1f49d0638e4389d5d8b481029d44b0c5f9cfc4c0", + "shasum": "1f49d0638e4389d5d8b481029d44b0c5f9cfc4c0" }, "require": { "doctrine/inflector": "^2.0", @@ -3973,16 +3973,16 @@ }, { "name": "nesbot/carbon", - "version": "2.66.0", + "version": "2.67.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "496712849902241f04902033b0441b269effe001" + "reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8" }, "dist": { "type": "zip", - "url": "https://mirrors.huaweicloud.com/repository/php/nesbot/carbon/2.66.0/nesbot-carbon-2.66.0.zip", - "reference": "496712849902241f04902033b0441b269effe001", + "url": "https://mirrors.huaweicloud.com/repository/php/nesbot/carbon/2.67.0/nesbot-carbon-2.67.0.zip", + "reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8", "shasum": "" }, "require": { @@ -4065,7 +4065,7 @@ "type": "tidelift" } ], - "time": "2023-01-29T18:53:47+00:00" + "time": "2023-05-25T22:09:47+00:00" }, { "name": "nikic/fast-route", From e00fab60bb8230e39086ad0e039fab9524f73e40 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Tue, 30 May 2023 11:37:13 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=8E=A8=E9=80=81-=E5=8C=BB=E7=94=9F-?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E6=9C=89=E6=96=B0=E9=97=AE=E8=AF=8A=EF=BC=8C?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E8=B6=85=E6=97=B6=E6=9C=AA=E6=8E=A5=E8=AF=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssignDoctorDelayDirectConsumer.php | 3 + ...ncelUnInquiryOrdersDelayDirectConsumer.php | 6 +- app/Controller/CallBackController.php | 3 + app/Services/ImService.php | 46 +- app/Services/MessagePush.php | 427 +++++++++++------- app/Services/PatientOrderService.php | 3 + 6 files changed, 312 insertions(+), 176 deletions(-) diff --git a/app/Amqp/Consumer/AssignDoctorDelayDirectConsumer.php b/app/Amqp/Consumer/AssignDoctorDelayDirectConsumer.php index 09a095a..89dbf06 100644 --- a/app/Amqp/Consumer/AssignDoctorDelayDirectConsumer.php +++ b/app/Amqp/Consumer/AssignDoctorDelayDirectConsumer.php @@ -266,6 +266,9 @@ class AssignDoctorDelayDirectConsumer extends ConsumerMessage $imService = new ImService(); $imService->waitDoctorInquiry($order_inquiry,$user_doctor['user_id'],$order_inquiry['user_id']); + // 发送IM消息-横幅通知-医生有新问诊 + $imService->bannerNoticeNewInquiry($order_inquiry,$user_doctor['user_id']); + // 医生-医生有新问诊 站内、订阅失败发送短信 $MessagePush = new MessagePush($user_doctor['user_id'],$order_inquiry['order_inquiry_id']); $MessagePush->doctorHaveNewInquiry(); diff --git a/app/Amqp/Consumer/CancelUnInquiryOrdersDelayDirectConsumer.php b/app/Amqp/Consumer/CancelUnInquiryOrdersDelayDirectConsumer.php index 5627ec6..028219b 100644 --- a/app/Amqp/Consumer/CancelUnInquiryOrdersDelayDirectConsumer.php +++ b/app/Amqp/Consumer/CancelUnInquiryOrdersDelayDirectConsumer.php @@ -160,10 +160,14 @@ class CancelUnInquiryOrdersDelayDirectConsumer extends ConsumerMessage // 发送IM消息-问诊退款 $imService->inquiryRefund($order_inquiry,$user_doctor['user_id'],$order_inquiry['user_id']); - // 发送站内、订阅消息-医生未接诊 + // 发送站内、订阅消息-患者-医生未接诊 $MessagePush = new MessagePush($order_inquiry['user_id'],$order_inquiry['order_inquiry_id']); $MessagePush->patientNoInquiry(); + // 发送站内、订阅消息-医生-超时未接诊 + $MessagePush = new MessagePush($user_doctor['user_id'],$order_inquiry['order_inquiry_id']); + $MessagePush->doctorNoInquiry(); + if (!empty($order_inquiry['coupon_amount_total']) && $order_inquiry['coupon_amount_total'] > 0) { // 获取用户优惠卷信息 $params = array(); diff --git a/app/Controller/CallBackController.php b/app/Controller/CallBackController.php index 188ff6b..49ce394 100644 --- a/app/Controller/CallBackController.php +++ b/app/Controller/CallBackController.php @@ -170,6 +170,9 @@ class CallBackController extends AbstractController $imService = new ImService(); $imService->waitDoctorInquiry($order_inquiry, $user_doctor['user_id'], $order_inquiry['user_id']); + // 发送IM消息-横幅通知-医生有新问诊 + $imService->bannerNoticeNewInquiry($order_inquiry,$user_doctor['user_id']); + // 发送站内、订阅失败发送短信消息-医生有新问诊 $MessagePush = new MessagePush($user_doctor['user_id'], $order_inquiry['order_inquiry_id']); $MessagePush->doctorHaveNewInquiry(); diff --git a/app/Services/ImService.php b/app/Services/ImService.php index bc7a570..5150d94 100644 --- a/app/Services/ImService.php +++ b/app/Services/ImService.php @@ -552,7 +552,7 @@ class ImService extends BaseService * @param string $patient_user_id * @return void */ - public function pharmacistVerify(array|object $order_inquiry, string $order_prescription_id,string $product_name,string $doctor_user_id, string $patient_user_id): void + public function pharmacistVerify(array|object $order_inquiry, string $order_prescription_id, string $product_name, string $doctor_user_id, string $patient_user_id): void { try { // 发送消息 @@ -573,7 +573,7 @@ class ImService extends BaseService $message_content_data['data']['order_inquiry_id'] = (string)$order_inquiry['order_inquiry_id']; $message_content_data['data']['order_prescription_id'] = $order_prescription_id; $message_content_data['data']['product_name'] = $product_name ?: "药品"; - $message_content_data['data']['pharmacist_verify_time'] = date('Y-m-d H:i:s',time());; + $message_content_data['data']['pharmacist_verify_time'] = date('Y-m-d H:i:s', time());; $message_content = [ 'Data' => json_encode($message_content_data, JSON_UNESCAPED_UNICODE), @@ -619,4 +619,46 @@ class ImService extends BaseService throw new BusinessException($e->getMessage()); } } + + /** + * 横幅通知-医生有新问诊 + * @param array|object $order_inquiry + * @param string $doctor_user_id 用户id + * @return void + */ + public function bannerNoticeNewInquiry(array|object $order_inquiry, string $doctor_user_id): void + { + try { + // 发送消息 + $cloud_custom_data = array(); + $cloud_custom_data['order_inquiry_id'] = $order_inquiry['order_inquiry_id']; + $cloud_custom_data['is_system'] = 1; + $cloud_custom_data['inquiry_type'] = $order_inquiry['inquiry_type']; + $cloud_custom_data['message_rounds'] = 0; + $cloud_custom_data['patient_family_data']['patient_name'] = $order_inquiry['patient_name']; + $cloud_custom_data['patient_family_data']['patient_sex'] = $order_inquiry['patient_sex']; + $cloud_custom_data['patient_family_data']['patient_age'] = $order_inquiry['patient_age']; + + if ($order_inquiry['inquiry_type'] == 1 || $order_inquiry['inquiry_type'] == 3) { + // 专家、公益 + $desc = "24小时内未接诊,平台将自动取消问诊"; + }else{ + // 快速、购药 + $desc = "5分钟内未接诊,平台将自动取消问诊"; + } + + // 消息内容 医生-患者 + $message_content_data = array(); + $message_content_data['message_type'] = 1; + $message_content_data['title'] = "您有一个新的问诊服务等待接诊"; + $message_content_data['desc'] = $desc; + $message_content = [ + 'Data' => json_encode($message_content_data, JSON_UNESCAPED_UNICODE), + ]; + + $this->sendMessage("", $doctor_user_id, $message_content, "TIMCustomElem", $cloud_custom_data); + } catch (\Exception $e) { + throw new BusinessException($e->getMessage()); + } + } } \ No newline at end of file diff --git a/app/Services/MessagePush.php b/app/Services/MessagePush.php index b20b48f..f81d172 100644 --- a/app/Services/MessagePush.php +++ b/app/Services/MessagePush.php @@ -96,7 +96,7 @@ class MessagePush extends BaseService $link_params = array(); $link_params['order_inquiry_id'] = $this->order_inquiry['order_inquiry_id']; - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $data['button_type'] = 4; // 订单详情 @@ -104,7 +104,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:" . json_encode($data, JSON_UNESCAPED_UNICODE)); } // 订阅 @@ -112,7 +112,7 @@ class MessagePush extends BaseService $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); - if (empty($user_doctor)){ + if (empty($user_doctor)) { Log::getInstance("MessagePush")->error("错误:医生数据为空"); return; } @@ -137,7 +137,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:" . $e->getMessage()); @@ -156,7 +156,7 @@ class MessagePush extends BaseService try { // 订阅 // 获取医生数据 - if (!empty($this->order_inquiry['doctor_id'])){ + if (!empty($this->order_inquiry['doctor_id'])) { $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); @@ -182,7 +182,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:" . $e->getMessage()); @@ -201,7 +201,7 @@ class MessagePush extends BaseService { try { // 只有订阅消息 - if ($this->push_type == 2){ + if ($this->push_type == 2) { $sub_data = array(); $sub_data['push_user_id'] = $this->user['user_id']; $sub_data['wx_template_id'] = "jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM"; // 患者回复通知 @@ -218,7 +218,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } } catch (\Exception $e) { @@ -242,8 +242,8 @@ class MessagePush extends BaseService $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); - if (empty($user_doctor)){ - Log::getInstance("MessagePush")->error("错误:医生数据为空" ); + if (empty($user_doctor)) { + Log::getInstance("MessagePush")->error("错误:医生数据为空"); return; } @@ -251,8 +251,8 @@ class MessagePush extends BaseService $params = array(); $params['order_inquiry_id'] = $this->order_inquiry['order_inquiry_id']; $order_inquiry_case = OrderInquiryCase::getOne($params); - if (empty($order_inquiry_case)){ - Log::getInstance("MessagePush")->error("错误:病例数据为空" ); + if (empty($order_inquiry_case)) { + Log::getInstance("MessagePush")->error("错误:病例数据为空"); return; } @@ -282,7 +282,7 @@ class MessagePush extends BaseService $link_params['inquiry_type'] = $this->order_inquiry['inquiry_type']; $link_params['doctor_user_id'] = $user_doctor['user_id']; $link_params['patient_user_id'] = $this->order_inquiry['user_id']; - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $data['button_type'] = 6; // 问诊详情 @@ -290,15 +290,15 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } // 问诊内容-病情主诉 $disease_desc = $order_inquiry_case['disease_desc']; - if (!empty($disease_desc)){ - if (strlen($disease_desc) > 15){ - $disease_desc = mb_substr($disease_desc,0,15); - if ($disease_desc){ + if (!empty($disease_desc)) { + if (strlen($disease_desc) > 15) { + $disease_desc = mb_substr($disease_desc, 0, 15); + if ($disease_desc) { $disease_desc = $disease_desc . "..."; } } @@ -324,14 +324,14 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } // 短信 $duration = $system_inquiry_config['duration']; - if ($duration <= 0){ + if ($duration <= 0) { $duration = "不限制"; - }else{ + } else { $duration = $duration . "分钟"; } @@ -351,7 +351,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -372,7 +372,7 @@ class MessagePush extends BaseService $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); - if (empty($user_doctor)){ + if (empty($user_doctor)) { Log::getInstance("MessagePush")->error("错误:医生数据为空"); return; } @@ -381,8 +381,8 @@ class MessagePush extends BaseService $params = array(); $params['order_inquiry_id'] = $this->order_inquiry['order_inquiry_id']; $order_inquiry_case = OrderInquiryCase::getOne($params); - if (empty($order_inquiry_case)){ - Log::getInstance("MessagePush")->error("错误:病例数据为空" ); + if (empty($order_inquiry_case)) { + Log::getInstance("MessagePush")->error("错误:病例数据为空"); return; } @@ -407,21 +407,21 @@ class MessagePush extends BaseService $link_params['inquiry_type'] = $this->order_inquiry['inquiry_type']; $link_params['doctor_user_id'] = $user_doctor['user_id']; $link_params['patient_user_id'] = $this->order_inquiry['user_id']; - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $data['button_type'] = 4; // 订单详情 $message = new SendStationMessageProducer($data); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } // 问诊内容 $disease_desc = $order_inquiry_case['disease_desc']; - if (!empty($disease_desc)){ - $disease_desc = substr($disease_desc,0,15); - if ($disease_desc){ + if (!empty($disease_desc)) { + $disease_desc = substr($disease_desc, 0, 15); + if ($disease_desc) { $disease_desc = $disease_desc . "..."; } } @@ -445,7 +445,7 @@ class MessagePush extends BaseService $message = new SendSubMessageProducer($data); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -466,9 +466,9 @@ class MessagePush extends BaseService $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); - if (empty($user_doctor)){ + if (empty($user_doctor)) { Log::getInstance("MessagePush")->error("错误:医生数据为空"); - return ; + return; } // 站内 @@ -481,7 +481,7 @@ class MessagePush extends BaseService $order_prescription = OrderPrescription::getOne($params); if (empty($order_prescription)) { Log::getInstance("MessagePush")->error("错误:处方数据为空"); - return ; + return; } $data = array(); @@ -496,7 +496,7 @@ class MessagePush extends BaseService $link_params = array(); $link_params['order_prescription_id'] = $order_prescription['order_prescription_id']; - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $data['button_type'] = 5; // 查看处方 @@ -504,7 +504,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } // 短信 @@ -522,7 +522,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -543,9 +543,9 @@ class MessagePush extends BaseService $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); - if (empty($user_doctor)){ + if (empty($user_doctor)) { Log::getInstance("MessagePush")->error("错误:医生数据为空"); - return ; + return; } // 站内 @@ -563,7 +563,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -595,7 +595,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -627,7 +627,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -659,7 +659,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -677,14 +677,14 @@ class MessagePush extends BaseService public function refundInquirySuccess(int $cancel_reason): void { try { - if (!empty($this->order_inquiry['doctor_id'])){ + if (!empty($this->order_inquiry['doctor_id'])) { // 获取医生数据 $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); - if (empty($user_doctor)){ + if (empty($user_doctor)) { Log::getInstance("MessagePush")->error("错误:医生数据为空"); - return ; + return; } } @@ -697,39 +697,39 @@ class MessagePush extends BaseService $data['notice_system_type'] = 3; $data['from_name'] = "肝胆小秘书"; $data['notice_brief_title'] = "您的【{$inquiry_type_string}】服务,平台已退款成功,点击查看详情"; - if ($cancel_reason == 1){ + if ($cancel_reason == 1) { // 已支付未接诊 - if ($this->order_inquiry['inquiry_type'] == 1 || $this->order_inquiry['inquiry_type'] == 3){ + if ($this->order_inquiry['inquiry_type'] == 1 || $this->order_inquiry['inquiry_type'] == 3) { $data['notice_title'] = "您的【{$inquiry_type_string}】服务,平台已退款成功"; $data['notice_content'] = "因医生繁忙未及时接诊,平台会在24小时内退款至原账户,给您带来的不便敬请谅解。"; - }else{ + } else { $data['notice_title'] = "您咨询的【{$inquiry_type_string}】服务,平台已退款成功"; $data['notice_content'] = "因当前候诊人较多,您的咨询暂无医生接诊。平台会在24小时内退款至原账户,给您带来的不便敬请谅解。"; } - }elseif ($cancel_reason == 2){ + } elseif ($cancel_reason == 2) { // 已支付未成功分配医生 $data['notice_title'] = "您咨询的【{$inquiry_type_string}】服务,平台已退款成功"; $data['notice_content'] = "因当前候诊人较多,您的咨询暂无医生接诊。平台会在24小时内退款至原账户,给您带来的不便敬请谅解。"; - }elseif ($cancel_reason == 3){ + } elseif ($cancel_reason == 3) { // 已支付未接诊患者取消订单 $data['notice_title'] = "您的【{$inquiry_type_string}】服务已取消"; $data['notice_content'] = "您已成功取消当前服务,平台会在24小时内退款至原账户,感谢您的支持。"; - }else{ + } else { Log::getInstance("MessagePush")->error("错误:类型错误"); - return ; + return; } $data['link_type'] = 10;// 问诊订单详情 $link_params = array(); $link_params['order_inquiry_id'] = $this->order_inquiry['order_inquiry_id']; - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } // 短信 @@ -749,7 +749,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -771,9 +771,9 @@ class MessagePush extends BaseService $params = array(); $params['order_product_id'] = $order_product_id; $order_product = OrderProduct::getOne($params); - if (empty($order_product)){ + if (empty($order_product)) { Log::getInstance("MessagePush")->error("错误:药品订单数据为空"); - return ; + return; } $order_product = $order_product->toArray(); @@ -782,30 +782,30 @@ class MessagePush extends BaseService $params = array(); $params['order_product_id'] = $order_product_id; $order_product_item = OrderProductItem::getList($params); - if (empty($order_product_item)){ + if (empty($order_product_item)) { Log::getInstance("MessagePush")->error("错误:商品订单列表数据为空"); - return ; + return; } // 获取商品数据 $product_name_array = array(); - foreach ($order_product_item as $item){ + foreach ($order_product_item as $item) { $params = array(); $params['product_id'] = $item['product_id']; $product = Product::getOne($params); - if (empty($product)){ + if (empty($product)) { Log::getInstance("MessagePush")->error("错误:商品数据为空"); - return ; + return; } $product_name_array[] = $product['common_name']; } $product_name = ""; - if (!empty($product_name_array)){ - if (count($product_name_array) > 1){ - $product_name = implode('、',$product_name_array); - }else{ + if (!empty($product_name_array)) { + if (count($product_name_array) > 1) { + $product_name = implode('、', $product_name_array); + } else { $product_name = $product_name_array[0]; } } @@ -824,13 +824,13 @@ class MessagePush extends BaseService $link_params = array(); $link_params['order_product_id'] = $order_product_id; - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } // 订阅 @@ -859,7 +859,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } // 短信 @@ -879,7 +879,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -896,7 +896,7 @@ class MessagePush extends BaseService * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ - public function logistics(string $status,string $order_product_id): void + public function logistics(string $status, string $order_product_id): void { try { // 站内 @@ -914,13 +914,13 @@ class MessagePush extends BaseService $link_params = array(); $link_params['order_product_id'] = $order_product_id; - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -942,9 +942,9 @@ class MessagePush extends BaseService $params = array(); $params['order_product_id'] = $order_product_id; $order_product = OrderProduct::getOne($params); - if (empty($order_product)){ + if (empty($order_product)) { Log::getInstance("MessagePush")->error("错误:药品订单数据为空"); - return ; + return; } $order_product = $order_product->toArray(); @@ -953,30 +953,30 @@ class MessagePush extends BaseService $params = array(); $params['order_product_id'] = $order_product_id; $order_product_item = OrderProductItem::getList($params); - if (empty($order_product_item)){ + if (empty($order_product_item)) { Log::getInstance("MessagePush")->error("错误:商品订单列表数据为空"); - return ; + return; } // 获取商品数据 $product_name_array = array(); - foreach ($order_product_item as $item){ + foreach ($order_product_item as $item) { $params = array(); $params['product_id'] = $item['product_id']; $product = Product::getOne($params); - if (empty($product)){ + if (empty($product)) { Log::getInstance("MessagePush")->error("错误:商品数据为空"); - return ; + return; } $product_name_array[] = $product['common_name']; } $product_name = ""; - if (!empty($product_name_array)){ - if (count($product_name_array) > 1){ - $product_name = implode('、',$product_name_array); - }else{ + if (!empty($product_name_array)) { + if (count($product_name_array) > 1) { + $product_name = implode('、', $product_name_array); + } else { $product_name = $product_name_array[0]; } } @@ -1018,7 +1018,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -1058,7 +1058,7 @@ class MessagePush extends BaseService $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); - if (empty($user_doctor)){ + if (empty($user_doctor)) { Log::getInstance("MessagePush")->error("错误:医生数据为空"); return; } @@ -1067,7 +1067,7 @@ class MessagePush extends BaseService $params = array(); $params['order_inquiry_id'] = $this->order_inquiry['order_inquiry_id']; $order_inquiry_case = OrderInquiryCase::getOne($params); - if (empty($order_inquiry_case)){ + if (empty($order_inquiry_case)) { Log::getInstance("MessagePush")->error("错误:病例数据为空"); return; } @@ -1088,29 +1088,37 @@ class MessagePush extends BaseService $link_params['inquiry_type'] = $this->order_inquiry['inquiry_type']; $link_params['doctor_user_id'] = $user_doctor['user_id']; $link_params['patient_user_id'] = $this->order_inquiry['user_id']; - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } // 订阅 - $inquiry_type = inquiryTypeToString($this->order_inquiry['inquiry_type']); // 问诊内容-病情主诉 $disease_desc = $order_inquiry_case['disease_desc']; - if (!empty($disease_desc)){ - if (strlen($disease_desc) > 15){ - $disease_desc = mb_substr($disease_desc,0,15); - if ($disease_desc){ + if (!empty($disease_desc)) { + if (strlen($disease_desc) > 15) { + $disease_desc = mb_substr($disease_desc, 0, 15); + if ($disease_desc) { $disease_desc = $disease_desc . "..."; } } } + if ($this->order_inquiry['inquiry_type'] == 1 || $this->order_inquiry['inquiry_type'] == 3) { + // 专家、公益 + $thing6 = "【" . inquiryTypeToString($this->order_inquiry['inquiry_type']) . "】" . ":24小时内未接诊,平台将自动取消问诊"; + } else { + // 快速、购药 + $thing6 = "【" . inquiryTypeToString($this->order_inquiry['inquiry_type']) . "】" . ":5分钟内未接诊,平台将自动取消问诊"; + } + + $sub_data = array(); $sub_data['push_user_id'] = $this->user['user_id']; $sub_data['wx_template_id'] = "G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc";//咨询提醒 @@ -1122,7 +1130,7 @@ class MessagePush extends BaseService "thing4" => (string)$disease_desc,// 病情描述 - "thing6" => "24小时内未接诊,平台将自动取消问诊",// 提示说明 + "thing6" => $thing6,// 提示说明 "thing5" => "",// 咨询内容 @@ -1147,7 +1155,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入订阅推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入订阅推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -1168,7 +1176,7 @@ class MessagePush extends BaseService $params = array(); $params['order_inquiry_id'] = $this->order_inquiry['order_inquiry_id']; $order_inquiry_case = OrderInquiryCase::getOne($params); - if (empty($order_inquiry_case)){ + if (empty($order_inquiry_case)) { throw new BusinessException("加入推送队列失败:问诊病例为空"); } @@ -1189,13 +1197,13 @@ class MessagePush extends BaseService $link_params['inquiry_type'] = $this->order_inquiry['inquiry_type']; $link_params['doctor_user_id'] = $this->user['user_id']; $link_params['patient_user_id'] = $this->order_inquiry['user_id']; - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } elseif ($this->push_type == 2) { // 订阅 @@ -1210,7 +1218,7 @@ class MessagePush extends BaseService "name2" => $this->order_inquiry['patient_name'],// 患者姓名 - "thing4" => mb_substr($order_inquiry_case['disease_desc'],0,18),// 病情描述 + "thing4" => mb_substr($order_inquiry_case['disease_desc'], 0, 18),// 病情描述 "thing6" => "24小时内未接诊,平台将自动取消问诊。",// 提示说明 @@ -1238,7 +1246,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } @@ -1264,9 +1272,9 @@ class MessagePush extends BaseService $params = array(); $params['order_inquiry_id'] = $this->order_inquiry['order_inquiry_id']; $order_inquiry_case = OrderInquiryCase::getOne($params); - if (empty($order_inquiry_case)){ - Log::getInstance("MessagePush")->error("错误:问诊病例为空" ); - return ; + if (empty($order_inquiry_case)) { + Log::getInstance("MessagePush")->error("错误:问诊病例为空"); + return; } // 站内 @@ -1285,13 +1293,13 @@ class MessagePush extends BaseService $link_params['order_inquiry_id'] = $this->order_inquiry['order_inquiry_id']; $link_params['inquiry_type'] = $this->order_inquiry['inquiry_type']; $link_params['patient_user_id'] = $this->order_inquiry['user_id']; - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); @@ -1315,8 +1323,8 @@ class MessagePush extends BaseService $params['pharmacist_audit_status'] = 1; $order_prescription = OrderPrescription::getOne($params); if (empty($order_prescription)) { - Log::getInstance("MessagePush")->error("错误:处方数据为空" ); - return ; + Log::getInstance("MessagePush")->error("错误:处方数据为空"); + return; } // 站内 @@ -1335,13 +1343,13 @@ class MessagePush extends BaseService $link_params['inquiry_type'] = $this->order_inquiry['inquiry_type']; $link_params['doctor_user_id'] = $this->user['user_id']; $link_params['patient_user_id'] = $this->order_inquiry['user_id']; - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } // 订阅 @@ -1375,10 +1383,10 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { - Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } @@ -1398,8 +1406,8 @@ class MessagePush extends BaseService $params['order_prescription_id'] = $order_prescription_id; $order_prescription = OrderPrescription::getOne($params); if (empty($order_prescription)) { - Log::getInstance("MessagePush")->error("错误:处方数据为空" ); - return ; + Log::getInstance("MessagePush")->error("错误:处方数据为空"); + return; } // 订阅 @@ -1410,7 +1418,7 @@ class MessagePush extends BaseService $sub_data['params']['data'] = [ "phrase1" => "审方不通过",// 审核结果 "thing2" => (string)$order_prescription['pharmacist_fail_reason'],// 原因 - "date3" => date('Y-m-d',time()),// 审核时间 + "date3" => date('Y-m-d', time()),// 审核时间 "thing4" => "建议您提醒患者,稍后重新发起问诊申请开方",// 提示说明 ]; @@ -1433,7 +1441,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . $e->getMessage()); @@ -1466,7 +1474,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } } catch (\Exception $e) { @@ -1502,7 +1510,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } } catch (\Exception $e) { @@ -1536,7 +1544,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } elseif ($this->push_type == 2) { // 订阅 @@ -1544,7 +1552,7 @@ class MessagePush extends BaseService $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); - if (empty($user_doctor)){ + if (empty($user_doctor)) { throw new BusinessException("加入推送队列失败:医生数据为空"); } @@ -1581,7 +1589,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } } catch (\Exception $e) { @@ -1617,7 +1625,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } elseif ($this->push_type == 2) { // 订阅 @@ -1625,7 +1633,7 @@ class MessagePush extends BaseService $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); - if (empty($user_doctor)){ + if (empty($user_doctor)) { throw new BusinessException("加入推送队列失败:医生数据为空"); } @@ -1657,7 +1665,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } } catch (\Exception $e) { @@ -1681,7 +1689,7 @@ class MessagePush extends BaseService $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); - if (empty($user_doctor)){ + if (empty($user_doctor)) { throw new BusinessException("加入推送队列失败:医生数据为空"); } @@ -1698,7 +1706,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } elseif ($this->push_type == 2) { // 订阅 @@ -1711,7 +1719,7 @@ class MessagePush extends BaseService "thing2" => "医师简介",// 审核内容 - "time3" => date('Y-m-d H:i:s',time()),// 审核时间 + "time3" => date('Y-m-d H:i:s', time()),// 审核时间 "thing4" => "{$user_doctor['user_name']}医生,您修改的简介信息审核通过,快去通知患者吧。",// 备注 @@ -1735,7 +1743,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } } catch (\Exception $e) { @@ -1770,7 +1778,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } elseif ($this->push_type == 2) { // 订阅 @@ -1778,7 +1786,7 @@ class MessagePush extends BaseService $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); - if (empty($user_doctor)){ + if (empty($user_doctor)) { throw new BusinessException("加入推送队列失败:医生数据为空"); } @@ -1789,7 +1797,7 @@ class MessagePush extends BaseService $sub_data['params']['data'] = [ "thing1" => "{$this->user['user_name']}医生您好,简介信息审核没有通过,请重新提交",// 温馨提示 "thing2" => "未知",// 驳回理由 - "time3" => date('Y-m-d H:i:s',time()),// 审核时间 + "time3" => date('Y-m-d H:i:s', time()),// 审核时间 ]; // 短信 @@ -1810,7 +1818,7 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } } catch (\Exception $e) { @@ -1835,20 +1843,20 @@ class MessagePush extends BaseService $params = array(); $params['withdrawal_id'] = $withdrawal_id; $doctor_withdrawal = DoctorWithdrawal::getOne($params); - if (empty($doctor_withdrawal)){ - Log::getInstance("MessagePush")->error("错误:提现数据为空" ); - return ; + if (empty($doctor_withdrawal)) { + Log::getInstance("MessagePush")->error("错误:提现数据为空"); + return; } if ($this->push_type == 1) { // 站内 // 计算时间 - $created_at = date('Y',strtotime($doctor_withdrawal['created_at'])); - $now_year = date('Y',time()); - if ($created_at != $now_year){ - $created_at = date('Y',strtotime($doctor_withdrawal['created_at'])) . '年' . date('m',strtotime($doctor_withdrawal['created_at'])) . "月"; - }else{ - $created_at = date('m',strtotime($doctor_withdrawal['created_at'])) . '月' . date('m',strtotime($doctor_withdrawal['created_at'])) . "日"; + $created_at = date('Y', strtotime($doctor_withdrawal['created_at'])); + $now_year = date('Y', time()); + if ($created_at != $now_year) { + $created_at = date('Y', strtotime($doctor_withdrawal['created_at'])) . '年' . date('m', strtotime($doctor_withdrawal['created_at'])) . "月"; + } else { + $created_at = date('m', strtotime($doctor_withdrawal['created_at'])) . '月' . date('m', strtotime($doctor_withdrawal['created_at'])) . "日"; } $data = array(); @@ -1864,13 +1872,13 @@ class MessagePush extends BaseService $data['button_type'] = 1;// 我的账户 $link_params = array(); - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入站内推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } elseif ($this->push_type == 3) { // 短信 @@ -1883,14 +1891,14 @@ class MessagePush extends BaseService $template_param = array(); $template_param['name'] = $this->user['user_name']; - $template_param['time'] = date('Y-m-d H:i',strtotime($doctor_withdrawal['created_at'])); + $template_param['time'] = date('Y-m-d H:i', strtotime($doctor_withdrawal['created_at'])); $data['template_param'] = $template_param; $message = new SendSmsMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } } catch (\Exception $e) { @@ -1915,19 +1923,19 @@ class MessagePush extends BaseService $params = array(); $params['withdrawal_id'] = $withdrawal_id; $doctor_withdrawal = DoctorWithdrawal::getOne($params); - if (empty($doctor_withdrawal)){ + if (empty($doctor_withdrawal)) { throw new BusinessException("加入推送队列失败:提现数据为空"); } if ($this->push_type == 1) { // 站内 // 计算时间 - $created_at = date('Y',strtotime($doctor_withdrawal['created_at'])); - $now_year = date('Y',time()); - if ($created_at != $now_year){ - $created_at = date('Y',strtotime($doctor_withdrawal['created_at'])) . '年' . date('m',strtotime($doctor_withdrawal['created_at'])) . "月"; - }else{ - $created_at = date('m',strtotime($doctor_withdrawal['created_at'])) . '月' . date('m',strtotime($doctor_withdrawal['created_at'])) . "日"; + $created_at = date('Y', strtotime($doctor_withdrawal['created_at'])); + $now_year = date('Y', time()); + if ($created_at != $now_year) { + $created_at = date('Y', strtotime($doctor_withdrawal['created_at'])) . '年' . date('m', strtotime($doctor_withdrawal['created_at'])) . "月"; + } else { + $created_at = date('m', strtotime($doctor_withdrawal['created_at'])) . '月' . date('m', strtotime($doctor_withdrawal['created_at'])) . "日"; } $data = array(); @@ -1943,13 +1951,13 @@ class MessagePush extends BaseService $data['button_type'] = 2;// 联系客服 $link_params = array(); - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } elseif ($this->push_type == 3) { // 短信 @@ -1962,14 +1970,14 @@ class MessagePush extends BaseService $template_param = array(); $template_param['name'] = $this->user['user_name']; - $template_param['time'] = date('Y-m-d H:i',strtotime($doctor_withdrawal['created_at'])); + $template_param['time'] = date('Y-m-d H:i', strtotime($doctor_withdrawal['created_at'])); $data['template_param'] = $template_param; $message = new SendSmsMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } } catch (\Exception $e) { @@ -1988,7 +1996,7 @@ class MessagePush extends BaseService * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ - public function doctorSystemUpgrade(string $date,string $function): bool + public function doctorSystemUpgrade(string $date, string $function): bool { try { if ($this->push_type == 1) { @@ -2002,13 +2010,13 @@ class MessagePush extends BaseService $data['notice_content'] = "{$this->user['user_name']}医生,{$date}会更新{$function}功能,敬请期待;"; $link_params = array(); - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } } catch (\Exception $e) { @@ -2040,13 +2048,13 @@ class MessagePush extends BaseService $data['notice_content'] = "{$this->user['user_name']}医生,平台对【{$title}】协议进行了更新,请注意查收"; $link_params = array(); - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } } catch (\Exception $e) { @@ -2070,16 +2078,16 @@ class MessagePush extends BaseService $params = array(); $params['doctor_id'] = $this->order_inquiry['doctor_id']; $user_doctor = UserDoctor::getOne($params); - if (empty($user_doctor)){ - Log::getInstance("MessagePush")->error("错误:医生数据为空" ); + if (empty($user_doctor)) { + Log::getInstance("MessagePush")->error("错误:医生数据为空"); } // 获取问诊订单关联病例 $params = array(); $params['order_inquiry_id'] = $this->order_inquiry['order_inquiry_id']; $order_inquiry_case = OrderInquiryCase::getOne($params); - if (empty($order_inquiry_case)){ - Log::getInstance("MessagePush")->error("错误:病例数据为空" ); + if (empty($order_inquiry_case)) { + Log::getInstance("MessagePush")->error("错误:病例数据为空"); return; } @@ -2099,21 +2107,21 @@ class MessagePush extends BaseService $link_params['inquiry_type'] = $this->order_inquiry['inquiry_type']; $link_params['doctor_user_id'] = $user_doctor['user_id']; $link_params['patient_user_id'] = $this->order_inquiry['user_id']; - $data['link_params'] = json_encode($link_params,JSON_UNESCAPED_UNICODE);// 跳转参数 + $data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数 $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } // 问诊内容-病情主诉 $disease_desc = $order_inquiry_case['disease_desc']; - if (!empty($disease_desc)){ - if (strlen($disease_desc) > 15){ - $disease_desc = mb_substr($disease_desc,0,15); - if ($disease_desc){ + if (!empty($disease_desc)) { + if (strlen($disease_desc) > 15) { + $disease_desc = mb_substr($disease_desc, 0, 15); + if ($disease_desc) { $disease_desc = $disease_desc . "..."; } } @@ -2144,11 +2152,84 @@ class MessagePush extends BaseService $producer = ApplicationContext::getContainer()->get(Producer::class); $result = $producer->produce($message); if (!$result) { - Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE)); + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); } } catch (\Exception $e) { Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); } } + /** + * 医生-超时未接诊 + * 站内、订阅 + * @return void + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ + public function doctorNoInquiry(): void + { + try { + // 获取问诊订单关联病例 + $params = array(); + $params['order_inquiry_id'] = $this->order_inquiry['order_inquiry_id']; + $order_inquiry_case = OrderInquiryCase::getOne($params); + if (empty($order_inquiry_case)) { + Log::getInstance("MessagePush")->error("错误:病例数据为空"); + return; + } + + // 站内 + $data = array(); + $data['user_id'] = $this->user['user_id']; + $data['notice_type'] = 1; + $data['inquiry_type'] = $this->order_inquiry['inquiry_type']; // 问诊类型(医生端服务通知存在 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药) + $data['from_name'] = "肝胆小秘书"; + $data['notice_brief_title'] = "因您超时未接诊,因您超时未接诊订单已失效,已退款给患者。"; + $data['notice_title'] = "因您超时未接诊,因您超时未接诊订单已失效,已退款给患者。"; + $data['notice_content'] = "因您超时未接诊,因您超时未接诊订单已失效,已退款给患者。"; + + $message = new SendStationMessageProducer($data); + $producer = ApplicationContext::getContainer()->get(Producer::class); + $result = $producer->produce($message); + if (!$result) { + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); + } + + // 问诊内容-病情主诉 + $disease_desc = $order_inquiry_case['disease_desc']; + if (!empty($disease_desc)) { + if (strlen($disease_desc) > 15) { + $disease_desc = mb_substr($disease_desc, 0, 15); + if ($disease_desc) { + $disease_desc = $disease_desc . "..."; + } + } + } + + $sub_data = array(); + $sub_data['push_user_id'] = $this->user['user_id']; + $sub_data['wx_template_id'] = "G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc";//咨询提醒 + $sub_data['params']['page'] = ""; + $sub_data['params']['data'] = [ + "thing1" => "超时未接诊",// 提醒内容 + "name2" => (string)$this->order_inquiry['patient_name'],// 患者姓名 + "thing4" => (string)$disease_desc,// 病情描述 + "thing6" => "因您超时未接诊订单已失效,已退款给患者",// 提示说明 + "thing5" => "",// 咨询内容 + ]; + + $data = array(); + $data['sub_data'] = $sub_data; + $data['sms_data'] = []; + + $message = new SendSubMessageProducer($data); + $producer = ApplicationContext::getContainer()->get(Producer::class); + $result = $producer->produce($message); + if (!$result) { + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE)); + } + } catch (\Exception $e) { + Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . $e->getMessage()); + } + } } \ No newline at end of file diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index b89c71a..94c46be 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -906,6 +906,9 @@ class PatientOrderService extends BaseService $imService = new ImService(); $imService->waitDoctorInquiry($order_inquiry,$user_doctor['user_id'],$order_inquiry['user_id']); + // 发送IM消息-横幅通知-医生有新问诊 + $imService->bannerNoticeNewInquiry($order_inquiry,$user_doctor['user_id']); + // 发送站内、订阅失败发送短信消息-医生有新问诊 $MessagePush = new MessagePush($user_doctor['user_id'],$order_inquiry['order_inquiry_id']); $MessagePush->doctorHaveNewInquiry(); From 6cf34b1e5b9858a2d2e0647c3aa66559d88c7e46 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Tue, 30 May 2023 11:43:38 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=AA=E5=B9=85?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/ImService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/ImService.php b/app/Services/ImService.php index 5150d94..89ca565 100644 --- a/app/Services/ImService.php +++ b/app/Services/ImService.php @@ -647,9 +647,9 @@ class ImService extends BaseService $desc = "5分钟内未接诊,平台将自动取消问诊"; } - // 消息内容 医生-患者 + // 消息内容 $message_content_data = array(); - $message_content_data['message_type'] = 1; + $message_content_data['message_type'] = 8; $message_content_data['title'] = "您有一个新的问诊服务等待接诊"; $message_content_data['desc'] = $desc; $message_content = [ From 1e7fdeea07e527e5b2677c1dfc2980e923c9050a Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Tue, 30 May 2023 13:52:20 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=AA=E5=B9=85?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E8=B7=B3=E8=BD=AC=E5=9C=B0=E5=9D=80=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/ImService.php | 1 + app/Services/MessagePush.php | 4 ++-- app/Utils/Data.php | 18 ++---------------- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/app/Services/ImService.php b/app/Services/ImService.php index 89ca565..a60ec44 100644 --- a/app/Services/ImService.php +++ b/app/Services/ImService.php @@ -652,6 +652,7 @@ class ImService extends BaseService $message_content_data['message_type'] = 8; $message_content_data['title'] = "您有一个新的问诊服务等待接诊"; $message_content_data['desc'] = $desc; + $message_content_data['data']['message_path'] = "/Pages/yishi/wenzhen_v2/wenzhen"; $message_content = [ 'Data' => json_encode($message_content_data, JSON_UNESCAPED_UNICODE), ]; diff --git a/app/Services/MessagePush.php b/app/Services/MessagePush.php index f81d172..1d54338 100644 --- a/app/Services/MessagePush.php +++ b/app/Services/MessagePush.php @@ -1112,10 +1112,10 @@ class MessagePush extends BaseService if ($this->order_inquiry['inquiry_type'] == 1 || $this->order_inquiry['inquiry_type'] == 3) { // 专家、公益 - $thing6 = "【" . inquiryTypeToString($this->order_inquiry['inquiry_type']) . "】" . ":24小时内未接诊,平台将自动取消问诊"; + $thing6 = "24小时内未接诊,平台将自动取消问诊"; } else { // 快速、购药 - $thing6 = "【" . inquiryTypeToString($this->order_inquiry['inquiry_type']) . "】" . ":5分钟内未接诊,平台将自动取消问诊"; + $thing6 = "5分钟内未接诊,平台将自动取消问诊"; } diff --git a/app/Utils/Data.php b/app/Utils/Data.php index 369955b..8d40342 100644 --- a/app/Utils/Data.php +++ b/app/Utils/Data.php @@ -146,22 +146,8 @@ class Data // 处方平台商品入库 public function product(){ $product_platform_id = [ - "517653593319849984", - "517653593307267072", - "517653183070781440", - "517653183108530177", - "517653780314505216", - "517653906961514496", - "517654391143579648", - "517653404613918721", - "517653593365987328", - "517652642206892032", - "517654018844573697", - "517654039933534208", - "517653593282101250", - "517653183154667520", - "517653183074975745", - "517654039895785472", + "519091456971071489", + "517652954976141313", ]; foreach ($product_platform_id as $value){ From cee1d85130a2311befe4fa59652f163846373034 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Thu, 1 Jun 2023 08:37:50 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/MessagePush.php | 6 +++--- app/Services/PatientDoctorService.php | 2 +- app/Utils/Data.php | 9 +++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/Services/MessagePush.php b/app/Services/MessagePush.php index 1d54338..21a0190 100644 --- a/app/Services/MessagePush.php +++ b/app/Services/MessagePush.php @@ -2184,9 +2184,9 @@ class MessagePush extends BaseService $data['notice_type'] = 1; $data['inquiry_type'] = $this->order_inquiry['inquiry_type']; // 问诊类型(医生端服务通知存在 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药) $data['from_name'] = "肝胆小秘书"; - $data['notice_brief_title'] = "因您超时未接诊,因您超时未接诊订单已失效,已退款给患者。"; - $data['notice_title'] = "因您超时未接诊,因您超时未接诊订单已失效,已退款给患者。"; - $data['notice_content'] = "因您超时未接诊,因您超时未接诊订单已失效,已退款给患者。"; + $data['notice_brief_title'] = "因您超时未接诊,订单已失效,已退款给患者。"; + $data['notice_title'] = "因您超时未接诊,订单已失效,已退款给患者。"; + $data['notice_content'] = "因您超时未接诊,订单已失效,已退款给患者。"; $message = new SendStationMessageProducer($data); $producer = ApplicationContext::getContainer()->get(Producer::class); diff --git a/app/Services/PatientDoctorService.php b/app/Services/PatientDoctorService.php index 5945992..8fbedbd 100644 --- a/app/Services/PatientDoctorService.php +++ b/app/Services/PatientDoctorService.php @@ -483,7 +483,7 @@ class PatientDoctorService extends BaseService // 无合适医生 $result['status'] = 3; $result['data'] = ""; - $result['message'] = "目前暂无可接诊医生"; + $result['message'] = "暂无可接诊医生,请选择其他服务入口进行问诊"; return success($result); } } diff --git a/app/Utils/Data.php b/app/Utils/Data.php index 8d40342..b4a3112 100644 --- a/app/Utils/Data.php +++ b/app/Utils/Data.php @@ -146,8 +146,17 @@ class Data // 处方平台商品入库 public function product(){ $product_platform_id = [ + "518095343843098625", "519091456971071489", "517652954976141313", + "519151179795808256", + "517652642211086336", + "517653593286295552", + "517653183070781441", + "517653906999263232", + "517652642227863552", + "517653183100141569", + "517653906969903104", ]; foreach ($product_platform_id as $value){ From ee22c9791ae281229a81edaf675a0c2ff686035f Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Thu, 1 Jun 2023 08:39:41 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=A8=AA=E5=B9=85?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Amqp/Consumer/AssignDoctorDelayDirectConsumer.php | 3 --- app/Controller/CallBackController.php | 3 --- app/Services/PatientOrderService.php | 3 --- 3 files changed, 9 deletions(-) diff --git a/app/Amqp/Consumer/AssignDoctorDelayDirectConsumer.php b/app/Amqp/Consumer/AssignDoctorDelayDirectConsumer.php index 89dbf06..09a095a 100644 --- a/app/Amqp/Consumer/AssignDoctorDelayDirectConsumer.php +++ b/app/Amqp/Consumer/AssignDoctorDelayDirectConsumer.php @@ -266,9 +266,6 @@ class AssignDoctorDelayDirectConsumer extends ConsumerMessage $imService = new ImService(); $imService->waitDoctorInquiry($order_inquiry,$user_doctor['user_id'],$order_inquiry['user_id']); - // 发送IM消息-横幅通知-医生有新问诊 - $imService->bannerNoticeNewInquiry($order_inquiry,$user_doctor['user_id']); - // 医生-医生有新问诊 站内、订阅失败发送短信 $MessagePush = new MessagePush($user_doctor['user_id'],$order_inquiry['order_inquiry_id']); $MessagePush->doctorHaveNewInquiry(); diff --git a/app/Controller/CallBackController.php b/app/Controller/CallBackController.php index 49ce394..188ff6b 100644 --- a/app/Controller/CallBackController.php +++ b/app/Controller/CallBackController.php @@ -170,9 +170,6 @@ class CallBackController extends AbstractController $imService = new ImService(); $imService->waitDoctorInquiry($order_inquiry, $user_doctor['user_id'], $order_inquiry['user_id']); - // 发送IM消息-横幅通知-医生有新问诊 - $imService->bannerNoticeNewInquiry($order_inquiry,$user_doctor['user_id']); - // 发送站内、订阅失败发送短信消息-医生有新问诊 $MessagePush = new MessagePush($user_doctor['user_id'], $order_inquiry['order_inquiry_id']); $MessagePush->doctorHaveNewInquiry(); diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index 94c46be..b89c71a 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -906,9 +906,6 @@ class PatientOrderService extends BaseService $imService = new ImService(); $imService->waitDoctorInquiry($order_inquiry,$user_doctor['user_id'],$order_inquiry['user_id']); - // 发送IM消息-横幅通知-医生有新问诊 - $imService->bannerNoticeNewInquiry($order_inquiry,$user_doctor['user_id']); - // 发送站内、订阅失败发送短信消息-医生有新问诊 $MessagePush = new MessagePush($user_doctor['user_id'],$order_inquiry['order_inquiry_id']); $MessagePush->doctorHaveNewInquiry(); From 6c18df1747a5f3ae966dd719e71decf5fd522839 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Fri, 2 Jun 2023 08:46:12 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=80=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Utils/Data.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Utils/Data.php b/app/Utils/Data.php index b4a3112..d3a589f 100644 --- a/app/Utils/Data.php +++ b/app/Utils/Data.php @@ -157,6 +157,8 @@ class Data "517652642227863552", "517653183100141569", "517653906969903104", + "522376951584849921", + "522378613456175104", ]; foreach ($product_platform_id as $value){