修改 更新处方平台商品 增加药店编码识别

This commit is contained in:
wucongxing 2023-12-07 14:03:28 +08:00
parent 08af3ff63e
commit db29e05f24

View File

@ -109,6 +109,23 @@ class getProductCommand extends HyperfCommand
return false;
}
if (empty($item['thirdCode'])) {
Db::rollBack();
// $this->line("商品更新失败,缺少药品价格" . json_encode($item, JSON_UNESCAPED_UNICODE));
return false;
}
$pharmacy_code = \Hyperf\Config\config("prescription_platform.pharmacy_code");
if (empty($pharmacy_code)) {
$pharmacy_code = "JG-10009";
}
// 非药店编码
if ($pharmacy_code != $item['thirdCode']) {
Db::rollBack();
return false;
}
// 查询是否存在
$params = array();
$params['product_platform_code'] = $item['drugCode'];