public static void main(String[] args) throws ParseException {
Map map = new HashMap();
map.put("PomRefund", "1");
map.put("PomBalance", "0");
map.put("PomReport", "1");
JSONObject jb = JSONObject.fromObject(map);
String pression = jb.toString();
System.out.println(pression);
JSONObject json = JSONObject.fromObject(pression);
Map p = json;
String PomRefund = (String)p.get("PomRefund");
System.out.println(PomRefund);
String PomBalance = (String)p.get("PomBalance");
System.out.println(PomBalance);
String PomReport = (String)p.get("PomReport");
System.out.println(PomReport);
//{"POM_REFUND":"1","POM_BALANCE":"1","POM_REPORT":"0"}
/*Map<String,String> params = getParams();
sign(params);
unsign(params);*/
/*String bizDate = "2019-02-12 16:18:42";
String a= bizDate.substring(0, 4);
String b = bizDate.substring(5, 7);
String c = bizDate.substring(8, 10);
bizDate =a+b+c+"000000";
String d =a+b+c+"235959";
System.out.println(":" + bizDate);*/
/*String a = "1011.80";
String b = "108.66";
if(StringUtils.isNotBlank(a) && StringUtils.isNotBlank(b)){
BigDecimal bd1 = new BigDecimal(a);
bd1 = bd1.setScale(2, BigDecimal.ROUND_HALF_UP);
BigDecimal bd2 = new BigDecimal(b);
bd2 = bd2.setScale(2, BigDecimal.ROUND_HALF_UP);
BigDecimal bd3 =bd1.subtract(bd2);
System.out.print(bd3);
String bd3String = bd3.toString();
System.out.print(bd3String);
}*/
}
*转JSONObject;String.substring;数据相减
最新推荐文章于 2024-06-22 20:25:10 发布