Commit 9e70c0ec by lujunyi

药品id写错

parent 857cf186
...@@ -158,7 +158,7 @@ public function drugLimit(Request $request) ...@@ -158,7 +158,7 @@ public function drugLimit(Request $request)
if ($drugModel->limit_buy_7 > 0) { if ($drugModel->limit_buy_7 > 0) {
$drug['limit_num'] = $drugModel->limit_buy_7; $drug['limit_num'] = $drugModel->limit_buy_7;
} }
$buyedCount = $drugCounts[$drug_id] ?? 0; // 历史已购买数量 $buyedCount = $drugCounts[$drug['drug_id']] ?? 0; // 历史已购买数量
$canBuyCount = $drug['limit_num'] - $buyedCount; // 普通药品剩余可购买数量 $canBuyCount = $drug['limit_num'] - $buyedCount; // 普通药品剩余可购买数量
if ($canBuyCount <= 0) { if ($canBuyCount <= 0) {
$errMsg = '药品['.$drugModel->name.']剩余购买数量不足~'; $errMsg = '药品['.$drugModel->name.']剩余购买数量不足~';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment