新增搜索医生参数问题

This commit is contained in:
wucongxing 2023-07-13 13:57:48 +08:00
parent 7c56b936a4
commit b412477670
3 changed files with 40 additions and 17 deletions

View File

@ -106,7 +106,7 @@ func (r *UserDoctorDao) GetUserDoctorPageSearch(getUserDoctorPage requests.GetUs
}
// 状态
if getUserDoctorPage.UserStatus != 0 {
if getUserDoctorPage.UserStatus != nil {
query = query.Where("status = ?", getUserDoctorPage.UserStatus)
}
@ -125,26 +125,26 @@ func (r *UserDoctorDao) GetUserDoctorPageSearch(getUserDoctorPage requests.GetUs
}
// 实名认证状态
if getUserDoctorPage.IDCardStatus != 0 {
if getUserDoctorPage.IDCardStatus != nil {
query = query.Where("idcard_status = ?", getUserDoctorPage.IDCardStatus)
}
// 身份认证状态
if getUserDoctorPage.IdenAuthStatus != 0 {
if getUserDoctorPage.IdenAuthStatus != nil {
query = query.Where("iden_auth_status = ?", getUserDoctorPage.IdenAuthStatus)
}
// 医生多点执业认证状态
if getUserDoctorPage.MultiPointStatus != 0 {
if getUserDoctorPage.MultiPointStatus != nil {
query = query.Where("multi_point_status = ?", getUserDoctorPage.MultiPointStatus)
}
// 是否首页推荐
if getUserDoctorPage.IsRecommend != 0 {
if getUserDoctorPage.IsRecommend != nil {
query = query.Where("is_recommend = ?", getUserDoctorPage.IsRecommend)
}
if getUserDoctorPage.DoctorTitle != 0 {
if getUserDoctorPage.DoctorTitle != nil {
query = query.Where("doctor_title = ?", getUserDoctorPage.DoctorTitle)
}
@ -188,7 +188,7 @@ func (r *UserDoctorDao) GetUserDoctorPageSearch(getUserDoctorPage requests.GetUs
}
if getUserDoctorPage.IsEnterpriseDeepCooperation != 0 {
if getUserDoctorPage.IsEnterpriseDeepCooperation != nil {
query = query.Where("doctor_title = ?", getUserDoctorPage.DoctorTitle)
}
@ -244,7 +244,7 @@ func (r *UserDoctorDao) GetUserDoctorPendingPageSearch(p requests.GetUserDoctorP
}
// 身份认证状态
if p.IdenAuthStatus != 0 {
if p.IdenAuthStatus != nil {
query = query.Where("iden_auth_status = ?", p.IdenAuthStatus)
}

View File

@ -14,17 +14,17 @@ type GetUserDoctorPage struct {
PageSize int `json:"page_size" form:"page_size" label:"每页个数"`
Mobile string `json:"mobile" form:"mobile" label:"手机号"`
UserName string `json:"user_name" form:"user_name" label:"用户名"`
UserStatus int `json:"user_status" form:"user_status" label:"用户状态"` // 0:禁用 1:正常 2:删除)
UserStatus *int `json:"user_status" form:"user_status" label:"用户状态"` // 0:禁用 1:正常 2:删除)
HospitalName string `json:"hospital_name" form:"hospital_name" label:"医院名称"`
DepartmentCustomName string `json:"department_custom_name" form:"department_custom_name" label:"科室名称"`
IDCardStatus int `json:"idcard_status" form:"idcard_status" label:"身份证状态"` // 0:未认证 1:认证通过 2:认证失败)
IdenAuthStatus int `json:"iden_auth_status" form:"iden_auth_status" label:"认证状态"` // 0:未认证 1:认证通过 2:审核中 3:认证失败)
MultiPointStatus int `json:"multi_point_status" form:"multi_point_status" label:"多点执业状态"` // 医生多点执业认证状态0:未认证 1:认证通过 2:审核中 3:认证失败)
IsRecommend int `json:"is_recommend" form:"is_recommend" label:"是否推荐"` // 0:否 1:是)
DoctorTitle int `json:"doctor_title" form:"doctor_title" label:"医生职称"` // 1:主任医师 2:主任中医师 3:副主任医师 4:副主任中医师 5:主治医师 6:住院医师)
IDCardStatus *int `json:"idcard_status" form:"idcard_status" label:"身份证状态"` // 0:未认证 1:认证通过 2:认证失败)
IdenAuthStatus *int `json:"iden_auth_status" form:"iden_auth_status" label:"认证状态"` // 0:未认证 1:认证通过 2:审核中 3:认证失败)
MultiPointStatus *int `json:"multi_point_status" form:"multi_point_status" label:"多点执业状态"` // 医生多点执业认证状态0:未认证 1:认证通过 2:审核中 3:认证失败)
IsRecommend *int `json:"is_recommend" form:"is_recommend" label:"是否推荐"` // 0:否 1:是)
DoctorTitle *int `json:"doctor_title" form:"doctor_title" label:"医生职称"` // 1:主任医师 2:主任中医师 3:副主任医师 4:副主任中医师 5:主治医师 6:住院医师)
InquiryService string `json:"inquiry_service" form:"inquiry_service" label:"问诊服务"` // 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药)
IsEnterpriseDeepCooperation int `json:"is_enterprise_deep_cooperation" form:"is_enterprise_deep_cooperation" label:"是否企业深度合作"` // 0:否 1:是)
IsSysDiagnoCooperation int `json:"is_sys_diagno_cooperation" form:"is_sys_diagno_cooperation" label:"是否先思达合作医生"` // 0:否 1:是)
IsEnterpriseDeepCooperation *int `json:"is_enterprise_deep_cooperation" form:"is_enterprise_deep_cooperation" label:"是否企业深度合作"` // 0:否 1:是)
IsSysDiagnoCooperation *int `json:"is_sys_diagno_cooperation" form:"is_sys_diagno_cooperation" label:"是否先思达合作医生"` // 0:否 1:是)
}
// PutUserDoctor 修改医生
@ -81,7 +81,7 @@ type GetUserDoctorPendingPage struct {
Mobile string `json:"mobile" form:"mobile" label:"手机号"`
UserName string `json:"user_name" form:"user_name" label:"用户名"`
HospitalName string `json:"hospital_name" form:"hospital_name" label:"医院名称"`
IdenAuthStatus int `json:"iden_auth_status" form:"iden_auth_status" label:"认证状态"` // 0:未认证 1:认证通过 2:审核中 3:认证失败)
IdenAuthStatus *int `json:"iden_auth_status" form:"iden_auth_status" label:"认证状态"` // 0:未认证 1:认证通过 2:审核中 3:认证失败)
}
// PutUserDoctorPending 审核-审核医生

View File

@ -990,6 +990,13 @@ func (r *UserDoctorService) PutUserDoctorPending(doctorId int64, req requests.Pu
return false, errors.New("已审核成功,无法进行操作")
}
// 获取医院名称
hospitalDao := dao.Hospital{}
hospital, err := hospitalDao.GetHospitalById(userDoctor.HospitalID)
if err != nil {
return false, errors.New("审核失败")
}
userDoctorData := make(map[string]interface{}) // 医生数据
userDoctorInfoData := make(map[string]interface{}) // 医生详情数据
@ -1137,6 +1144,22 @@ func (r *UserDoctorService) PutUserDoctorPending(doctorId int64, req requests.Pu
}
// 更新医生im资料
profileItem := []tencentIm.ProfileItem{
{
Tag: "Tag_Profile_Custom_Hname", // 医院
Value: hospital.HospitalName,
},
{
Tag: "Tag_Profile_Custom_Title", // 职称
Value: hospital.HospitalName,
},
}
res, err := tencentIm.SetProfile(strconv.FormatInt(userDoctor.UserId, 10), profileItem)
if err != nil || res != true {
tx.Rollback()
return false, errors.New(err.Error())
}
}
// 修改医生数据