Browse Source

体积小

XMLWAN 3 years ago
parent
commit
1b1011b9e4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      service/xcx_mobile_api_service.go

+ 1 - 1
service/xcx_mobile_api_service.go View File

34
 func GetMobilePatientInfo(mobile string) (*models.XcxPatients, error) {
34
 func GetMobilePatientInfo(mobile string) (*models.XcxPatients, error) {
35
 
35
 
36
 	patients := models.XcxPatients{}
36
 	patients := models.XcxPatients{}
37
-	err := XTReadDB().Model(&patients).Where("(phone = ? or home_telephone ) and status = 1", mobile).Find(&patients).Error
37
+	err := XTReadDB().Model(&patients).Where("(phone = ? or home_telephone = ? ) and status = 1", mobile, mobile).Find(&patients).Error
38
 	if err == gorm.ErrRecordNotFound {
38
 	if err == gorm.ErrRecordNotFound {
39
 		return nil, err
39
 		return nil, err
40
 	}
40
 	}