Commit fd15f456 by jinfeng.wang

fix

parent d693442f
package com.mobvista.apptag.main; package com.mobvista.apptag.main;
import com.mobvista.apptag.controller.ECResultController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.*; import java.sql.*;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator;
import java.util.Set; import java.util.Set;
import java.util.regex.Pattern;
/** /**
* @package: com.mobvista.apptag.main * @package: com.mobvista.apptag.main
...@@ -15,6 +17,8 @@ import java.util.regex.Pattern; ...@@ -15,6 +17,8 @@ import java.util.regex.Pattern;
* @phone: 152-1062-7698 * @phone: 152-1062-7698
*/ */
public class JoypacMain { public class JoypacMain {
public static final Logger logger = LoggerFactory.getLogger(JoypacMain.class);
public static void main(String[] args) { public static void main(String[] args) {
insertDmp(readJoypac()); insertDmp(readJoypac());
} }
...@@ -33,6 +37,7 @@ public class JoypacMain { ...@@ -33,6 +37,7 @@ public class JoypacMain {
stringBuilder.append("('").append(packageName).append("'),"); stringBuilder.append("('").append(packageName).append("'),");
} }
PreparedStatement stmt = con.prepareStatement(insertSql.replace("@VALUES", stringBuilder.substring(0, stringBuilder.length() - 1))); PreparedStatement stmt = con.prepareStatement(insertSql.replace("@VALUES", stringBuilder.substring(0, stringBuilder.length() - 1)));
logger.info("INSERT " + set.size() + " package_names!!!");
stmt.execute(); stmt.execute();
con.close(); con.close();
} catch (SQLException | ClassNotFoundException e) { } catch (SQLException | ClassNotFoundException e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment