修改医生查询
This commit is contained in:
@@ -384,6 +384,39 @@ func (r *UserDoctorDao) GetUserDoctorListSearch(req requests.GetUserDoctorList)
|
||||
query = query.Where("user_name LIKE ?", "%"+req.UserName+"%")
|
||||
}
|
||||
|
||||
// 实名认证状态
|
||||
if req.IDCardStatus != nil {
|
||||
query = query.Where("idcard_status = ?", req.IDCardStatus)
|
||||
}
|
||||
|
||||
// 身份认证状态
|
||||
if req.IdenAuthStatus != nil {
|
||||
query = query.Where("iden_auth_status = ?", req.IdenAuthStatus)
|
||||
}
|
||||
|
||||
// 医生多点执业认证状态
|
||||
if req.MultiPointStatus != nil {
|
||||
query = query.Where("multi_point_status = ?", req.MultiPointStatus)
|
||||
}
|
||||
|
||||
// 是否已绑定结算银行卡
|
||||
if req.IsBindBank != nil {
|
||||
query = query.Where("is_bind_bank = ?", req.IsBindBank)
|
||||
}
|
||||
|
||||
// 医生问诊配置
|
||||
if req.UnInquiryType != "" {
|
||||
result := strings.Split(req.UnInquiryType, ",")
|
||||
if len(result) > 0 {
|
||||
subQuery := global.Db.Model(&model.DoctorInquiryConfig{}).
|
||||
Where("gdxz_doctor_inquiry_config.doctor_id = gdxz_user_doctor.doctor_id").
|
||||
Where("gdxz_doctor_inquiry_config.inquiry_type NOT IN (?)", req.UnInquiryType).
|
||||
Where("gdxz_doctor_inquiry_config.inquiry_mode = ?", req.InquiryMode)
|
||||
|
||||
query = query.Where("EXISTS (?)", subQuery)
|
||||
}
|
||||
}
|
||||
|
||||
// 排序
|
||||
query = query.Order("created_at desc")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user