|
@@ -182,9 +182,9 @@ func (this *XcxApiController) GetLoginInfor() {
|
182
|
182
|
|
183
|
183
|
func (this *XcxApiController) GetPatientList() {
|
184
|
184
|
var appid = "wx20b60369111b063a"
|
185
|
|
- var key = "HobHcmPatZ0O5emMYcFo1Q=="
|
186
|
|
- var iv = "wJjr8o47Jv8zBoZF5la+jw=="
|
187
|
|
- var strs = "DKj+ZzSKd77D2X84UqySTfTOxcZ9W5yAArqt74g3Fek+/8N97XI3nKzLO4QadJxwl9f8BDqrpl2dauqNBC4HbkggFcEB9j1zsYDKAm5cM0NPOkjcHeGF8dxpuJGdXWFKZErD957XEPtyODbE3IUMIx/n8haGtCa3W9v5Gqosqxrb6eNY9ogf8V1dy2guuxVAxWojuZ2DLyYovksFLccD5Q=="
|
|
185
|
+ var key = "4BactRvIKCBXzvpyl2SQyQ=="
|
|
186
|
+ var iv = "aXiAcKIWKfseTyzelqcZ0w=="
|
|
187
|
+ var strs = "Gr5gmKz9OjWGipAxt3ujQtHBBXV/Uvhsm+qvvZy6gF+HBc8c6gZhZkqIqLbs8nHkId5zm/mGVNpghvM/egYTLOOI7LxhvjRsPE1691j+jltU9OIavGIWFp3I4m3OdP9CuPohhrpZPgwsGajJmtGNNjPvGA61ssErVZ7SBceq+leag532zCmgEXN3NpZP0TRgpIpwpegCAEW07oyI0LiRYA=="
|
188
|
188
|
data, err := service.DecryptData(appid, key, iv, strs)
|
189
|
189
|
patient_id, _ := this.GetInt64("patient_id")
|
190
|
190
|
patient, err := service.GetPatientListByPatientId(patient_id)
|
|
@@ -201,30 +201,13 @@ func (this *XcxApiController) GetPatientList() {
|
201
|
201
|
}
|
202
|
202
|
|
203
|
203
|
func (this *XcxApiController) GetDataInfo() {
|
204
|
|
- // dataBody := make(map[string]interface{}, 0)
|
205
|
|
- // fmt.Println("dataBody",dataBody)
|
206
|
|
- // err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
|
207
|
|
- // if err != nil {
|
208
|
|
- // utils.ErrorLog(err.Error())
|
209
|
|
- // this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
210
|
|
- // return
|
211
|
|
- // }
|
212
|
|
- // fmt.Println(err)
|
213
|
|
- // appid, _ := dataBody["appid"].(string)
|
214
|
|
- // key, _ := dataBody["key"].(string)
|
215
|
|
- // iv, _ := dataBody["iv"].(string)
|
216
|
|
- // encryptedData, _ := dataBody["encryptedData"].(string)
|
|
204
|
+
|
217
|
205
|
appid := this.GetString("appid")
|
218
|
206
|
key := this.GetString("key")
|
219
|
207
|
iv := this.GetString("iv")
|
220
|
208
|
encryptedData := this.GetString("encryptedData")
|
221
|
209
|
list, _ := service.DecryptData(appid, key, iv, encryptedData)
|
222
|
210
|
fmt.Println(list)
|
223
|
|
- // if err == nil {
|
224
|
|
- // this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
225
|
|
- // return
|
226
|
|
- // }
|
227
|
|
-
|
228
|
211
|
this.ServeSuccessJSON(map[string]interface{}{
|
229
|
212
|
"list": list,
|
230
|
213
|
})
|