浏览代码

暂无超出流量限制,抛出日志屏蔽

chenguo 4 周之前
父节点
当前提交
af56059ae5

+ 4 - 6
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -75,14 +75,12 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.time.*;
-import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicLong;
@@ -852,15 +850,15 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             Long remainingTraffic = updateRedisCache(company, recordedTraffic/1024);
 
             if ("1".equals(configUtil.generateConfigByKey("watch.course.config").getString("doNotPlay")) && remainingTraffic <= 0) {
-                logger.warn("公司ID: {} 流量不足,当前剩余: {}", company.getCompanyId(), remainingTraffic);
+                //logger.warn("公司ID: {} 流量不足,当前剩余: {}", company.getCompanyId(), remainingTraffic);
                 throw new Exception("流量不足");
             }
 
             /*logger.info("异步扣除流量成功 - 公司ID: {}, 扣除流量: {}, 剩余流量: {}",
                     company.getCompanyId(), traffic, remainingTraffic);*/
-        } catch (Exception e) {
-            logger.error("异步扣除流量失败 - 公司ID: {}, 错误信息: {}",
-                    company.getCompanyId(), e.getMessage(), e);
+        } catch (Exception ignored) {
+            /*logger.error("异步扣除流量失败 - 公司ID: {}, 错误信息: {}",
+                    company.getCompanyId(), e.getMessage(), e);*/
         }
     }