医生简介1

This commit is contained in:
wucongxing 2024-02-19 09:58:24 +08:00
parent 329ab42f05
commit 92828df915
2 changed files with 5 additions and 17 deletions

View File

@ -11,7 +11,6 @@ use Hyperf\Snowflake\Concern\Snowflake;
/**
* @property int $record_id 主键id
* @property int $doctor_id 医生id
* @property int $introduction_status 个人简介审核状态0:未审核 1:审核通过 2:审核中 3:审核失败)
* @property string $avatar 头像
* @property string $be_good_at 擅长
* @property string $brief_introduction 医生简介
@ -31,7 +30,7 @@ class DoctorIntroductionRecord extends Model
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['record_id', 'doctor_id', 'introduction_status', 'avatar', 'be_good_at', 'brief_introduction', 'expertise_ids', 'created_at', 'updated_at'];
protected array $fillable = ['record_id', 'doctor_id', 'avatar', 'be_good_at', 'brief_introduction', 'expertise_ids', 'created_at', 'updated_at'];
protected string $primaryKey = "record_id";

View File

@ -917,20 +917,10 @@ class DoctorAuthService extends BaseService
$UserDoctorService = new UserDoctorService();
$result['doctor_expertise'] = $UserDoctorService->getDoctorSelectedExpertise($doctor['doctor_id']);
if ($doctor['introduction_status'] == 2){
// 获取修改数据
$params = array();
$params['doctor_id'] = $doctor['doctor_id'];
$params['introduction_status'] = 2;
$doctor_introduction_record = DoctorIntroductionRecord::getLastOne($params);
} elseif ($doctor['introduction_status'] == 3){
// 获取修改数据
$params = array();
$params['doctor_id'] = $doctor['doctor_id'];
$params['introduction_status'] = 3;
$doctor_introduction_record = DoctorIntroductionRecord::getLastOne($params);
}
$doctor_introduction_record = DoctorIntroductionRecord::getOne($params);
if (!empty($doctor_introduction_record)){
if (!empty($doctor_introduction_record['avatar'])){
$result['avatar'] = PcreMatch::pregRemoveOssWebsite($doctor_introduction_record['avatar']);
@ -1100,7 +1090,6 @@ class DoctorAuthService extends BaseService
try {
// 新增医生简介修改记录表
$doctor_introduction_record_data['doctor_id'] = $doctor['doctor_id'];
$doctor_introduction_record_data['is_verified'] = 0;
$doctor_introduction_record = DoctorIntroductionRecord::addDoctorIntroductionRecord($doctor_introduction_record_data);
if (empty($doctor_introduction_record)){
Db::rollBack();