瀏覽代碼

完善微信账单信息(套餐类型)

guanhailong 2 年之前
父節點
當前提交
c85d483590
共有 3 個文件被更改,包括 18 次插入0 次删除
  1. 1 0
      Controller/AiController.py
  2. 1 0
      Controller/CloudStorage.py
  3. 16 0
      Service/CommonService.py

+ 1 - 0
Controller/AiController.py

@@ -671,6 +671,7 @@ class AiView(View):
         pay_url = "{}AiService/doWechatCallBack".format(SERVER_DOMAIN_SSL)
         try:
             pay = WechatPayObject()
+            content = CommonService.Package_Type(1, content)  # AI套餐
             pay.get_parameter(order_id, content, float(price) * 100, ip, pay_url, quote("lang=" + lang))
             sign_params = pay.re_finall(orderid=order_id)
             if not sign_params:

+ 1 - 0
Controller/CloudStorage.py

@@ -1247,6 +1247,7 @@ class CloudStorageView(View):
             pay = WechatPayObject()
             notify_url = "{SERVER_DOMAIN_SSL}cloudstorage/dowechatnotify".format(
                 SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL)
+            content = CommonService.Package_Type(0, content)  # 云存套餐
             # 获取参数
             parameter_dict = pay.get_parameter(order_id, content, float(price) * 100, ip, notify_url,
                                                quote("lang=" + lang))

+ 16 - 0
Service/CommonService.py

@@ -737,3 +737,19 @@ GCqvlyw5dfxNA+EtxNE2wCW/LW7ENJlACgcfgPlBZtpLheWoZB/maw4=
         @param e: 列表元素
         """
         return sorted(e, key=lambda item: -item['count'])
+
+    @staticmethod
+    def Package_Type(order_type, content):
+        """
+        套餐类型
+        """
+        if order_type == 0:
+            content = content + '(' + '云存' + ')'
+            return  content
+        elif order_type == 1:
+            content = content + '(' + 'AI' + ')'
+            return content
+        elif order_type == 2:
+            pass
+
+