diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index b26911b..af673e7 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -2,5 +2,7 @@
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000..712ab9d
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index f042c63..680a1a1 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,58 +1,20 @@
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -157,6 +122,7 @@
+
@@ -278,16 +244,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
@@ -299,18 +276,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -320,218 +285,147 @@
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
@@ -551,6 +445,12 @@
+
+
+
+
+
+
1529592741848
@@ -566,7 +466,21 @@
1529593229553
-
+
+ 1734279501402
+
+
+
+ 1734279501402
+
+
+ 1734329453407
+
+
+
+ 1734329453407
+
+
@@ -669,7 +583,7 @@
-
+
@@ -677,38 +591,44 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
diff --git a/src/main/java/cn/edu/hust/conf/ConfigurationManager.java b/src/main/java/cn/edu/hust/conf/ConfigurationManager.java
index dbae85b..bc827ba 100644
--- a/src/main/java/cn/edu/hust/conf/ConfigurationManager.java
+++ b/src/main/java/cn/edu/hust/conf/ConfigurationManager.java
@@ -4,14 +4,14 @@ import java.io.InputStream;
import java.util.Properties;
/**
- * 配置文件管理类
+ * 配置文件管理类两个号
* 主要的功能:从特定的properties文件中读取相应的key/value
*/
public class ConfigurationManager {
private static Properties prop=new Properties();
/**
- * 通过静态代码块加载配置文件
+ * ..........通过静态代码块加载配置文件
*/
static{
try
diff --git a/src/main/java/cn/edu/hust/session/CategorySortKey.java b/src/main/java/cn/edu/hust/session/CategorySortKey.java
index cdc07ee..7952ec0 100644
--- a/src/main/java/cn/edu/hust/session/CategorySortKey.java
+++ b/src/main/java/cn/edu/hust/session/CategorySortKey.java
@@ -4,25 +4,29 @@ package cn.edu.hust.session;
import scala.math.Ordered;
public class CategorySortKey implements Ordered, java.io.Serializable {
-
+ // 定义三个 Long 类型的字段,表示点击数、订单数和支付数
private Long clickCount;
private Long orderCount;
private Long payCount;
-
+ // 实现 Ordered 接口中的 compare 方法,进行排序比较
@Override
public int compare(CategorySortKey categorySortKey) {
+ // 先比较点击数,如果当前对象的点击数与传入对象的点击数不相等,则按点击数排序
if(clickCount-categorySortKey.getClickCount()!=0)
{
return (int) (clickCount-categorySortKey.getClickCount());
- }else if(clickCount-categorySortKey.getClickCount()==0&&orderCount-categorySortKey.getOrderCount()!=0)
+ }
+ // 如果点击数相等,再比较订单数
+ else if(clickCount-categorySortKey.getClickCount()==0&&orderCount-categorySortKey.getOrderCount()!=0)
{
return (int) (orderCount-categorySortKey.getOrderCount());
}
+ // 如果点击数和订单数都相等,再比较支付数
else if(clickCount-categorySortKey.getClickCount()==0&&orderCount-categorySortKey.getOrderCount()==0&&payCount-categorySortKey.getPayCount()!=0)
return (int) (payCount-categorySortKey.getPayCount());
- return 0;
+ return 0;// 如果点击数、订单数和支付数都相等,则返回 0,表示相等
}
-
+//11
@Override
public boolean $less(CategorySortKey categorySortKey) {
if(clickCount