package com.ynxbd.common; import com.ynxbd.common.bean.Patient; import com.ynxbd.common.helper.common.HMACHelper; import com.ynxbd.common.result.JsonResult; import com.ynxbd.common.result.JsonResultEnum; public class TestA { // public static void main(String[] args) throws Exception { // // System.out.println(AesWxHelper.decode("")); // } // public static void main(String[] args) { // String KEY = "3431de05cbf9d0ffdbc064a352835981"; // String PARTNER_ID = "100000637"; // // String timestamp = System.currentTimeMillis() + ""; // String str = PARTNER_ID + timestamp; // String cacheSign = HMACHelper.sha256(str, KEY); // System.out.println(timestamp); // System.out.println(cacheSign); // } // public static void main(String[] args) { // String KEY = "795b207e12572839976d9310bdde32be"; // String PARTNER_ID = "100000317"; // // String timestamp = System.currentTimeMillis() + ""; // String str = PARTNER_ID + timestamp; // String cacheSign = HMACHelper.sha256(str, KEY); // System.out.println(timestamp); // System.out.println(cacheSign); // } public static void main(String[] args) { String respXML = "\n" + "\t1002\n" + "\t0\n" + "\t成功\n" + "\t932606\n" + "\t300349719\n" + "\t137087\n" + ""; JsonResult result = JsonResult.xmlToBean(respXML, JsonResultEnum.SYS_HIS); if (result == null) { return; } Patient patient = result.dataMapToBean(Patient.class); System.out.println(patient); } }