master
luoyang 6 years ago
parent 000a66a10b
commit efd2185622

@ -1771,8 +1771,22 @@ public class RetailAppServiceImp implements RetailAppService {
JSONObject res = royalPayCMSSupport.listArticles("app_ad", false, true, 1, 10);
JSONArray acts = res.getJSONArray("data");
if (acts.size() > 0) {
int selectNo = RandomUtils.nextInt(0, acts.size());
return acts.getJSONObject(selectNo);
JSONObject getActs = acts.getJSONObject(selectNo);
getActs.put("ad_cover", getActs.getString("page_desc"));
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"));
getActs.remove("reference");
getActs.remove("page_desc");
getActs.remove("page_keywords");
getActs.remove("summery");
getActs.remove("publish_time");
return getActs;
}
return null;

Loading…
Cancel
Save