Эх сурвалжийг харах

使用exists优化判断消息推送是否存在数据

zhangdongming 11 сар өмнө
parent
commit
e338d48b22

+ 2 - 2
Service/EquipmentInfoService.py

@@ -458,10 +458,10 @@ class EquipmentInfoService:
                 all=True
             )
 
-            if equipment_info_union.count() == 0:
+            if not equipment_info_union.exists():
                 return None, 0
             if CONFIG_EUR == CONFIG_INFO:
-                line = 8
+                line = 10
             count = 21
 
             equipment_info_union = cls.get_equipment_info_union_page(equipment_info_union, page, line)