修正医生体现数据2
This commit is contained in:
+45
-2
@@ -250,7 +250,7 @@ class Order extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取可提现订单列表
|
||||
* 获取可提现订单列表-分页
|
||||
* @param array $params
|
||||
* @param string|int $is_platform_deep_cooperation
|
||||
* @param array $fields
|
||||
@@ -258,7 +258,7 @@ class Order extends Model
|
||||
* @param int|null $per_page
|
||||
* @return array
|
||||
*/
|
||||
public static function getDoctorWithdrawalOrderList(array $params, string|int $is_platform_deep_cooperation,array $fields = ["*"], int $page = null, ?int $per_page = 10): array
|
||||
public static function getDoctorWithdrawalOrderPage(array $params, string|int $is_platform_deep_cooperation,array $fields = ["*"], int $page = null, ?int $per_page = 10): array
|
||||
{
|
||||
$query = self::with(['OrderInquiry', 'OrderServicePackage'])
|
||||
->where($params)
|
||||
@@ -302,4 +302,47 @@ class Order extends Model
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取可提现订单列表
|
||||
* @param array $params
|
||||
* @param string|int $is_platform_deep_cooperation
|
||||
* @param array $fields
|
||||
* @return array
|
||||
*/
|
||||
public static function getDoctorWithdrawalOrderList(array $params, string|int $is_platform_deep_cooperation,array $fields = ["*"]): array
|
||||
{
|
||||
$query = self::with(['OrderInquiry', 'OrderServicePackage'])
|
||||
->where($params)
|
||||
->whereIn('order_type',[1,4,5]);
|
||||
|
||||
// 问诊订单
|
||||
$query = $query->where(function ($query) use ($is_platform_deep_cooperation){
|
||||
$query->whereExists(function ($subQuery) use ($is_platform_deep_cooperation){
|
||||
$subQuery->from('order_inquiry');
|
||||
if ($is_platform_deep_cooperation == 1){
|
||||
$subQuery->whereNotIn('inquiry_type', [2,4]);
|
||||
}
|
||||
|
||||
$subQuery->whereNotIn('inquiry_mode', [7,8,9])
|
||||
->whereIn('inquiry_status', [6])
|
||||
->whereIn('inquiry_refund_status', [0,3])
|
||||
->whereRaw('gdxz_order.order_id = gdxz_order_inquiry.order_id');
|
||||
})
|
||||
->orWhereExists(function ($subQuery) {
|
||||
$subQuery->from('order_service_package')
|
||||
->whereRaw('gdxz_order.order_id = gdxz_order_service_package.order_id')
|
||||
->whereIn('refund_status', [0,3])
|
||||
->where('pay_status', 2)
|
||||
->where('start_time', 2)
|
||||
->whereIn('order_service_status', [4,5])
|
||||
->WhereExists(function ($subQuery){
|
||||
$subQuery->from("order_service_package_inquiry")
|
||||
->whereRaw('gdxz_order_service_package.order_service_id = gdxz_order_service_package_inquiry.order_service_id');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
return $query->get();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user