Browse Source

Merge branch 'master' of http://git.shengws.com/csx/XT_New

csx 4 years ago
parent
commit
78b534e897

+ 5 - 1
conf/app.conf View File

139
 
139
 
140
 
140
 
141
 [dev]
141
 [dev]
142
-mobile_token_expiration_second =3600
142
+mobile_token_expiration_second = 3600
143
 httpdomain = http://api.xt.test.sgjyun.com
143
 httpdomain = http://api.xt.test.sgjyun.com
144
 sso_domain = https://testsso.sgjyun.com
144
 sso_domain = https://testsso.sgjyun.com
145
 front_end_domain = "http://xt.test.sgjyun.com/#"
145
 front_end_domain = "http://xt.test.sgjyun.com/#"
148
 readmysqlport = 3306
148
 readmysqlport = 3306
149
 readmysqluser = root
149
 readmysqluser = root
150
 readmysqlpass = 1Q2W3e4r!@#$
150
 readmysqlpass = 1Q2W3e4r!@#$
151
+//readmysqlname = test_xt
151
 readmysqlname = sgj_xt
152
 readmysqlname = sgj_xt
152
 
153
 
153
 writemysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
154
 writemysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
154
 writemysqlport = 3306
155
 writemysqlport = 3306
155
 writemysqluser = root
156
 writemysqluser = root
156
 writemysqlpass = 1Q2W3e4r!@#$
157
 writemysqlpass = 1Q2W3e4r!@#$
158
+//writemysqlname = test_xt
157
 writemysqlname = sgj_xt
159
 writemysqlname = sgj_xt
158
 
160
 
159
 readuserhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
161
 readuserhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
160
 readuserport = 3306
162
 readuserport = 3306
161
 readuseruser = root
163
 readuseruser = root
162
 readuserpass = 1Q2W3e4r!@#$
164
 readuserpass = 1Q2W3e4r!@#$
165
+//readusername = test_users
163
 readusername = sgj_users
166
 readusername = sgj_users
164
 
167
 
165
 writeuserhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
168
 writeuserhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
166
 writeuserport = 3306
169
 writeuserport = 3306
167
 writeuseruser = root
170
 writeuseruser = root
168
 writeuserpass = 1Q2W3e4r!@#$
171
 writeuserpass = 1Q2W3e4r!@#$
172
+//writeusername = test_users
169
 writeusername = sgj_users
173
 writeusername = sgj_users
170
 
174
 
171
 
175
 

+ 17 - 2
controllers/new_mobile_api_controllers/new_dialysis_api_controller.go View File

2197
 }
2197
 }
2198
 
2198
 
2199
 func (this *NewDialysisApiController) GetMyInforName() {
2199
 func (this *NewDialysisApiController) GetMyInforName() {
2200
-
2201
 	id, _ := this.GetInt64("id")
2200
 	id, _ := this.GetInt64("id")
2202
-	//Rolename, err := service.GetMyInfoName(id)
2203
 	Username, err := service.GetAdminName(id)
2201
 	Username, err := service.GetAdminName(id)
2204
 	if err != nil {
2202
 	if err != nil {
2205
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2203
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2210
 	})
2208
 	})
2211
 }
2209
 }
2212
 
2210
 
2211
+func (this *NewDialysisApiController) GetMyInformationFour() {
2212
+	adminUserInfo := this.GetMobileAdminUserInfo()
2213
+	creatId := adminUserInfo.AdminUser.Id
2214
+	fmt.Println("创建者ID", creatId)
2215
+	orgid := adminUserInfo.Org.Id
2216
+	fmt.Println("orgid", orgid)
2217
+	Username, err := service.GetMyOrgInformationFour(creatId, orgid)
2218
+	if err != nil {
2219
+		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2220
+		return
2221
+	}
2222
+	this.ServeSuccessJSON(map[string]interface{}{
2223
+		"Username": Username,
2224
+	})
2225
+}
2226
+
2213
 func (this *NewDialysisApiController) GetPartionDetail() {
2227
 func (this *NewDialysisApiController) GetPartionDetail() {
2214
 	id, _ := this.GetInt64("id")
2228
 	id, _ := this.GetInt64("id")
2215
 	partionDetail, err := service.GetPartionDetail(id)
2229
 	partionDetail, err := service.GetPartionDetail(id)
2315
 	fmt.Println("cretor", creator)
2329
 	fmt.Println("cretor", creator)
2316
 	adminInfo := this.GetMobileAdminUserInfo()
2330
 	adminInfo := this.GetMobileAdminUserInfo()
2317
 	appId := adminInfo.App.Id
2331
 	appId := adminInfo.App.Id
2332
+	//fmt.Println("appid------------------------------------",appId)
2318
 	information, err := service.GetMyOrgInformation(creator, appId)
2333
 	information, err := service.GetMyOrgInformation(creator, appId)
2319
 	if err != nil {
2334
 	if err != nil {
2320
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2335
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)

+ 1 - 0
controllers/new_mobile_api_controllers/new_mobile_api_router_register.go View File

147
 	beego.Router("/m/api/patient/getmyorginformation", &NewDialysisApiController{}, "Get:GetMyOrgInformation")
147
 	beego.Router("/m/api/patient/getmyorginformation", &NewDialysisApiController{}, "Get:GetMyOrgInformation")
148
 	beego.Router("/m/api/patient/savenametwo", &NewDialysisApiController{}, "Get:SaveNameTwo")
148
 	beego.Router("/m/api/patient/savenametwo", &NewDialysisApiController{}, "Get:SaveNameTwo")
149
 	beego.Router("/m/api/patient/getcurrentorg", &NewDialysisApiController{}, "Get:GetCurrentOrg")
149
 	beego.Router("/m/api/patient/getcurrentorg", &NewDialysisApiController{}, "Get:GetCurrentOrg")
150
+	beego.Router("/m/api/patient/getmyinformationfour", &NewDialysisApiController{}, "Get:GetMyInformationFour")
150
 }
151
 }

+ 6 - 0
service/patientmanage_service.go View File

1261
 	return user, err
1261
 	return user, err
1262
 }
1262
 }
1263
 
1263
 
1264
+func GetMyOrgInformationFour(creator int64, orgid int64) (models.SgjUserAdminRole, error) {
1265
+	role := models.SgjUserAdminRole{}
1266
+	err := UserReadDB().Model(&role).Where("admin_user_id = ? and org_id = ? and status = 1", creator, orgid).Find(&role).Error
1267
+	return role, err
1268
+}
1269
+
1264
 func GetPartionDetail(id int64) (models.DeviceZone, error) {
1270
 func GetPartionDetail(id int64) (models.DeviceZone, error) {
1265
 
1271
 
1266
 	zone := models.DeviceZone{}
1272
 	zone := models.DeviceZone{}