From 5615898dd04dc02ad659169654c9397f3fdac4c5 Mon Sep 17 00:00:00 2001 From: lixiangrong Date: Fri, 6 May 2016 09:38:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Signed-off-by:=20lixiangro?= =?UTF-8?q?ng=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/osc/git/eh3/test/TestCode.java | 17 ++++++++++++----- .../osc/git/eh3/testopen/TestOpenPuton.java | 2 +- src/main/resources/generatorConfig.xml | 5 ++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/main/java/osc/git/eh3/test/TestCode.java b/src/main/java/osc/git/eh3/test/TestCode.java index 2c6691d..767fc6d 100644 --- a/src/main/java/osc/git/eh3/test/TestCode.java +++ b/src/main/java/osc/git/eh3/test/TestCode.java @@ -8,6 +8,8 @@ import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Date; import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.Map; import java.util.Set; import java.util.UUID; import java.util.regex.Pattern; @@ -313,11 +315,16 @@ public class TestCode { // System.out.println(Long.parseLong("8000.01")); - JSONObject jsonParam = new JSONObject(); - JSONArray jsonArray = new JSONArray(); - jsonArray.add("000000"); - jsonParam.put("app", jsonArray); - System.out.println(jsonParam); +// JSONObject jsonParam = new JSONObject(); +// JSONArray jsonArray = new JSONArray(); +// jsonArray.add("000000"); +// jsonParam.put("app", jsonArray); +// System.out.println(jsonParam); + + + String head = "00,"; + head = head.substring(0, head.lastIndexOf(",")); + System.out.println(head); } diff --git a/src/main/java/osc/git/eh3/testopen/TestOpenPuton.java b/src/main/java/osc/git/eh3/testopen/TestOpenPuton.java index 5202837..2ebc57c 100644 --- a/src/main/java/osc/git/eh3/testopen/TestOpenPuton.java +++ b/src/main/java/osc/git/eh3/testopen/TestOpenPuton.java @@ -24,7 +24,7 @@ public class TestOpenPuton { JSONObject json = new JSONObject(); json.put("param", "中午"); - String str = "{ \"order_info\": { \"order_id\": 1001, \"order_name\": \"test\", \"brand_zh\": \"复歌\", \"brand_en\": \"fugetech\", \"note\": \"note\", \"industry\": \"个人护理/药品>护发品\", \"cost_type\": 1, \"cost_single\": 124, \"ad_owner\": {}, \"start_time\": \"2015-12-01\", \"end_time\": \"2015-12-30\", \"buy_type\": 1, \"plat\": 1, \"type\": 1, \"landing_page\": \"www.fugetech.com\", \"order_area\": [], \"order_budget\": {}, \"put_time\": [], \"order_goal\": {}, \"order_freq\": {}, \"order_pmp\": {}, \"media_white\": [], \"media_black\": [], \"creative_group\": [] } }"; + String str = "{\"order_info\":{\"put_time\":[],\"cost_type\":1,\"order_budget\":{\"budget_all\":100.0},\"cost_single\":100.0,\"type\":1,\"order_id\":14575,\"landing_page\":\"www.baidu.com\",\"order_name\":\"tony-test-31\",\"brand_en\":null,\"plat\":1,\"end_time\":\"2016-05-03\",\"creative_group\":[{\"group_name\":\"test_五一\",\"plat\":1,\"ratio\":\"-\",\"group_id\":405,\"click_code\":null,\"impression_code\":null,\"landing_page\":\"www.baidu.com\"}],\"buy_type\":1,\"order_freq\":{\"imp_day_req\":5,\"click_total_freq\":5,\"imp_total_req\":10,\"click_day_freq\":1},\"ad_owner\":{\"owner_qualification\":[],\"owner_name\":\"ABI\",\"organization_code\":null,\"owner_id\":107,\"owner_category\":\"食品饮料>健康饮料,运动饮料,功能性饮料\",\"website_url\":\"http://sedrin.reloadbuzz.com/food2/xueJin/index.php/home/user/index\"},\"start_time\":\"2016-05-03\",\"order_goal\":{\"order_total_show\":1},\"brand_zh\":\"Sedrin\",\"industry\":\"食品饮料>健康饮料,运动饮料,功能性饮料\",\"note\":\"媒体类型定向:\\nnull\\n\\n关键词定向:\\n123\\n\\n广告素材轮播:\\n平均\\n\\n备注:\\n备注1(资源设置):\\n321\\n\\n\\n\"}}"; System.out.println(HttpClientUtil.sendPostJSONData(URL, str)); } diff --git a/src/main/resources/generatorConfig.xml b/src/main/resources/generatorConfig.xml index 17e67de..3395e98 100644 --- a/src/main/resources/generatorConfig.xml +++ b/src/main/resources/generatorConfig.xml @@ -23,10 +23,9 @@ -
+