修改推送信息内容,修改请求处方平台超时时间
This commit is contained in:
parent
029c6249fd
commit
d3d5a62fb8
@ -44,29 +44,27 @@ class getProductCommand extends HyperfCommand
|
|||||||
$page_size = 100;
|
$page_size = 100;
|
||||||
$result = $prescription->getProd(1, 100);
|
$result = $prescription->getProd(1, 100);
|
||||||
if (!empty($result['rows'])){
|
if (!empty($result['rows'])){
|
||||||
$concurrent = new Concurrent(10);
|
|
||||||
|
|
||||||
foreach ($result['rows'] as $item) {
|
foreach ($result['rows'] as $item) {
|
||||||
$concurrent->create(function () use($item) {
|
// 执行入库
|
||||||
// 执行入库
|
$this->handleData($item);
|
||||||
$this->handleData($item);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$count = ceil($result['count'] / $page * $page_size);
|
$count = ceil($result['count'] / $page * $page_size);
|
||||||
|
|
||||||
if ($result['count'] > $page * $page_size) {
|
if ($result['count'] > $page * $page_size) {
|
||||||
for ($i = 2; $i < $count; $i++) {
|
for ($i = 2; $i < $count; $i++) {
|
||||||
$result = $prescription->getProd($i, $page_size);
|
try {
|
||||||
if (!isset($result['rows'])){
|
$result = $prescription->getProd($i, $page_size);
|
||||||
continue;
|
if (!isset($result['rows'])){
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($result['rows'] as $item) {
|
foreach ($result['rows'] as $item) {
|
||||||
$concurrent->create(function () use($item) {
|
|
||||||
// 执行入库
|
// 执行入库
|
||||||
$this->handleData($item);
|
$this->handleData($item);
|
||||||
});
|
}
|
||||||
|
}catch (\Exception $e){
|
||||||
|
$this->line("部分商品更新失败:" . $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2089,7 +2089,7 @@ class MessagePush extends BaseService
|
|||||||
$data['notice_type'] = 1;
|
$data['notice_type'] = 1;
|
||||||
$data['inquiry_type'] = $this->order_inquiry['inquiry_type']; // 问诊类型(医生端服务通知存在 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药)
|
$data['inquiry_type'] = $this->order_inquiry['inquiry_type']; // 问诊类型(医生端服务通知存在 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药)
|
||||||
$data['from_name'] = "肝胆小秘书";
|
$data['from_name'] = "肝胆小秘书";
|
||||||
$data['notice_brief_title'] = inquiryTypeToString($this->order_inquiry['inquiry_type']);
|
$data['notice_brief_title'] = "患者已取消问诊咨询,您可选择其他患者的问诊咨询进行接诊。";
|
||||||
$data['notice_title'] = "患者已取消问诊咨询,您可选择其他患者的问诊咨询进行接诊。";
|
$data['notice_title'] = "患者已取消问诊咨询,您可选择其他患者的问诊咨询进行接诊。";
|
||||||
$data['notice_content'] = "患者已取消问诊咨询,您可选择其他患者的问诊咨询进行接诊。";
|
$data['notice_content'] = "患者已取消问诊咨询,您可选择其他患者的问诊咨询进行接诊。";
|
||||||
$data['link_type'] = 3; // 问诊消息列表页
|
$data['link_type'] = 3; // 问诊消息列表页
|
||||||
|
|||||||
@ -39,7 +39,11 @@ class Prescription
|
|||||||
$this->client_secret = config('prescription_platform.client_secret');
|
$this->client_secret = config('prescription_platform.client_secret');
|
||||||
$this->pharmacy_code = config('prescription_platform.pharmacy_code');
|
$this->pharmacy_code = config('prescription_platform.pharmacy_code');
|
||||||
$this->container = ApplicationContext::getContainer();
|
$this->container = ApplicationContext::getContainer();
|
||||||
$this->client = $this->container->get(Client::class);
|
$this->client = make(Client::class, [
|
||||||
|
'config' => [
|
||||||
|
'timeout' => 5,
|
||||||
|
],
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user