Parcourir la source

优惠卷,我的客户,标讯收藏接口

jialuyao il y a 2 ans
Parent
commit
5665e2e61e

+ 15 - 0
cases/登录功能/我的订单/coupon.py

@@ -0,0 +1,15 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '优惠卷'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.get_coupon()
+        r = res.json()
+        actural = r['data']['count']
+        actural1=r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查优惠卷接口是否正常', actural >= 0 and actural1 == 1 )

+ 16 - 0
cases/登录功能/收藏/message_collection.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '标讯收藏'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.Message_Collection()
+        r = res.json()
+        actural=r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查标讯收藏接口是否正常', actural == 0)
+
+

+ 15 - 0
cases/登录功能/监控/customer_list.py

@@ -0,0 +1,15 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '客户监控'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.Customer_monitoring()
+        r = res.json()
+        actural = r['data']['count']
+        actural1=r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查客户监控接口是否正常', actural >= 0 and actural1 == 0)

+ 40 - 1
lib/webapi.py

@@ -191,6 +191,19 @@ class APIMgr():
         response = s.post(f"{cfg.target_host}/subscribepay/orderListDetails/myOrder", headers=hearders, params=params)
         return response
 
+    """优惠卷"""
+    def get_coupon(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        params={
+            "mold": 4,
+            "currentPage": 1,
+            "pageSize": 8,
+            "platform": "P"
+             }
+        response= s.post(f"{cfg.target_host}/jyCoupon/getInfoByUser", headers=hearders,params=params)
+        return response
+
     """数据自动导出"""
     def get_dataExport(self,publishtime=1672502400_1688951529,keyword='数据',selectType='title'):
         hearders = GSTORE['headers']
@@ -214,7 +227,6 @@ class APIMgr():
         response = s.post(f"{cfg.target_host}/front/dataExport/sieveData", headers=hearders, params=params)
         return response
 
-
     """数据导出记录"""
     def Export_recordList(self):
         hearders = GSTORE['headers']
@@ -287,6 +299,33 @@ class APIMgr():
         }
         response = s.post(f"{cfg.target_host}/bigmember/follow/ent/list", headers=hearders, params=params)
         return response
+    """客户监控"""
+    def Customer_monitoring(self,):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        params = {
+            "pagesize": 10,
+            "pageno": 0,
+            "keyword":""
+        }
+        response = s.post(f"{cfg.target_host}/publicapply/customer/list", headers=hearders, params=params)
+        return response
+
+    """标讯收藏"""
+    def Message_Collection(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        params={
+            "buyerPhone":0,
+            "buyerclass":"",
+            "label":"",
+            "pagenum":1,
+            "pagesize":50,
+            "selectTime":"",
+            "winnerPhone":0
+        }
+        response = s.post(f"{cfg.target_host}/publicapply/bidcoll/list", headers=hearders, params=params)
+        return response
 
 
 apimgr = APIMgr()