From 41f40e898a7ebdbefc8a02b472d58d4689b3e88e Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 08 八月 2024 19:05:05 +0800
Subject: [PATCH] BaseResult替换localDate

---
 ycl-pojo/src/main/java/com/ycl/platform/domain/result/BaseResult.java |    3 ++-
 ycl-server/src/main/java/com/ycl/task/VideoTask.java                  |   19 ++++++++++++-------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/BaseResult.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/BaseResult.java
index 54a2676..ce6f3d4 100644
--- a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/BaseResult.java
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/BaseResult.java
@@ -5,6 +5,7 @@
 import org.springframework.data.annotation.CreatedDate;
 import org.springframework.data.annotation.Id;
 
+import java.time.LocalDate;
 import java.util.Date;
 
 @Data
@@ -15,5 +16,5 @@
      * 鏁版嵁鏃ユ湡
      */
     @CreatedDate
-    private Date mongoCreateTime;
+    private LocalDate mongoCreateTime;
 }
diff --git a/ycl-server/src/main/java/com/ycl/task/VideoTask.java b/ycl-server/src/main/java/com/ycl/task/VideoTask.java
index 81c523c..1fbec55 100644
--- a/ycl-server/src/main/java/com/ycl/task/VideoTask.java
+++ b/ycl-server/src/main/java/com/ycl/task/VideoTask.java
@@ -24,7 +24,7 @@
 /**
  * 瑙嗛璁$畻鑰冩牳鎸囨爣浠诲姟
  * 鍑屾櫒鎵ц璁$畻鏄ㄥぉ鏁版嵁
- * */
+ */
 @Slf4j
 @Component("videoTask")
 public class VideoTask {
@@ -33,7 +33,7 @@
     @Autowired
     private PlatformOnlineMapper platformOnlineMapper;
 
-    public void siteOnlineTask(){
+    public void siteOnlineTask() {
         Date yesterday = DateUtils.addDays(new Date(), -1);
         //璁$畻鐐逛綅鍦ㄧ嚎鐜囧拰閲嶇偣鐐逛綅鍦ㄧ嚎鐜�
         Query query = new Query();
@@ -44,7 +44,8 @@
         CalculationStrategy calculator = IndexCalculationFactory.getCalculator(CalculationStrategyConstants.Video_SiteOnline);
         calculator.calculate(results);
     }
-    public void videoUsabilityTask(){
+
+    public void videoUsabilityTask() {
         Date yesterday = DateUtils.addDays(new Date(), -1);
         //璁$畻褰曞儚鍙敤鐜囧拰閲嶇偣褰曞儚鍙敤鐜�
         Query query = new Query();
@@ -55,13 +56,17 @@
         CalculationStrategy calculator = IndexCalculationFactory.getCalculator(CalculationStrategyConstants.Video_Usability);
         calculator.calculate(results);
     }
-    public void oneMonitorFileTask(){
+
+    public void oneMonitorFileTask() {
         //璁$畻涓�鏈轰竴妗f敞鍐岀巼銆佷竴鏈轰竴妗e悎鏍肩巼銆佹。妗堣�冩牳姣�
     }
-    public void platformOnlineTask(){
+
+    public void platformOnlineTask() {
         //璁$畻骞冲彴鍦ㄧ嚎鐜�
         //鎷垮埌浠婃棩绂荤嚎鏃堕暱鏁版嵁
-        Integer time = platformOnlineMapper.sumOffTime(DateUtils.getMouthStart(new Date()),DateUtils.getMouthEnd(new Date()));
-        
+        Integer time = platformOnlineMapper.sumOffTime(DateUtils.getMouthStart(new Date()), DateUtils.getMouthEnd(new Date()));
+        int num = (time / 60) % 30;
+        double score = Math.max(1 - num * 0.1,0);
+
     }
 }

--
Gitblit v1.8.0