|
@@ -31,16 +31,16 @@ func GetLoginInfor(mobile string) (models.XcxAdminUserRole, error) {
|
31
|
31
|
return role, err
|
32
|
32
|
}
|
33
|
33
|
|
34
|
|
-func GetMobilePatientInfo(mobile string) (*models.XcxPatients, error) {
|
|
34
|
+func GetMobilePatientInfo(mobile string) (models.XcxPatients, error) {
|
35
|
35
|
|
36
|
36
|
patients := models.XcxPatients{}
|
37
|
37
|
err := XTReadDB().Model(&patients).Where("(phone = ? or home_telephone = ? ) and status = 1", mobile, mobile).Find(&patients).Error
|
38
|
|
- if err == gorm.ErrRecordNotFound {
|
39
|
|
- return nil, err
|
40
|
|
- }
|
41
|
|
-
|
42
|
|
- if err != nil {
|
43
|
|
- return nil, err
|
44
|
|
- }
|
45
|
|
- return &patients, nil
|
|
38
|
+ //if err == gorm.ErrRecordNotFound {
|
|
39
|
+ // return nil, err
|
|
40
|
+ //}
|
|
41
|
+ //
|
|
42
|
+ //if err != nil {
|
|
43
|
+ // return nil, err
|
|
44
|
+ //}
|
|
45
|
+ return patients, err
|
46
|
46
|
}
|