lang 3 роки тому
батько
коміт
226397ce21
1 змінених файлів з 5 додано та 5 видалено
  1. 5 5
      Controller/CloudStorage.py

+ 5 - 5
Controller/CloudStorage.py

@@ -759,8 +759,8 @@ class CloudStorageView(View):
                     expire = smqs[0]['expire'] * 2
                 # 是否有促销
                 nowTime = int(time.time())
-                promotion = PromotionRuleModel.objects.filter(status=1, startTime__gte=nowTime,
-                                                              endTime__lte=nowTime).values('id','ruleConfig')
+                promotion = PromotionRuleModel.objects.filter(status=1, startTime__lte=nowTime,
+                                                              endTime__gte=nowTime).values('id','ruleConfig')
                 promotion_rule_id = ''
                 if promotion.exists():
                     promotion_rule_id = promotion[0]['id']
@@ -876,8 +876,8 @@ class CloudStorageView(View):
                 expire = smqs[0]['expire'] * 2
             # 是否有促销
             nowTime = int(time.time())
-            promotion = PromotionRuleModel.objects.filter(status=1, startTime__gte=nowTime,
-                                                          endTime__lte=nowTime).values('id','ruleConfig')
+            promotion = PromotionRuleModel.objects.filter(status=1, startTime__lte=nowTime,
+                                                          endTime__gte=nowTime).values('id','ruleConfig')
             promotion_rule_id = ''
             if promotion.exists():
                 promotion_rule_id = promotion[0]['id']
@@ -990,7 +990,7 @@ class CloudStorageView(View):
                     expire = smqs[0]['expire'] * 2
                 #是否有促销
                 nowTime = int(time.time())
-                promotion = PromotionRuleModel.objects.filter(status=1,startTime__gte=nowTime,endTime__lte=nowTime).values('id','ruleConfig')
+                promotion = PromotionRuleModel.objects.filter(status=1,startTime__lte=nowTime,endTime__gte=nowTime).values('id','ruleConfig')
                 promotion_rule_id = ''
                 if promotion.exists():
                     promotion_rule_id = promotion[0]['id']