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

修复创建ai支付订单查询套餐相关数据存在问题

locky 3 жил өмнө
parent
commit
5c6b1cecd2

+ 4 - 5
Controller/AiController.py

@@ -400,15 +400,14 @@ class AiView(View):
             #         return response.json(10033)
 
             # 获取ai套餐数据
-            ai_sm_qs = AiStoreMeal.objects.filter(id=ai_meal_id, pay_type=pay_type, is_show=1). \
-                values('currency', 'price', 'content', 'effective_day', 'title')
+            ai_sm_qs = AiStoreMeal.objects.filter(id=ai_meal_id, pay_type=pay_type, is_show=1, lang__lang=lang). \
+                values('lang__title', 'lang__content', 'currency', 'price')
             if not ai_sm_qs.exists():
                 return response.json(173)
-            title = ai_sm_qs[0]['title']
-            content = ai_sm_qs[0]['content']
+            title = ai_sm_qs[0]['lang__title']
+            content = ai_sm_qs[0]['lang__content']
             currency = ai_sm_qs[0]['currency']
             price = ai_sm_qs[0]['price']
-            day = ai_sm_qs[0]['effective_day']
 
             nowTime = int(time.time())
             orderID = CommonService.createOrderID()