Commit a88a1adb by jinfeng.wang

fix

parent 07a80da8
...@@ -51,7 +51,7 @@ public class StorageTag { ...@@ -51,7 +51,7 @@ public class StorageTag {
JsonArray jsonArray = GsonUtil.String2JsonArray(tag_arr); JsonArray jsonArray = GsonUtil.String2JsonArray(tag_arr);
for (int i = 0; i < jsonArray.size(); i++) { for (int i = 0; i < jsonArray.size(); i++) {
// jsonArray.get(i).getAsString() tagId // jsonArray.get(i).getAsString() tagId
String key = packageName + "," + appName + "," + platform + "," + jsonArray.get(i).getAsString() + "," + userCount; String key = packageName + "#@#" + appName + "#@#" + platform + "#@#" + jsonArray.get(i).getAsString() + "#@#" + userCount;
if (map.containsKey(key)) { if (map.containsKey(key)) {
map.put(key, map.get(key) + 1); map.put(key, map.get(key) + 1);
} else { } else {
...@@ -117,14 +117,14 @@ public class StorageTag { ...@@ -117,14 +117,14 @@ public class StorageTag {
while (iterator.hasNext()) { while (iterator.hasNext()) {
String key = iterator.next(); String key = iterator.next();
String[] strs = key.split(","); String[] strs = key.split("#@#");
String packageName = strs[0]; String packageName = strs[0];
String appName = strs[1]; String appName = strs[1];
String platform = strs[2]; String platform = strs[2];
String tagId = strs[3]; String tagId = strs[3];
Double userCount = Double.valueOf(strs[4]); Double userCount = Double.valueOf(strs[4]);
Integer tagCount = map.get(key); Integer tagCount = map.get(key);
String key1 = packageName + "," + appName + "," + platform; String key1 = packageName + "#@#" + appName + "#@#" + platform;
DecimalFormat df = new DecimalFormat("#.###"); DecimalFormat df = new DecimalFormat("#.###");
Double tagRate = Double.parseDouble(df.format(tagCount / userCount)); Double tagRate = Double.parseDouble(df.format(tagCount / userCount));
if (tagRate > 0.5) { if (tagRate > 0.5) {
......
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