Commit 33652b84 by jinfeng.wang

fix

parent 830afabb
......@@ -122,11 +122,11 @@ public class StorageTag {
String appName = strs[1];
String platform = strs[2];
String tagId = strs[3];
Double userCount = Double.valueOf(strs[4]);
Integer userCount = Integer.parseInt(strs[4]);
Integer tagCount = map.get(key);
String key1 = packageName + "#@#" + appName + "#@#" + platform;
DecimalFormat df = new DecimalFormat("#.###");
Double tagRate = Double.parseDouble(df.format(tagCount / userCount));
Double tagRate = Double.parseDouble(df.format(tagCount / Double.valueOf(userCount)));
if (tagRate > 0.5) {
packageSet.add(packageName);
insertSql_1.append("('").append(packageName).append("','").append(appName).append("','").append(platform).append("','").append(tagId)
......@@ -161,8 +161,10 @@ public class StorageTag {
"VALUES";
String insert_sql2 = "REPLACE INTO storage(package_name, app_name, platform, tag, update_time) " +
"VALUES";
stmt.executeQuery(insert_sql1 + insertSql_1.substring(0, insertSql_1.length() - 1));
stmt1.executeQuery(insert_sql2 + insertSql_2.substring(0, insertSql_2.length() - 1));
System.out.println(insert_sql1 + insertSql_1.substring(0, insertSql_1.length() - 1));
System.out.println(insert_sql2 + insertSql_2.substring(0, insertSql_2.length() - 1));
// stmt.executeQuery(insert_sql1 + insertSql_1.substring(0, insertSql_1.length() - 1));
// stmt1.executeQuery(insert_sql2 + insertSql_2.substring(0, insertSql_2.length() - 1));
con.close();
} catch (Exception e) {
e.printStackTrace();
......
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