diff --git a/pom.xml b/pom.xml
index a3c0045..5f0d8f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -149,6 +149,16 @@
httpclient
4.5.2
+
+ org.apache.cxf
+ cxf-rt-frontend-jaxws
+ 3.1.6
+
+
+ org.apache.cxf
+ cxf-rt-transports-http
+ 3.1.6
+
useful-code
diff --git a/src/main/java/osc/git/eh3/redis/redis.properties b/src/main/java/osc/git/eh3/redis/redis.properties
index 4e38a2a..9a7fa3f 100644
--- a/src/main/java/osc/git/eh3/redis/redis.properties
+++ b/src/main/java/osc/git/eh3/redis/redis.properties
@@ -3,7 +3,7 @@ redis.pool.maxIdle=200
redis.pool.maxWait=1000
redis.pool.testOnBorrow=true
redis.pool.testOnReturn=true
-redis.ip=192.168.3.166
-#redis.ip=111.235.158.31
+#redis.ip=192.168.3.166
+redis.ip=111.235.158.31
redis.port=7379
redis.password=
\ No newline at end of file
diff --git a/src/main/java/osc/git/eh3/test/TestJdbc.java b/src/main/java/osc/git/eh3/test/TestJdbc.java
index d4b3a81..09b2139 100644
--- a/src/main/java/osc/git/eh3/test/TestJdbc.java
+++ b/src/main/java/osc/git/eh3/test/TestJdbc.java
@@ -1,131 +1,153 @@
-package osc.git.eh3.test;
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import net.sf.json.JSONObject;
-import osc.git.eh3.redis.JedisUtil;
-
-public class TestJdbc {
- private static Connection getConn() {
- String driver = "com.mysql.jdbc.Driver";
- String url = "jdbc:mysql://192.168.3.166:3306/wins-dsp-new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&connectTimeout=60000&socketTimeout=60000";
- String username = "root";
- String password = "pxene";
- Connection conn = null;
- try {
- Class.forName(driver); // classLoader,加载对应驱动
- conn = (Connection) DriverManager.getConnection(url, username, password);
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- return conn;
- }
-
- private static Integer getAll() {
- Connection conn = getConn();
- String sql = "SELECT v.* FROM dsp_v_app_motionclick_day_count v WHERE v.time BETWEEN 1433088000000 AND 1453046400000 ";
- // String sql = "SELECT * FROM dsp_t_ad_group_adx_creative WHERE groupid
- // = 'd092c630-abfd-45a1-92f3-d0530c1caee8' LIMIT 1,3;";
- PreparedStatement pstmt;
- try {
- pstmt = (PreparedStatement) conn.prepareStatement(sql);
- ResultSet rs = pstmt.executeQuery();
- ResultSetMetaData metaData = rs.getMetaData();
- while (rs.next()) {
- JSONObject jsonObject = new JSONObject();
- String time = "";
- String mapid = "";
- String appid = "";
- String adxtype = "";
- for (int i = 1; i <= metaData.getColumnCount(); i++) {
- String columnName = metaData.getColumnName(i);
- if ("time".equals(columnName)) {
- time = rs.getString(i);
- }
- if ("mapid".equals(columnName)) {
- mapid = rs.getString(i);
- }
- if ("appid".equals(columnName)) {
- appid = rs.getString(i);
- }
- if ("adxtype".equals(columnName)) {
- adxtype = rs.getString(i);
- }
-
- jsonObject.put(columnName, rs.getString(i));
- }
- Map map = new HashMap<>();
- map.put(time + "_" + appid + "_" + adxtype, jsonObject.toString());
- JedisUtil.hset("HistoryAPPData_" + mapid, map);
-
- // JedisUtil.lpush("HistoryAPPData_"+mapid+"_"+time,
- // jsonObject.toString());
- System.out.println("HistoryAPPData_" + mapid);
- }
- } catch (SQLException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- public static void main(String[] args) {
- // getAll();
- JedisUtil.deleteByPattern("HistoryAPPData_*");
- /*
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- Date start = new Date();
-
- List mapids = getMapid();
- // String[] keys = JedisUtil.getKeys("HistoryAPPData_*");
- List alldata = new ArrayList();
- for (String mapid : mapids) {
- String key = "HistoryAPPData_" + mapid;
- String[] hkeys = JedisUtil.hkeys(key);
-// for (String hkey : hkeys) {
-// System.out.println(JedisUtil.hget(key, hkey));
-// }
- if(hkeys.length>0){
- List hmget = JedisUtil.hmget(key, hkeys);
- alldata.addAll(hmget);
- }
- }
- System.out.println(alldata.size());
- Date end = new Date();
- System.out.println(sdf.format(start));
- System.out.println(sdf.format(end));
- */
- }
-
- private static List getMapid() {
- List mapids = new ArrayList();
- Connection conn = getConn();
- String sql = "SELECT t2.id AS mapid FROM dsp_t_ad_group_creative t2 LEFT JOIN dsp_t_ad_group t3 ON t2.groupid = t3.id LEFT JOIN dsp_t_campaign t4 ON t3.campaignid = t4.id LEFT JOIN dsp_t_advertiser_account t5 ON t4.accountid = t5.id LEFT JOIN dsp_t_advertiser t6 ON t5.advertiserid = t6.id WHERE ( t4.accountid IN ( SELECT id FROM dsp_t_advertiser_account t6 WHERE t6.advertiserid IN ( SELECT id FROM dsp_t_advertiser t7 WHERE t7.parentid = 'dfecbd8a-2d7e-4941-bd89-e39c576c5ee5' ) ) OR t4.accountid = 'dfecbd8a-2d7e-4941-bd89-e39c576c5ee5' )";
- // String sql = "SELECT * FROM dsp_t_ad_group_adx_creative WHERE groupid
- // = 'd092c630-abfd-45a1-92f3-d0530c1caee8' LIMIT 1,3;";
- PreparedStatement pstmt;
- try {
- pstmt = (PreparedStatement) conn.prepareStatement(sql);
- ResultSet rs = pstmt.executeQuery();
- ResultSetMetaData metaData = rs.getMetaData();
- while (rs.next()) {
- for (int i = 1; i <= metaData.getColumnCount(); i++) {
- mapids.add(rs.getString(i));
- }
- }
- } catch (SQLException e) {
- e.printStackTrace();
- }
- return mapids;
- }
-}
+package osc.git.eh3.test;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import net.sf.json.JSONObject;
+import osc.git.eh3.redis.JedisUtil;
+
+public class TestJdbc {
+ private static Connection getConn() {
+ String driver = "com.mysql.jdbc.Driver";
+ String url = "jdbc:mysql://192.168.3.11:3306/wins-dsp-new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&connectTimeout=60000&socketTimeout=60000";
+ String username = "root";
+ String password = "pxene";
+ Connection conn = null;
+ try {
+ Class.forName(driver); // classLoader,加载对应驱动
+ conn = (Connection) DriverManager.getConnection(url, username, password);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ return conn;
+ }
+
+ private static Integer getAll() {
+ Connection conn = getConn();
+ String sql = "SELECT v.* FROM dsp_v_app_motionclick_day_count v WHERE v.time BETWEEN 1433088000000 AND 1453046400000 ";
+ // String sql = "SELECT * FROM dsp_t_ad_group_adx_creative WHERE groupid
+ // = 'd092c630-abfd-45a1-92f3-d0530c1caee8' LIMIT 1,3;";
+ PreparedStatement pstmt;
+ try {
+ pstmt = (PreparedStatement) conn.prepareStatement(sql);
+ ResultSet rs = pstmt.executeQuery();
+ ResultSetMetaData metaData = rs.getMetaData();
+ while (rs.next()) {
+ JSONObject jsonObject = new JSONObject();
+ String time = "";
+ String mapid = "";
+ String appid = "";
+ String adxtype = "";
+ for (int i = 1; i <= metaData.getColumnCount(); i++) {
+ String columnName = metaData.getColumnName(i);
+ if ("time".equals(columnName)) {
+ time = rs.getString(i);
+ }
+ if ("mapid".equals(columnName)) {
+ mapid = rs.getString(i);
+ }
+ if ("appid".equals(columnName)) {
+ appid = rs.getString(i);
+ }
+ if ("adxtype".equals(columnName)) {
+ adxtype = rs.getString(i);
+ }
+
+ jsonObject.put(columnName, rs.getString(i));
+ }
+ Map map = new HashMap<>();
+ map.put(time + "_" + appid + "_" + adxtype, jsonObject.toString());
+ JedisUtil.hset("HistoryAPPData_" + mapid, map);
+
+ // JedisUtil.lpush("HistoryAPPData_"+mapid+"_"+time,
+ // jsonObject.toString());
+ System.out.println("HistoryAPPData_" + mapid);
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ public static void main(String[] args) {
+
+ insertData();
+
+ // getAll();
+// JedisUtil.deleteByPattern("HistoryAPPData_*");
+ /*
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ Date start = new Date();
+
+ List mapids = getMapid();
+ // String[] keys = JedisUtil.getKeys("HistoryAPPData_*");
+ List alldata = new ArrayList();
+ for (String mapid : mapids) {
+ String key = "HistoryAPPData_" + mapid;
+ String[] hkeys = JedisUtil.hkeys(key);
+// for (String hkey : hkeys) {
+// System.out.println(JedisUtil.hget(key, hkey));
+// }
+ if(hkeys.length>0){
+ List hmget = JedisUtil.hmget(key, hkeys);
+ alldata.addAll(hmget);
+ }
+ }
+ System.out.println(alldata.size());
+ Date end = new Date();
+ System.out.println(sdf.format(start));
+ System.out.println(sdf.format(end));
+ */
+ }
+
+ private static List getMapid() {
+ List mapids = new ArrayList();
+ Connection conn = getConn();
+ String sql = "SELECT t2.id AS mapid FROM dsp_t_ad_group_creative t2 LEFT JOIN dsp_t_ad_group t3 ON t2.groupid = t3.id LEFT JOIN dsp_t_campaign t4 ON t3.campaignid = t4.id LEFT JOIN dsp_t_advertiser_account t5 ON t4.accountid = t5.id LEFT JOIN dsp_t_advertiser t6 ON t5.advertiserid = t6.id WHERE ( t4.accountid IN ( SELECT id FROM dsp_t_advertiser_account t6 WHERE t6.advertiserid IN ( SELECT id FROM dsp_t_advertiser t7 WHERE t7.parentid = 'dfecbd8a-2d7e-4941-bd89-e39c576c5ee5' ) ) OR t4.accountid = 'dfecbd8a-2d7e-4941-bd89-e39c576c5ee5' )";
+ // String sql = "SELECT * FROM dsp_t_ad_group_adx_creative WHERE groupid
+ // = 'd092c630-abfd-45a1-92f3-d0530c1caee8' LIMIT 1,3;";
+ PreparedStatement pstmt;
+ try {
+ pstmt = (PreparedStatement) conn.prepareStatement(sql);
+ ResultSet rs = pstmt.executeQuery();
+ ResultSetMetaData metaData = rs.getMetaData();
+ while (rs.next()) {
+ for (int i = 1; i <= metaData.getColumnCount(); i++) {
+ mapids.add(rs.getString(i));
+ }
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ return mapids;
+ }
+
+ private static void insertData(){
+ Connection conn = getConn();
+ System.out.println(new Date());
+ for (int i = 0; i > -1; i++) {
+ String cid = UUID.randomUUID().toString();
+ String sql = "INSERT INTO `dsp_t_statis_by_day` (`time`, `creativeid`, `category`, `imprs`, `clks`, `cost`, `downloads`, `regists`, `flag`, `createtime`) VALUES ('2014-12-06 00:00:00', '"+cid+"', '2', '961', '9', '201860.7000', '0', '0', '0', '2015-09-14 15:07:42');";
+ PreparedStatement pstmt;
+ try {
+ pstmt = (PreparedStatement) conn.prepareStatement(sql);
+ pstmt.executeUpdate();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ }
+ System.out.println(new Date());
+ }
+}
diff --git a/src/main/java/osc/git/eh3/test/TestJdbc2.java b/src/main/java/osc/git/eh3/test/TestJdbc2.java
new file mode 100644
index 0000000..6abdfe7
--- /dev/null
+++ b/src/main/java/osc/git/eh3/test/TestJdbc2.java
@@ -0,0 +1,57 @@
+package osc.git.eh3.test;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import net.sf.json.JSONObject;
+import osc.git.eh3.redis.JedisUtil;
+
+public class TestJdbc2 {
+ private static Connection getConn() {
+ String driver = "com.mysql.jdbc.Driver";
+ String url = "jdbc:mysql://192.168.3.11:3306/wins-dsp-new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&connectTimeout=60000&socketTimeout=60000";
+ String username = "root";
+ String password = "pxene";
+ Connection conn = null;
+ try {
+ Class.forName(driver); // classLoader,加载对应驱动
+ conn = (Connection) DriverManager.getConnection(url, username, password);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ return conn;
+ }
+
+ public static void main(String[] args) {
+ insertData();
+ }
+
+ private static void insertData(){
+ Connection conn = getConn();
+ System.out.println(new Date());
+ for (int i = 0; i > -1; i++) {
+ String cid = UUID.randomUUID().toString();
+ String sql = "INSERT INTO `dsp_t_statis_by_day` (`time`, `creativeid`, `category`, `imprs`, `clks`, `cost`, `downloads`, `regists`, `flag`, `createtime`) VALUES ('2014-12-06 00:00:00', '"+cid+"', '2', '961', '9', '201860.7000', '0', '0', '0', '2015-09-14 15:07:42');";
+ PreparedStatement pstmt;
+ try {
+ pstmt = (PreparedStatement) conn.prepareStatement(sql);
+ pstmt.executeUpdate();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ }
+ System.out.println(new Date());
+ }
+}
diff --git a/src/main/java/osc/git/eh3/test/TestJdbc3.java b/src/main/java/osc/git/eh3/test/TestJdbc3.java
new file mode 100644
index 0000000..f75693a
--- /dev/null
+++ b/src/main/java/osc/git/eh3/test/TestJdbc3.java
@@ -0,0 +1,57 @@
+package osc.git.eh3.test;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import net.sf.json.JSONObject;
+import osc.git.eh3.redis.JedisUtil;
+
+public class TestJdbc3 {
+ private static Connection getConn() {
+ String driver = "com.mysql.jdbc.Driver";
+ String url = "jdbc:mysql://115.182.33.143:3306/wins-dsp-new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&connectTimeout=60000&socketTimeout=60000";
+ String username = "root";
+ String password = "pxene";
+ Connection conn = null;
+ try {
+ Class.forName(driver); // classLoader,加载对应驱动
+ conn = (Connection) DriverManager.getConnection(url, username, password);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ return conn;
+ }
+
+ public static void main(String[] args) {
+ insertData();
+ }
+
+ private static void insertData(){
+ Connection conn = getConn();
+ System.out.println(new Date());
+ for (int i = 0; i > -1; i++) {
+ String cid = UUID.randomUUID().toString();
+ String sql = "INSERT INTO `dsp_t_statis_by_day` (`time`, `creativeid`, `category`, `imprs`, `clks`, `cost`, `downloads`, `regists`, `flag`, `createtime`) VALUES ('2014-12-06 00:00:00', '"+cid+"', '2', '961', '9', '201860.7000', '0', '0', '0', '2015-09-14 15:07:42');";
+ PreparedStatement pstmt;
+ try {
+ pstmt = (PreparedStatement) conn.prepareStatement(sql);
+ pstmt.executeUpdate();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ }
+ System.out.println(new Date());
+ }
+}
diff --git a/src/main/java/osc/git/eh3/test/TestRedisData.java b/src/main/java/osc/git/eh3/test/TestRedisData.java
index 05d93c5..54f9ed2 100644
--- a/src/main/java/osc/git/eh3/test/TestRedisData.java
+++ b/src/main/java/osc/git/eh3/test/TestRedisData.java
@@ -9,7 +9,7 @@ public class TestRedisData {
public static void main(String[] args) throws IOException {
- showSom("fa5f9738-6055-4881-b1be-32f8111a18d1");
+ showSom("27ef277d-25e7-4347-b07f-9668a8a802cd");
}
public static void showSom(String groupid){
diff --git a/src/main/java/osc/git/eh3/test/TestWS.java b/src/main/java/osc/git/eh3/test/TestWS.java
new file mode 100644
index 0000000..0a25bf9
--- /dev/null
+++ b/src/main/java/osc/git/eh3/test/TestWS.java
@@ -0,0 +1,14 @@
+package osc.git.eh3.test;
+
+import com.dxpmedia.hdtsspapitest.CreativeService;
+import com.dxpmedia.hdtsspapitest.CreativeServiceSoap;
+
+public class TestWS {
+
+ public static void main(String[] args) {
+ CreativeService service = new CreativeService();
+ CreativeServiceSoap serviceSoap = service.getCreativeServiceSoap();
+ String result = serviceSoap.creativeSubmit("0", "1",2);
+ System.out.println(result);
+ }
+}
diff --git a/src/main/resources/generatorConfig.xml b/src/main/resources/generatorConfig.xml
index 6bee7ae..6c52790 100644
--- a/src/main/resources/generatorConfig.xml
+++ b/src/main/resources/generatorConfig.xml
@@ -1,32 +1,31 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file