From 01dcc58ccb6ad65ad430a75fbc3c7a2b5f0b2e27 Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 11 Sep 2018 20:58:41 +0800 Subject: [PATCH] fix asd --- .../appclient/core/impls/RetailAppServiceImp.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java index a2511d5df..904b60c3a 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java @@ -1767,9 +1767,6 @@ public class RetailAppServiceImp implements RetailAppService { @Override public JSONObject getAd() { JSONObject res = royalPayCMSSupport.listArticles("app_ad", false, true, 1, 10); - logger.debug("ddddddddddddddddasda " + res.toJSONString()); - System.out.println("ddddddddddddddddasda " + res.toJSONString()); - JSONArray acts = res.getJSONArray("data"); if (acts.size() > 0) { int selectNo = RandomUtils.nextInt(0, acts.size()); @@ -1778,9 +1775,11 @@ public class RetailAppServiceImp implements RetailAppService { getActs.put("ad_mode", getActs.getString("page_keywords")); getActs.put("ad_link", getActs.getString("summery")); getActs.put("publish_date", getActs.getString("publish_time")); - getActs.put("ad_type", (getActs.getJSONObject("reference")).getString("ad_type")); - getActs.put("expire_date", (getActs.getJSONObject("reference")).getString("expire_date")); - getActs.put("duration_time", (getActs.getJSONObject("reference")).getString("duration_time")); + String reference = getActs.getString("reference"); + JSONObject referenceObj = JSONObject.parseObject(reference); + getActs.put("ad_type", referenceObj.getString("ad_type")); + getActs.put("expire_date", referenceObj.getString("expire_date")); + getActs.put("duration_time", referenceObj.getString("duration_time")); getActs.remove("reference"); getActs.remove("page_desc"); getActs.remove("page_keywords");