|
@@ -48,7 +48,7 @@ class OrderPack extends BaseModel
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|
|
- public static function checkUserServicePack($order_pack_id, $user_id, $product_type, $payment_amount)
|
|
|
|
|
|
+ public static function checkUserServicePack($order_pack_id, $user_id, $product_type)
|
|
{
|
|
{
|
|
$data = self::where('id', $order_pack_id)->where('user_id', $user_id)->first();
|
|
$data = self::where('id', $order_pack_id)->where('user_id', $user_id)->first();
|
|
if (empty($data)) {
|
|
if (empty($data)) {
|
|
@@ -74,12 +74,12 @@ class OrderPack extends BaseModel
|
|
}
|
|
}
|
|
}
|
|
}
|
|
elseif ($product_type == 4) {
|
|
elseif ($product_type == 4) {
|
|
- if ($data['vaccine_limit_amount'] < $payment_amount) {
|
|
|
|
|
|
+ if ($data['vaccine_limit_amount'] <= 0) {
|
|
exit_out(null, 10006, '服务包疫苗次数不足');
|
|
exit_out(null, 10006, '服务包疫苗次数不足');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
elseif ($product_type == 5) {
|
|
elseif ($product_type == 5) {
|
|
- if ($data['nurses_limit_amount'] < $payment_amount) {
|
|
|
|
|
|
+ if ($data['nurses_limit_amount'] <= 0) {
|
|
exit_out(null, 10007, '服务包儿保次数不足');
|
|
exit_out(null, 10007, '服务包儿保次数不足');
|
|
}
|
|
}
|
|
}
|
|
}
|