@@ -25,8 +25,7 @@ public class CallCounterAspect {
if (callCountObj == null) {
return 0; // 如果未找到,则返回 0
} else {
- // 将 Object 转换为 Long,因为 Redis 存储的数字通常以 Long 类型存储
- return ((Long) callCountObj).intValue(); // 使用 Long 的 intValue() 方法转换为 int
+ return (int) callCountObj; // intValue() 方法转换为 int
}