刘韬 2 gadi atpakaļ
vecāks
revīzija
1c39644ceb

+ 11 - 6
DataFusion/src/com/zskk/control/ViewController.java

@@ -7,6 +7,9 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.jfinal.core.Controller;
 import com.jfinal.kit.PropKit;
 import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
@@ -53,12 +56,14 @@ public class ViewController extends Controller {
 	        String IV = "0000000000000000";
 			DataService dService = ServiceFactory.getService(DataService.class);
 			String aesEncryptStr = this.getPara("data");
-	        String aesDecodeStr = AESUtils.aesDecodeStr(aesEncryptStr, PropKit.get("nw_key") ,IV);
-//	        String aesEncryptStr2 = AESUtils.aesEncryptStr(aesDecodeStr, "27c78f49ba635c90a4a44af98a76e313",IV);
-//	        String aesEncryptStr3 = dService.getExamList(aesEncryptStr2);
-//	        String aesDecodeSt4 = AESUtils.aesDecodeStr(aesEncryptStr3, "27c78f49ba635c90a4a44af98a76e313" ,IV);
-//	        String aesDecodeSt5 = AESUtils.aesEncryptStr(aesDecodeSt4, PropKit.get("nw_key"),IV);
-			this.renderText(aesDecodeStr);
+	        String aesDecodeStr = AESUtils.aesDecodeStr("Q1R3PhZX3/h9Mue5L5kmupSKW24KiGag5yst5k0a0YtVSC5mnenePI5LLZ4GigdpH2RUv/NHX1Kjhnzt1eQpYBgGS5t9Ki63Vc5E/R3T6TnrXfPyeIv1K+HgaCai3sc0", "2c1db8e7eee65eeeebacb0afbec37096" ,IV);
+	        String aesEncryptStr2 = AESUtils.aesEncryptStr(aesDecodeStr, "27c78f49ba635c90a4a44af98a76e313",IV);
+	        String aesEncryptStr3 = dService.getExamList(aesEncryptStr2);
+			JSONObject jsonObject = JSON.parseObject(aesEncryptStr3);
+			
+	        String aesDecodeSt4 = AESUtils.aesDecodeStr(jsonObject.getString("data"), "27c78f49ba635c90a4a44af98a76e313" ,IV);
+	        String aesDecodeSt5 = AESUtils.aesEncryptStr(aesDecodeSt4, PropKit.get("nw_key"),IV);
+			this.renderText(aesDecodeSt5);
 		} catch (Exception e) {
 			// TODO: handle exception
 			this.renderText(e.toString());

+ 1 - 2
DataFusion/src/com/zskk/service/DataService.java

@@ -41,10 +41,9 @@ public class DataService {
      */
     public String getExamList(String str) {
     	Map <String,String> map = new HashMap<String,String>();
-    	map.put("institution_id", PropKit.get("institution_id"));
+    	map.put("institution_id", "06300009");
     	map.put("params", str);
 		String content = postWithParameters(GET_EXAM_URL, map);
-	    	
 		return content;
 		
 	}