修改获取服务包当月已问诊次数 ,以支付时间为准。

当一个服务包订单是2024-4-22 15:30创建的
此时会创建一个服务包问诊订单,当服务包问诊订单
统计剩余次数时,是以服务包的支付时间,如果以开始时间,会存在漏掉首单
This commit is contained in:
2024-04-23 16:49:16 +08:00
parent cf6ddb356a
commit 013480a3cb
5 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -3272,7 +3272,7 @@ class MessagePush extends BaseService
// 获取服务包当月已问诊次数
if ($order_service_package_detail['monthly_frequency'] != 0 && !empty($this->order_service_package['start_time'])) {
$OrderServicePackageService = new OrderServicePackageService();
$month_inquiry_count = $OrderServicePackageService->getCurrentMonthInquiryCount($this->order_service_package['start_time'],$this->order_service_package['order_service_type'],$this->order_service_package['user_id'], $this->order_service_package['doctor_id']);
$month_inquiry_count = $OrderServicePackageService->getCurrentMonthInquiryCount($this->order_service_package['pay_time'],$this->order_service_package['order_service_type'],$this->order_service_package['user_id'], $this->order_service_package['doctor_id']);
$remaining_inquiry_count = $order_service_package_detail['monthly_frequencys'] - $month_inquiry_count;
if ($remaining_inquiry_count < 0){
$remaining_inquiry_count = 0;