|
@@ -127,11 +127,11 @@ func GetWeekDayOfWeek() (weekMonday string) {
|
127
|
127
|
return
|
128
|
128
|
}
|
129
|
129
|
|
130
|
|
-func GetMobilePatient(mobile string) (*models.XcxPatients, error) {
|
|
130
|
+func GetMobilePatient(mobile string, idcard string) (*models.XcxPatients, error) {
|
131
|
131
|
|
132
|
132
|
patient := models.XcxPatients{}
|
133
|
|
-
|
134
|
|
- err := XTReadDB().Model(&patient).Where("id_card_no = ? and status = 1", mobile).Find(&patient).Error
|
|
133
|
+ err := XTReadDB().Model(&patient).Where("(phone = ? or relative_phone =?) and id_card_no =?", mobile, mobile, idcard).Find(&patient).Error
|
|
134
|
+ //err := XTReadDB().Model(&patient).Where("id_card_no = ? and status = 1", mobile).Find(&patient).Error
|
135
|
135
|
if err == gorm.ErrRecordNotFound {
|
136
|
136
|
return nil, err
|
137
|
137
|
}
|