Commit dea52978 by lujunyi

限购判断小于0

parent 0349f725
......@@ -171,7 +171,7 @@ public function drugLimit(Request $request)
$mahuangsu_num += $drug['num'];
$drug['mahuangsu_status'] = 1; // 1:是麻黄素药品
$canBuyMahuangCount = 4 - $buyed_mahuang_counts - $mahuangsu_num; // 麻黄素药品剩余可购买数量,最多可以购买4个
if ($canBuyMahuangCount <= 0) {
if ($canBuyMahuangCount < 0) {
$errMsg = '药品['.$drugModel->name.']剩余购买数量不足~';
return $this->failed($errMsg, ['add_status' => false]);
......
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