Ver código fonte

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

XMLWAN 2 anos atrás
pai
commit
57b77925fa
2 arquivos alterados com 4 adições e 20 exclusões
  1. 1 16
      conf/app.conf
  2. 3 4
      service/xcx_mobile_api_service.go

+ 1 - 16
conf/app.conf Ver arquivo

@@ -1,5 +1,5 @@
1 1
 appname = 小程序
2
-httpport = 9539
2
+httpport = 9529
3 3
 runmode = prod
4 4
 
5 5
 #
@@ -113,21 +113,6 @@ writepatientuser = syh
113 113
 writepatientpass = xhPECP2nFObR8aUK
114 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 116
 redishost = 349e580b2a524290.redis.rds.aliyuncs.com
132 117
 redisport = 6379
133 118
 redispasswrod = TZtBW098WId3i27clkpj3q8dnUaVFP

+ 3 - 4
service/xcx_mobile_api_service.go Ver arquivo

@@ -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
 	}