Merge branch 'dev'
This commit is contained in:
commit
a55568e177
@ -48,6 +48,11 @@ WORKDIR /opt/www
|
|||||||
# RUN composer install --no-dev --no-scripts
|
# RUN composer install --no-dev --no-scripts
|
||||||
|
|
||||||
COPY . /opt/www
|
COPY . /opt/www
|
||||||
|
|
||||||
|
#RUN apk add --no-cache $PHPIZE_DEPS \
|
||||||
|
# && pecl8 install imagick \
|
||||||
|
# && echo "extension=imagick.so" > /etc/php8/conf.d/imagick.ini
|
||||||
|
|
||||||
RUN composer install --no-dev -o && php bin/hyperf.php
|
RUN composer install --no-dev -o && php bin/hyperf.php
|
||||||
|
|
||||||
EXPOSE 9501
|
EXPOSE 9501
|
||||||
|
|||||||
70
app/Command/editDoctorQrCodeCommand.php
Normal file
70
app/Command/editDoctorQrCodeCommand.php
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Command;
|
||||||
|
|
||||||
|
use App\Model\UserDoctor;
|
||||||
|
use Extend\Alibaba\Oss;
|
||||||
|
use Extend\Wechat\Wechat;
|
||||||
|
use Hyperf\Command\Command as HyperfCommand;
|
||||||
|
use Hyperf\Command\Annotation\Command;
|
||||||
|
use Psr\Container\ContainerInterface;
|
||||||
|
|
||||||
|
#[Command]
|
||||||
|
class editDoctorQrCodeCommand extends HyperfCommand
|
||||||
|
{
|
||||||
|
public function __construct(protected ContainerInterface $container)
|
||||||
|
{
|
||||||
|
parent::__construct('editDoctorQrCode:command');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configure()
|
||||||
|
{
|
||||||
|
parent::configure();
|
||||||
|
$this->setDescription('修改医生分享二维码');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
$this->line('开始');
|
||||||
|
|
||||||
|
// 获取医生信息
|
||||||
|
$params = array();
|
||||||
|
$user_doctors = UserDoctor::getList($params);
|
||||||
|
if (empty($user_doctors)) {
|
||||||
|
$this->line('结束,无医生需处理');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($user_doctors as $user_doctor){
|
||||||
|
if (!empty($user_doctor['qr_code'])){
|
||||||
|
$weChat = new Wechat(1);
|
||||||
|
|
||||||
|
$env_version = "release";
|
||||||
|
$app_env = \Hyperf\Support\env("APP_ENV",'dev');
|
||||||
|
if ($app_env == "dev"){
|
||||||
|
$env_version = "trial";
|
||||||
|
}
|
||||||
|
|
||||||
|
$options = [
|
||||||
|
"scene" => "?doctor_id=" . $user_doctor['doctor_id'],// query 参数
|
||||||
|
"page" => "pages/expertDetail/expertDetail",
|
||||||
|
"check_path" => false,
|
||||||
|
"env_version" => $env_version,
|
||||||
|
];
|
||||||
|
|
||||||
|
$img_buffer = $weChat->getUnlimitedQRCode($options);
|
||||||
|
|
||||||
|
$oss = new Oss();
|
||||||
|
|
||||||
|
$filename = "applet/doctor/card/" . $user_doctor['doctor_id'] . '.' . 'jpg';
|
||||||
|
|
||||||
|
$oss->putObject($filename, $img_buffer);
|
||||||
|
|
||||||
|
$this->line('结束:' . $user_doctor['user_name']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->line('全部结束');
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -53,7 +53,6 @@ use Hyperf\Utils\ApplicationContext;
|
|||||||
use Hyperf\Utils\Coroutine\Concurrent;
|
use Hyperf\Utils\Coroutine\Concurrent;
|
||||||
use Intervention\Image\ImageManager;
|
use Intervention\Image\ImageManager;
|
||||||
use Psr\SimpleCache\CacheInterface;
|
use Psr\SimpleCache\CacheInterface;
|
||||||
use Spatie\PdfToImage\Pdf;
|
|
||||||
use Swoole\Coroutine;
|
use Swoole\Coroutine;
|
||||||
use Swoole\Coroutine\Channel;
|
use Swoole\Coroutine\Channel;
|
||||||
use Swoole\Coroutine\WaitGroup;
|
use Swoole\Coroutine\WaitGroup;
|
||||||
|
|||||||
@ -29,7 +29,6 @@ use Extend\Ca\CaOnline;
|
|||||||
use Extend\Prescription\Prescription;
|
use Extend\Prescription\Prescription;
|
||||||
use Hyperf\Contract\LengthAwarePaginatorInterface;
|
use Hyperf\Contract\LengthAwarePaginatorInterface;
|
||||||
use Hyperf\Utils\WaitGroup;
|
use Hyperf\Utils\WaitGroup;
|
||||||
use Intervention\Image\ImageManager;
|
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
use Swoole\Coroutine\Channel;
|
use Swoole\Coroutine\Channel;
|
||||||
|
|||||||
@ -1575,11 +1575,17 @@ class UserDoctorService extends BaseService
|
|||||||
if (empty($qr_code)){
|
if (empty($qr_code)){
|
||||||
$weChat = new Wechat(1);
|
$weChat = new Wechat(1);
|
||||||
|
|
||||||
|
$env_version = "release";
|
||||||
|
$app_env = \Hyperf\Support\env("APP_ENV",'dev');
|
||||||
|
if ($app_env == "dev"){
|
||||||
|
$env_version = "trial";
|
||||||
|
}
|
||||||
|
|
||||||
$options = [
|
$options = [
|
||||||
"scene" => "doctor_id=" . $user_doctor['doctor_id'],// query 参数
|
"scene" => "doctor_id=" . $user_doctor['doctor_id'],// query 参数
|
||||||
"page" => "",
|
"page" => "",
|
||||||
"check_path" => false,
|
"check_path" => false,
|
||||||
"env_version" => "develop",
|
"env_version" => $env_version,
|
||||||
];
|
];
|
||||||
|
|
||||||
$img_buffer = $weChat->getUnlimitedQRCode($options);
|
$img_buffer = $weChat->getUnlimitedQRCode($options);
|
||||||
|
|||||||
@ -37,7 +37,6 @@
|
|||||||
"hyperf/snowflake": "^3.0",
|
"hyperf/snowflake": "^3.0",
|
||||||
"hyperf/validation": "^3.0",
|
"hyperf/validation": "^3.0",
|
||||||
"intervention/image": "^2.7",
|
"intervention/image": "^2.7",
|
||||||
"spatie/pdf-to-image": "^1.2",
|
|
||||||
"tecnickcom/tcpdf": "^6.6",
|
"tecnickcom/tcpdf": "^6.6",
|
||||||
"w7corp/easywechat": "^6.7"
|
"w7corp/easywechat": "^6.7"
|
||||||
},
|
},
|
||||||
|
|||||||
649
composer.lock
generated
649
composer.lock
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user