新增医生列表

This commit is contained in:
2023-07-04 11:38:31 +08:00
parent 9796314616
commit 0078b06b40
9 changed files with 128 additions and 33 deletions
+5 -4
View File
@@ -47,8 +47,8 @@ func (r *UserDoctorDao) EditUserDoctor(tx *gorm.DB, maps interface{}, data inter
}
// EditUserDoctorById 修改医生-医生id
func (r *UserDoctorDao) EditUserDoctorById(tx *gorm.DB, userId int64, data interface{}) error {
err := tx.Model(&model.UserDoctor{}).Where("doctor_id = ?", userId).Updates(data).Error
func (r *UserDoctorDao) EditUserDoctorById(tx *gorm.DB, doctorId int64, data interface{}) error {
err := tx.Model(&model.UserDoctor{}).Where("doctor_id = ?", doctorId).Updates(data).Error
if err != nil {
return err
}
@@ -78,7 +78,7 @@ func (r *UserDoctorDao) GetUserDoctorDaoPageSearch(getUserDoctorPage requests.Ge
// 医院
query = query.Preload("Hospital", func(db *gorm.DB) *gorm.DB {
return db.Select("hospital_id, hospital_name,hospital_level_name")
return db.Select("hospital_id,hospital_name,hospital_level_name")
})
// 手机号
@@ -92,7 +92,7 @@ func (r *UserDoctorDao) GetUserDoctorDaoPageSearch(getUserDoctorPage requests.Ge
// 用户名称
if getUserDoctorPage.UserName != "" {
query = query.Where("user_name = ?", getUserDoctorPage.UserName)
query = query.Where("user_name LIKE ?", "%"+getUserDoctorPage.UserName+"%")
}
// 状态
@@ -138,6 +138,7 @@ func (r *UserDoctorDao) GetUserDoctorDaoPageSearch(getUserDoctorPage requests.Ge
query = query.Where("doctor_title = ?", getUserDoctorPage.DoctorTitle)
}
// 问诊类型
if getUserDoctorPage.InquiryService != "" {
result := strings.Split(getUserDoctorPage.InquiryService, ",")
if len(result) > 0 {