增加了预约视频状态
This commit is contained in:
parent
10b761321b
commit
5dab3f3b6b
59
app/Model/OrderInquiryVideo.php
Normal file
59
app/Model/OrderInquiryVideo.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Model;
|
||||
|
||||
|
||||
|
||||
use Hyperf\Snowflake\Concern\Snowflake;
|
||||
|
||||
/**
|
||||
* @property int $inquiry_video_id 主键id
|
||||
* @property int $order_inquiry_id 问诊订单id
|
||||
* @property string $reservation_time 预约时间
|
||||
* @property int $is_send_reservation_notice 是否已发送预约通知(0:否 1:是)
|
||||
* @property int $is_video 是否已开视频(0:否 1:是)
|
||||
* @property string $start_time 开始时间
|
||||
* @property string $end_time 结束时间
|
||||
* @property \Carbon\Carbon $created_at 创建时间
|
||||
* @property \Carbon\Carbon $updated_at 修改时间
|
||||
*/
|
||||
class OrderInquiryVideo extends Model
|
||||
{
|
||||
use Snowflake;
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*/
|
||||
protected ?string $table = 'order_inquiry_video';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['inquiry_video_id', 'order_inquiry_id', 'reservation_time', 'is_send_reservation_notice', 'is_video', 'start_time', 'end_time', 'created_at', 'updated_at'];
|
||||
|
||||
protected string $primaryKey = "inquiry_video_id";
|
||||
|
||||
/**
|
||||
* 获取信息-单条
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return object|null
|
||||
*/
|
||||
public static function getOne(array $params, array $fields = ['*']): object|null
|
||||
{
|
||||
return self::where($params)->first($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息-多条
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return object|null
|
||||
*/
|
||||
public static function getList(array $params, array $fields = ['*']): object|null
|
||||
{
|
||||
return self::where($params)->get($fields);
|
||||
}
|
||||
}
|
||||
@ -20,6 +20,7 @@ use App\Model\OrderInquiry;
|
||||
use App\Model\OrderInquiryCase;
|
||||
use App\Model\OrderInquiryCoupon;
|
||||
use App\Model\OrderInquiryRefund;
|
||||
use App\Model\OrderInquiryVideo;
|
||||
use App\Model\OrderPrescription;
|
||||
use App\Model\OrderProductCoupon;
|
||||
use App\Model\PatientFamily;
|
||||
@ -885,6 +886,7 @@ class InquiryService extends BaseService
|
||||
|
||||
$follow = false; // 关注状态
|
||||
$is_evaluation = false; // 评价状态
|
||||
$is_reservation_video = false; // 预约视频状态
|
||||
|
||||
// 获取医生问诊配置-问诊购药
|
||||
$multi_point_enable = 0;
|
||||
@ -915,6 +917,14 @@ class InquiryService extends BaseService
|
||||
$is_evaluation = OrderEvaluation::getExists($params);
|
||||
}
|
||||
|
||||
// 获取视频数据
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
$order_inquiry_video = OrderInquiryVideo::getOne($params);
|
||||
if (!empty($order_inquiry_video)){
|
||||
$is_reservation_video = true;
|
||||
}
|
||||
|
||||
$result = array();
|
||||
$result['doctor_user_id'] = $user_doctor['user_id'];
|
||||
$result['patient_user_id'] = $order_inquiry['user_id'];
|
||||
@ -935,6 +945,7 @@ class InquiryService extends BaseService
|
||||
$result['reception_time'] = $order_inquiry['reception_time'] ?: null; // 接诊时间
|
||||
$result['multi_point_status'] = $user_doctor['multi_point_status'] ?: null;// 医生多点执业认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)
|
||||
$result['multi_point_enable'] = $multi_point_enable;// 医生问诊购药是否开启
|
||||
$result['is_reservation_video'] = $is_reservation_video;// 预约视频状态
|
||||
|
||||
return success($result);
|
||||
}
|
||||
|
||||
@ -222,7 +222,7 @@ Router::addGroup('/doctor', function () {
|
||||
});
|
||||
});
|
||||
|
||||
// 消息通知
|
||||
// 消息通知s
|
||||
Router::addGroup('/message', function () {
|
||||
// 获取医生消息页通知数据
|
||||
Router::get('/notice', [MessageNoticeController::class, 'getDoctorMessageNotice']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user