XMLWAN 3 vuotta sitten
vanhempi
commit
e0152e4490
1 muutettua tiedostoa jossa 36 lisäystä ja 35 poistoa
  1. 36 35
      controllers/xcx_mobile_api_controller.go/xcx_api_controller.go

+ 36 - 35
controllers/xcx_mobile_api_controller.go/xcx_api_controller.go Näytä tiedosto

@@ -189,14 +189,14 @@ func (this *XcxApiController) GetPatientList() {
189 189
 	//var iv = "r7BXXKkLb8qrSNn05n0qiA=="
190 190
 	//var strs = "CiyLU1Aw2KjvrjMdj8YKliAjtP4gsMZMQmRzooG2xrDcvSnxIMXFufNstNGTyaGS9uT5geRa0W4oTOb1WT7fJlAC+oNPdbB+3hVbJSRgv+4lGOETKUQz6OYStslQ142dNCuabNPGBzlooOmB231qMM85d2/fV6ChevvXvQP8Hkue1poOFtnEtpyxVLW1zAo6/1Xx1COxFvrc2d7UL/lmHInNlxuacJXwu0fjpXfz/YqYzBIBzD6WUfTIF9GRHpOn/Hz7saL8xz+W//FRAUid1OksQaQx4CMs8LOddcQhULW4ucetDf96JcR3g0gfRK4PC7E/r7Z6xNrXd2UIeorGj5Ef7b1pJAYB6Y5anaHqZ9J6nKEBvB4DnNLIVWSgARns/8wR2SiRS7MNACwTyrGvt9ts8p12PKFdlqYTopNHR1Vf7XjfhQlVsAJdNiKdYmYVoKlaRv85IfVunYzO0IKXsyl7JCUjCpoG20f0a04COwfneQAGGwd5oa+T8yO5hzuyDb/XcxxmK01EpqOyuxINew=="
191 191
 
192
-	appid := "wx4f4bc4dec97d474b"
193
-	key := "4BactRvIKCBXzvpyl2SQyQ=="
194
-	strs := "Gr5gmKz9OjWGipAxt3ujQtHBBXV/Uvhsm+qvvZy6gF+HBc8c6gZhZkqIqLbs8nHkId5zm/mGVNpghvM/egYTLOOI7LxhvjRsPE1691j+jltU9OIavGIWFp3I4m3OdP9CuPohhrpZPgwsGajJmtGNNjPvGA61ssErVZ7SBceq+leag532zCmgEXN3NpZP0TRgpIpwpegCAEW07oyI0LiRYA=="
195
-	iv := "aXiAcKIWKfseTyzelqcZ0w=="
196
-	//data, err := service.Dncrypt(strs, key, iv)
197
-	//fmt.Println(err)
198
-
199
-	data, err := service.DecryptData(appid, key, iv, strs)
192
+	//appid := "wx20b60369111b063a"
193
+	key := "Yz1HgsFX3yJvWPJSEdwJDA=="
194
+	strs := "uSevGQ5ShkiHjQuqz7s36SKZisVGA4fHH/dy+etg0W7ibVeidl6TyFS+kQZ6B9AI2T+1kOtKXeyveQR7q2TXJdu3fhKCFoLKVFzICNEvkiHMnchJ0T0OpRO3oT+icYq80+egvT+jMSgP7yi0cAgmiKaK/4QURD7+nvxRAj9drzz77sbeFt8KElb1LN/+Wn8dIoQzisxbON9G1VJYYtyBkQ=="
195
+	iv := "JgsbDhJ613uaAgAoBVh0Zw=="
196
+	data, err := service.Dncrypt(strs, key, iv)
197
+	fmt.Println(err)
198
+
199
+	//data, err := service.DecryptData(appid, key, iv, strs)
200 200
 	patient_id, _ := this.GetInt64("patient_id")
201 201
 	patient, err := service.GetPatientListByPatientId(patient_id)
202 202
 
@@ -218,8 +218,8 @@ func (this *XcxApiController) GetDataInfo() {
218 218
 	key := this.GetString("key")
219 219
 	iv := this.GetString("iv")
220 220
 	encryptedData := this.GetString("encryptedData")
221
-	list, _ := service.DecryptData(appid, key, iv, encryptedData)
222
-	//list, err := service.Dncrypt(encryptedData, key, iv)
221
+	//list, _ := service.DecryptData(appid, key, iv, encryptedData)
222
+	list, _ := service.Dncrypt(encryptedData, key, iv)
223 223
 
224 224
 	this.ServeSuccessJSON(map[string]interface{}{
225 225
 		"list": list,
@@ -253,23 +253,24 @@ func (this *XcxApiController) GetScheduleInfo() {
253 253
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
254 254
 		return
255 255
 	}
256
+
256 257
 	array := []interface{}{
257
-		map[string]string{"schedule_type": "1", "schedule_date": "1630252800", "schedule_week": "1", "mode_id": "", "name": ""},
258
-		map[string]string{"schedule_type": "2", "schedule_date": "1630252800", "schedule_week": "1", "mode_id": "", "name": ""},
259
-		map[string]string{"schedule_type": "3", "schedule_date": "1630252800", "schedule_week": "1", "mode_id": "", "name": ""},
260
-		map[string]string{"schedule_type": "1", "schedule_date": "1630339200", "schedule_week": "2", "mode_id": "", "name": ""},
261
-		map[string]string{"schedule_type": "2", "schedule_date": "1630339200", "schedule_week": "2", "mode_id": "", "name": ""},
262
-		map[string]string{"schedule_type": "3", "schedule_date": "1630339200", "schedule_week": "2", "mode_id": "", "name": ""},
263
-		map[string]string{"schedule_type": "1", "schedule_date": "1630425600", "schedule_week": "3", "mode_id": "", "name": ""},
264
-		map[string]string{"schedule_type": "2", "schedule_date": "1630425600", "schedule_week": "3", "mode_id": "", "name": ""},
265
-		map[string]string{"schedule_type": "3", "schedule_date": "1630425600", "schedule_week": "3", "mode_id": "", "name": ""},
266
-		map[string]string{"schedule_type": "1", "schedule_date": "1630512000", "schedule_week": "4", "mode_id": "", "name": ""},
267
-		map[string]string{"schedule_type": "2", "schedule_date": "1630512000", "schedule_week": "4", "mode_id": "", "name": ""},
268
-		map[string]string{"schedule_type": "3", "schedule_date": "1630512000", "schedule_week": "4", "mode_id": "", "name": ""},
269
-		map[string]string{"schedule_type": "1", "schedule_date": "1630598400", "schedule_week": "5", "mode_id": "", "name": ""},
270
-		map[string]string{"schedule_type": "2", "schedule_date": "1630598400", "schedule_week": "5", "mode_id": "", "name": ""},
271
-		map[string]string{"schedule_type": "3", "schedule_date": "1630598400", "schedule_week": "5", "mode_id": "", "name": ""},
272
-		map[string]string{"schedule_type": "1", "schedule_date": "1630684800", "schedule_week": "6", "mode_id": "", "name": ""},
258
+		map[string]string{"schedule_type": "1", "schedule_date": "1632067200", "schedule_week": "1", "mode_id": "", "name": ""},
259
+		map[string]string{"schedule_type": "2", "schedule_date": "1632067200", "schedule_week": "1", "mode_id": "", "name": ""},
260
+		map[string]string{"schedule_type": "3", "schedule_date": "1632067200", "schedule_week": "1", "mode_id": "", "name": ""},
261
+		map[string]string{"schedule_type": "1", "schedule_date": "1632153600", "schedule_week": "2", "mode_id": "", "name": ""},
262
+		map[string]string{"schedule_type": "2", "schedule_date": "1632153600", "schedule_week": "2", "mode_id": "", "name": ""},
263
+		map[string]string{"schedule_type": "3", "schedule_date": "1632153600", "schedule_week": "2", "mode_id": "", "name": ""},
264
+		map[string]string{"schedule_type": "1", "schedule_date": "1632240000", "schedule_week": "3", "mode_id": "", "name": ""},
265
+		map[string]string{"schedule_type": "2", "schedule_date": "1632240000", "schedule_week": "3", "mode_id": "", "name": ""},
266
+		map[string]string{"schedule_type": "3", "schedule_date": "1632240000", "schedule_week": "3", "mode_id": "", "name": ""},
267
+		map[string]string{"schedule_type": "1", "schedule_date": "1632240000", "schedule_week": "4", "mode_id": "", "name": ""},
268
+		map[string]string{"schedule_type": "2", "schedule_date": "1632326400", "schedule_week": "4", "mode_id": "", "name": ""},
269
+		map[string]string{"schedule_type": "3", "schedule_date": "1632326400", "schedule_week": "4", "mode_id": "", "name": ""},
270
+		map[string]string{"schedule_type": "1", "schedule_date": "1632326400", "schedule_week": "5", "mode_id": "", "name": ""},
271
+		map[string]string{"schedule_type": "2", "schedule_date": "1632412800", "schedule_week": "5", "mode_id": "", "name": ""},
272
+		map[string]string{"schedule_type": "3", "schedule_date": "1632412800", "schedule_week": "5", "mode_id": "", "name": ""},
273
+		map[string]string{"schedule_type": "1", "schedule_date": "1632412800", "schedule_week": "6", "mode_id": "", "name": ""},
273 274
 		map[string]string{"schedule_type": "2", "schedule_date": "1630684800", "schedule_week": "6", "mode_id": "", "name": ""},
274 275
 		map[string]string{"schedule_type": "3", "schedule_date": "1630684800", "schedule_week": "6", "mode_id": "", "name": ""},
275 276
 		map[string]string{"schedule_type": "1", "schedule_date": "1630771200", "schedule_week": "7", "mode_id": "", "name": ""},
@@ -288,15 +289,15 @@ func (this *XcxApiController) GetScheduleInfo() {
288 289
 		map[string]string{"schedule_type": "1", "schedule_date": "1631116800", "schedule_week": "4", "mode_id": "", "name": ""},
289 290
 		map[string]string{"schedule_type": "2", "schedule_date": "1631116800", "schedule_week": "4", "mode_id": "", "name": ""},
290 291
 		map[string]string{"schedule_type": "3", "schedule_date": "1631116800", "schedule_week": "4", "mode_id": "", "name": ""},
291
-		map[string]string{"schedule_type": "1", "schedule_date": "1631203200", "schedule_week": "5", "mode_id": "", "name": ""},
292
-		map[string]string{"schedule_type": "2", "schedule_date": "1631203200", "schedule_week": "5", "mode_id": "", "name": ""},
293
-		map[string]string{"schedule_type": "3", "schedule_date": "1631203200", "schedule_week": "5", "mode_id": "", "name": ""},
294
-		map[string]string{"schedule_type": "1", "schedule_date": "1631289600", "schedule_week": "6", "mode_id": "", "name": ""},
295
-		map[string]string{"schedule_type": "2", "schedule_date": "1631289600", "schedule_week": "6", "mode_id": "", "name": ""},
296
-		map[string]string{"schedule_type": "3", "schedule_date": "1631289600", "schedule_week": "6", "mode_id": "", "name": ""},
297
-		map[string]string{"schedule_type": "1", "schedule_date": "1631376000", "schedule_week": "7", "mode_id": "", "name": ""},
298
-		map[string]string{"schedule_type": "2", "schedule_date": "1631376000", "schedule_week": "7", "mode_id": "", "name": ""},
299
-		map[string]string{"schedule_type": "3", "schedule_date": "1631376000", "schedule_week": "7", "mode_id": "", "name": ""},
292
+		map[string]string{"schedule_type": "1", "schedule_date": "1632499200", "schedule_week": "5", "mode_id": "", "name": ""},
293
+		map[string]string{"schedule_type": "2", "schedule_date": "1632499200", "schedule_week": "5", "mode_id": "", "name": ""},
294
+		map[string]string{"schedule_type": "3", "schedule_date": "1632499200", "schedule_week": "5", "mode_id": "", "name": ""},
295
+		map[string]string{"schedule_type": "1", "schedule_date": "1632585600", "schedule_week": "6", "mode_id": "", "name": ""},
296
+		map[string]string{"schedule_type": "2", "schedule_date": "1632585600", "schedule_week": "6", "mode_id": "", "name": ""},
297
+		map[string]string{"schedule_type": "3", "schedule_date": "1632585600", "schedule_week": "6", "mode_id": "", "name": ""},
298
+		map[string]string{"schedule_type": "1", "schedule_date": "1632672000", "schedule_week": "7", "mode_id": "", "name": ""},
299
+		map[string]string{"schedule_type": "2", "schedule_date": "1632672000", "schedule_week": "7", "mode_id": "", "name": ""},
300
+		map[string]string{"schedule_type": "3", "schedule_date": "1632672000", "schedule_week": "7", "mode_id": "", "name": ""},
300 301
 
301 302
 		map[string]string{"schedule_type": "1", "schedule_date": "1631462400", "schedule_week": "1", "mode_id": "", "name": ""},
302 303
 		map[string]string{"schedule_type": "2", "schedule_date": "1631462400", "schedule_week": "1", "mode_id": "", "name": ""},