|
@@ -9,7 +9,6 @@ import (
|
9
|
9
|
"errors"
|
10
|
10
|
"fmt"
|
11
|
11
|
"github.com/jinzhu/gorm"
|
12
|
|
- "net/http"
|
13
|
12
|
"time"
|
14
|
13
|
)
|
15
|
14
|
|
|
@@ -131,8 +130,8 @@ func GetWeekDayOfWeek() (weekMonday string) {
|
131
|
130
|
func GetMobilePatient(mobile string, idcard string) (*models.XcxPatients, error) {
|
132
|
131
|
|
133
|
132
|
patient := models.XcxPatients{}
|
134
|
|
- err := XTReadDB().Model(&patient).Where("(phone = ? or relative_phone =?) and id_card_no = ?", mobile, mobile, idcard).Find(&patient).Error
|
135
|
|
-
|
|
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
|
136
|
135
|
if err == gorm.ErrRecordNotFound {
|
137
|
136
|
return nil, err
|
138
|
137
|
}
|
|
@@ -154,7 +153,7 @@ func GetTemplateMode(orgid int64) (models.XcxGobalTemplate, error) {
|
154
|
153
|
func GetMobilePatientOne(mobile string) (*models.XcxAdminUserRole, error) {
|
155
|
154
|
|
156
|
155
|
patient := models.XcxAdminUserRole{}
|
157
|
|
- err := UserReadDB().Model(&patient).Where("mobile = ? and status = 1", mobile).Find(&patient).Error
|
|
156
|
+ err := XTReadDB().Model(&patient).Where("mobile = ? and status = 1", mobile).Find(&patient).Error
|
158
|
157
|
if err == gorm.ErrRecordNotFound {
|
159
|
158
|
return nil, err
|
160
|
159
|
}
|