This commit is contained in:
wucongxing8150 2024-05-08 18:39:07 +08:00
parent 2d74d0c64d
commit 7409abe741
2 changed files with 12 additions and 2 deletions

View File

@ -75,4 +75,15 @@ class DoctorConfigFollowPackageItem extends Model
{
return self::where($params)->delete();
}
/**
* 多条
* @param array $params
* @param array $fields
* @return Collection|array
*/
public static function getOrderServicePeriodList(array $params, array $fields = ['*']): Collection|array
{
return self::where($params)->orderBy('service_period')->get($fields);
}
}

View File

@ -895,13 +895,12 @@ class DoctorInquiryService extends BaseService
if (!empty($doctor_config_follow_package)) {
$params = array();
$params['follow_package_id'] = $doctor_config_follow_package['follow_package_id'];
$doctor_config_follow_package_items = DoctorConfigFollowPackageItem::getList($params);
$doctor_config_follow_package_items = DoctorConfigFollowPackageItem::getOrderServicePeriodList($params);
if (!empty($doctor_config_follow_package_items)) {
foreach ($doctor_config_follow_package_items as &$doctor_config_follow_package_item){
$doctor_config_follow_package_item['monthly_frequency'] = $doctor_config_follow_package['monthly_frequency'];
$result[] = $doctor_config_follow_package_item->toArray();
}
}
}