Commit 07d39a74 by zhangkb

修改标签分析排序

parent 009a21e3
...@@ -192,6 +192,13 @@ ...@@ -192,6 +192,13 @@
<include>**/*.jar</include> <include>**/*.jar</include>
</includes> </includes>
</resource> </resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>*.yml</include>
<include>**/*.xml</include>
</includes>
</resource>
</resources> </resources>
<plugins> <plugins>
......
...@@ -397,9 +397,9 @@ public class TagService { ...@@ -397,9 +397,9 @@ public class TagService {
Collections.sort(sysTagList, new Comparator<Map<String, Object>>() { Collections.sort(sysTagList, new Comparator<Map<String, Object>>() {
@Override @Override
public int compare(Map<String, Object> o1, Map<String, Object> o2) { public int compare(Map<String, Object> o1, Map<String, Object> o2) {
String total1 = o1.get("total").toString(); int total1 = Integer.valueOf(o1.get("total").toString());
String total2 = o2.get("total").toString(); int total2 = Integer.valueOf(o2.get("total").toString());
return total2.compareTo(total1); return total2-total1;
} }
}); });
} }
...@@ -408,9 +408,9 @@ public class TagService { ...@@ -408,9 +408,9 @@ public class TagService {
Collections.sort(perTagList, new Comparator<Map<String, Object>>() { Collections.sort(perTagList, new Comparator<Map<String, Object>>() {
@Override @Override
public int compare(Map<String, Object> o1, Map<String, Object> o2) { public int compare(Map<String, Object> o1, Map<String, Object> o2) {
String total1 = o1.get("total").toString(); int total1 = Integer.valueOf(o1.get("total").toString());
String total2 = o2.get("total").toString(); int total2 = Integer.valueOf(o2.get("total").toString());
return total2.compareTo(total1); return total2-total1;
} }
}); });
} }
......
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