Quellcode durchsuchen

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

csx vor 4 Jahren
Ursprung
Commit
78b534e897

+ 5 - 1
conf/app.conf Datei anzeigen

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

+ 17 - 2
controllers/new_mobile_api_controllers/new_dialysis_api_controller.go Datei anzeigen

@@ -2197,9 +2197,7 @@ func (this *NewDialysisApiController) EditOrg() {
2197 2197
 }
2198 2198
 
2199 2199
 func (this *NewDialysisApiController) GetMyInforName() {
2200
-
2201 2200
 	id, _ := this.GetInt64("id")
2202
-	//Rolename, err := service.GetMyInfoName(id)
2203 2201
 	Username, err := service.GetAdminName(id)
2204 2202
 	if err != nil {
2205 2203
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
@@ -2210,6 +2208,22 @@ func (this *NewDialysisApiController) GetMyInforName() {
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 2227
 func (this *NewDialysisApiController) GetPartionDetail() {
2214 2228
 	id, _ := this.GetInt64("id")
2215 2229
 	partionDetail, err := service.GetPartionDetail(id)
@@ -2315,6 +2329,7 @@ func (this *NewDialysisApiController) GetMyOrgInformation() {
2315 2329
 	fmt.Println("cretor", creator)
2316 2330
 	adminInfo := this.GetMobileAdminUserInfo()
2317 2331
 	appId := adminInfo.App.Id
2332
+	//fmt.Println("appid------------------------------------",appId)
2318 2333
 	information, err := service.GetMyOrgInformation(creator, appId)
2319 2334
 	if err != nil {
2320 2335
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)

+ 1 - 0
controllers/new_mobile_api_controllers/new_mobile_api_router_register.go Datei anzeigen

@@ -147,4 +147,5 @@ func NewMobileAPIControllersRegisterRouters() {
147 147
 	beego.Router("/m/api/patient/getmyorginformation", &NewDialysisApiController{}, "Get:GetMyOrgInformation")
148 148
 	beego.Router("/m/api/patient/savenametwo", &NewDialysisApiController{}, "Get:SaveNameTwo")
149 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 Datei anzeigen

@@ -1261,6 +1261,12 @@ func GetAdminName(id int64) (models.AdminUsers, error) {
1261 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 1270
 func GetPartionDetail(id int64) (models.DeviceZone, error) {
1265 1271
 
1266 1272
 	zone := models.DeviceZone{}