Browse Source

Merge branch 'master' of http://git.shengws.com/xmg123/Xcx_New

XMLWAN 2 years ago
parent
commit
57b77925fa
2 changed files with 4 additions and 20 deletions
  1. 1 16
      conf/app.conf
  2. 3 4
      service/xcx_mobile_api_service.go

+ 1 - 16
conf/app.conf View File

1
 appname = 小程序
1
 appname = 小程序
2
-httpport = 9539
2
+httpport = 9529
3
 runmode = prod
3
 runmode = prod
4
 
4
 
5
 #
5
 #
113
 writepatientpass = xhPECP2nFObR8aUK
113
 writepatientpass = xhPECP2nFObR8aUK
114
 writepatientname = sgj_cdm
114
 writepatientname = sgj_cdm
115
 
115
 
116
-
117
-readswshost = shengws1.mysql.rds.aliyuncs.com
118
-readswsport = 3306
119
-readswsuser = syh
120
-readswspass = xhPECP2nFObR8aUK
121
-readswsname = shengws
122
-
123
-
124
-
125
-writeswshost = shengws1.mysql.rds.aliyuncs.com
126
-writeswsport = 3306
127
-writeswsuser = syh
128
-writeswspass = xhPECP2nFObR8aUK
129
-writeswsname = shengws
130
-
131
 redishost = 349e580b2a524290.redis.rds.aliyuncs.com
116
 redishost = 349e580b2a524290.redis.rds.aliyuncs.com
132
 redisport = 6379
117
 redisport = 6379
133
 redispasswrod = TZtBW098WId3i27clkpj3q8dnUaVFP
118
 redispasswrod = TZtBW098WId3i27clkpj3q8dnUaVFP

+ 3 - 4
service/xcx_mobile_api_service.go View File

9
 	"errors"
9
 	"errors"
10
 	"fmt"
10
 	"fmt"
11
 	"github.com/jinzhu/gorm"
11
 	"github.com/jinzhu/gorm"
12
-	"net/http"
13
 	"time"
12
 	"time"
14
 )
13
 )
15
 
14
 
131
 func GetMobilePatient(mobile string, idcard string) (*models.XcxPatients, error) {
130
 func GetMobilePatient(mobile string, idcard string) (*models.XcxPatients, error) {
132
 
131
 
133
 	patient := models.XcxPatients{}
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
 	if err == gorm.ErrRecordNotFound {
135
 	if err == gorm.ErrRecordNotFound {
137
 		return nil, err
136
 		return nil, err
138
 	}
137
 	}
154
 func GetMobilePatientOne(mobile string) (*models.XcxAdminUserRole, error) {
153
 func GetMobilePatientOne(mobile string) (*models.XcxAdminUserRole, error) {
155
 
154
 
156
 	patient := models.XcxAdminUserRole{}
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
 	if err == gorm.ErrRecordNotFound {
157
 	if err == gorm.ErrRecordNotFound {
159
 		return nil, err
158
 		return nil, err
160
 	}
159
 	}