修改医生列表
This commit is contained in:
parent
9698674350
commit
5509b036be
@ -282,7 +282,6 @@ class UserDoctor extends Model
|
||||
// $query->where($params);
|
||||
// });
|
||||
|
||||
|
||||
if ($is_first_online == 1){
|
||||
$query->join('user as u', function ($query) {
|
||||
$query->on('user_doctor.user_id', '=', 'u.user_id');
|
||||
@ -291,22 +290,10 @@ class UserDoctor extends Model
|
||||
->orderBy('u.is_online', 'desc');
|
||||
}
|
||||
|
||||
if (!empty($sort_order)){
|
||||
// if (in_array($sort_order,[1,3,4])){
|
||||
// $query = $query->join('doctor_inquiry_config', function ($query) {
|
||||
// $query->on('user_doctor.doctor_id', '=', 'doctor_inquiry_config.doctor_id')
|
||||
// ->whereIn('inquiry_type', [1, 3])
|
||||
// ->whereIn('inquiry_mode', [1,2,6,7])
|
||||
// ->orderBy('inquiry_price', 'desc')
|
||||
// ->take(1);
|
||||
// })
|
||||
// ->select("user_doctor.*")
|
||||
// ->groupBy("user_doctor.doctor_id");
|
||||
// }
|
||||
|
||||
// 问诊服务搜索
|
||||
// select doctor_id, min(price) price_min from price group by doctor_id
|
||||
if (in_array($sort_order,[1,3,4])){
|
||||
$raw = "inquiry_price as min_inquiry_price";
|
||||
if (!empty($sort_order) && in_array($sort_order,[1,3,4])){
|
||||
if ($sort_order == 1){
|
||||
// 综合-价格从低到高
|
||||
$raw = "MIN(inquiry_price) as min_inquiry_price";
|
||||
@ -334,6 +321,7 @@ class UserDoctor extends Model
|
||||
});
|
||||
}
|
||||
|
||||
if (!empty($sort_order)){
|
||||
if ($sort_order == 1) {
|
||||
// 综合-价格从低到高
|
||||
$query->orderBy('is_recommend', 'desc');// 是否首页推荐(0:否 1:是)
|
||||
@ -403,7 +391,7 @@ class UserDoctor extends Model
|
||||
->get();
|
||||
|
||||
dump($doctors->toArray());
|
||||
return $doctors;
|
||||
return array();
|
||||
|
||||
// $query = self::orderBy('served_patients_num', 'desc');
|
||||
//
|
||||
|
||||
@ -391,11 +391,14 @@ class DoctorInquiryService extends BaseService
|
||||
return fail(HttpEnumCode::HTTP_ERROR, "本服务需设置图文问诊的价格,才可开启");
|
||||
}
|
||||
|
||||
// 价格计算(专家图文问诊价格*费率+30盒35元的干爽颗粒)
|
||||
$service_price = $doctor_inquiry_config['inquiry_price'] * $config_health_package['service_rate'] / 100 * 6 + 35 * 30;
|
||||
|
||||
// 创建医生健康包
|
||||
$data = array();
|
||||
$data['doctor_id'] = $user_info['client_user_id'];
|
||||
$data['config_health_package_id'] = $config_health_package['config_health_package_id'];
|
||||
$data['service_price'] = $doctor_inquiry_config['inquiry_price'] * $config_health_package['service_rate'] / 100 * 6;
|
||||
$data['service_price'] = $service_price;
|
||||
$doctor_config_health_package = DoctorConfigHealthPackage::addDoctorConfigHealthPackage($data);
|
||||
if (empty($doctor_config_health_package)){
|
||||
Db::rollBack();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user