审核失败删除失败字段
This commit is contained in:
parent
0d173902e8
commit
831e59842a
@ -54,4 +54,14 @@ class DoctorIdenFail extends Model
|
|||||||
{
|
{
|
||||||
return self::where($params)->get($fields);
|
return self::where($params)->get($fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
* @param array $params
|
||||||
|
* @return int|mixed
|
||||||
|
*/
|
||||||
|
public static function del(array $params): mixed
|
||||||
|
{
|
||||||
|
return self::where($params)->delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,4 +92,14 @@ class DoctorIntroductionRecord extends Model
|
|||||||
->first($fields);
|
->first($fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
* @param array $params
|
||||||
|
* @return int|mixed
|
||||||
|
*/
|
||||||
|
public static function del(array $params): mixed
|
||||||
|
{
|
||||||
|
return self::where($params)->delete();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -645,6 +645,18 @@ class DoctorAuthService extends BaseService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除认证失败字段
|
||||||
|
if ($doctor['iden_auth_status'] == 3){
|
||||||
|
// 删除认证失败字段
|
||||||
|
$params = array();
|
||||||
|
$params['doctor_id'] = $user_info['client_user_id'];
|
||||||
|
$res = DoctorIdenFail::del($params);
|
||||||
|
if (!$res){
|
||||||
|
Db::rollBack();
|
||||||
|
return fail(HttpEnumCode::SERVER_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Db::commit();
|
Db::commit();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Db::rollBack();
|
Db::rollBack();
|
||||||
@ -1136,6 +1148,27 @@ class DoctorAuthService extends BaseService
|
|||||||
|
|
||||||
Db::beginTransaction();
|
Db::beginTransaction();
|
||||||
try {
|
try {
|
||||||
|
// 审核不通过
|
||||||
|
if ($doctor['iden_auth_status'] == 3){
|
||||||
|
// 删除认证失败字段
|
||||||
|
$params = array();
|
||||||
|
$params['doctor_id'] = $user_info['client_user_id'];
|
||||||
|
$res = DoctorIdenFail::del($params);
|
||||||
|
if (!$res){
|
||||||
|
Db::rollBack();
|
||||||
|
return fail(HttpEnumCode::SERVER_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除简介修改记录表
|
||||||
|
$params = array();
|
||||||
|
$params['doctor_id'] = $user_info['client_user_id'];
|
||||||
|
$res = DoctorIntroductionRecord::del($params);
|
||||||
|
if (!$res){
|
||||||
|
Db::rollBack();
|
||||||
|
return fail(HttpEnumCode::SERVER_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 新增医生简介修改记录表
|
// 新增医生简介修改记录表
|
||||||
$doctor_introduction_record_data['doctor_id'] = $doctor['doctor_id'];
|
$doctor_introduction_record_data['doctor_id'] = $doctor['doctor_id'];
|
||||||
$doctor_introduction_record = DoctorIntroductionRecord::addDoctorIntroductionRecord($doctor_introduction_record_data);
|
$doctor_introduction_record = DoctorIntroductionRecord::addDoctorIntroductionRecord($doctor_introduction_record_data);
|
||||||
@ -1157,6 +1190,8 @@ class DoctorAuthService extends BaseService
|
|||||||
return fail(HttpEnumCode::SERVER_ERROR);
|
return fail(HttpEnumCode::SERVER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Db::commit();
|
Db::commit();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Db::rollBack();
|
Db::rollBack();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user