1
This commit is contained in:
parent
484f60b761
commit
0d99739e39
@ -806,7 +806,7 @@ class DoctorAuthService extends BaseService
|
||||
}
|
||||
|
||||
// 身份认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)
|
||||
if ($doctor['iden_auth_status'] != 3){
|
||||
if ($doctor['iden_auth_status'] != 3 && $doctor['iden_auth_status'] != 1){
|
||||
return success(null);
|
||||
}
|
||||
|
||||
|
||||
@ -1781,7 +1781,8 @@ class UserDoctorService extends BaseService
|
||||
/**
|
||||
* 新增医生接诊
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function addDoctorInquiry(): array
|
||||
{
|
||||
@ -1798,17 +1799,21 @@ class UserDoctorService extends BaseService
|
||||
return fail(HttpEnumCode::HTTP_ERROR, "接诊失败");
|
||||
}
|
||||
|
||||
$redis = $this->container->get(Redis::class);
|
||||
$redis_key = "order_inquiry_lock_" . $order_inquiry_id;
|
||||
$redis_lock = $redis->setnx($redis_key,1);
|
||||
if (!$redis_lock){
|
||||
// 设置失败,表示已经设置该值
|
||||
try {
|
||||
$redis = $this->container->get(Redis::class);
|
||||
$redis_key = "order_inquiry_lock_" . $order_inquiry_id;
|
||||
$redis_lock = $redis->setnx($redis_key,1);
|
||||
if (!$redis_lock){
|
||||
// 设置失败,表示已经设置该值
|
||||
return fail(HttpEnumCode::HTTP_SUCCESS,"请您稍后重试");
|
||||
}
|
||||
|
||||
// 设置过期时间
|
||||
$redis->expire($redis_key,3);
|
||||
}catch (\Throwable $e){
|
||||
return fail(HttpEnumCode::HTTP_SUCCESS,"请您稍后重试");
|
||||
}
|
||||
|
||||
// 设置过期时间
|
||||
$redis->expire($redis_key,3);
|
||||
|
||||
if ($order_inquiry['inquiry_status'] != 3) {
|
||||
// 问诊订单状态(1:待支付 2:待分配 3:待接诊 4:已接诊 5:已完成 6:已结束 7:已取消)
|
||||
return fail(HttpEnumCode::HTTP_ERROR, "接诊失败");
|
||||
@ -1825,6 +1830,8 @@ class UserDoctorService extends BaseService
|
||||
return fail(HttpEnumCode::HTTP_ERROR, "订单未支付,无法接诊");
|
||||
}
|
||||
|
||||
// 获取系统问诊配置
|
||||
|
||||
Db::beginTransaction();
|
||||
|
||||
try {
|
||||
@ -1836,6 +1843,8 @@ class UserDoctorService extends BaseService
|
||||
$params['order_inquiry_id'] = $order_inquiry_id;
|
||||
OrderInquiry::edit($params,$data);
|
||||
|
||||
// 获取订单结束周期
|
||||
|
||||
// 添加自动结束队列
|
||||
if ($order_inquiry['inquiry_type'] == 1 || $order_inquiry['inquiry_type'] == 3){
|
||||
// 专家问诊-公益问诊
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user