master
luoyang 6 years ago
parent 9d05bcd948
commit 01dcc58ccb

@ -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");

Loading…
Cancel
Save