1
This commit is contained in:
parent
b9d3cd09a3
commit
a6a423f720
@ -72,6 +72,17 @@ class OrderDetection extends Model
|
||||
return self::where($params)->first($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息-单条
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return object|null
|
||||
*/
|
||||
public static function getLastOne(array $params, array $fields = ['*']): object|null
|
||||
{
|
||||
return self::where($params)->latest($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据-多
|
||||
* @param array $params
|
||||
|
||||
@ -487,7 +487,7 @@ class DetectionService extends BaseService
|
||||
$params = array();
|
||||
$params['patient_id'] = $user_info['client_user_id'];
|
||||
$params['family_id'] = $family_id;
|
||||
$order_detection = OrderDetection::getOne($params);
|
||||
$order_detection = OrderDetection::getLastOne($params);
|
||||
if (empty($order_detection)){
|
||||
return success();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user