Example #1
0
 def test_38_pickTrip(self):
     print("开始test_38_pickTrip接口")
     orderId = cashdata.ORDER['orderId']
     sql = "update biz_order set State=4 where ID=%d" % orderId
     db = database.Database(self.dbEnv)
     res = db.update(sql)
     response_data = self.excel_data.get_case_data(self.file_name,37,1,content_type="application/json",id=orderId)
     print("返回数据:",response_data)
     sqla = "update biz_order set State=7 where ID=%d" % orderId
     db = database.Database(self.dbEnv)
     res = db.update(sqla)
     print("订单已关闭")
Example #2
0
 def test_37_syncPaySucState(self):
     print("开始test_37_syncPaySucState接口")
     orderId = cashdata.ORDER['orderId']
     sql = "update biz_order set State=3 where ID=%d" % orderId
     db = database.Database(self.dbEnv)
     res = db.update(sql)
     response_data = self.excel_data.get_case_data(self.file_name,36,1,content_type="application/json",id=orderId)
     print("返回数据:",response_data)
Example #3
0
 def test_35_ordersubmit(self):
     print("开始test_35_ordersubmit接口")
     sql = "select * from biz_order WHERE MemberShipID=21421 and state=7 ORDER BY CreateDate DESC LIMIT 0,10"
     db = database.Database(self.dbEnv)
     res = db.query(sql)
     if len(res) == '':
         print("没有待评论的订单")
     else:
         orderId = res[0][0]
         response_data = self.excel_data.get_case_data(self.file_name,34,1,content_type="application/json",id=orderId)
         print("返回数据:",response_data)
Example #4
0
 def test_16_calculatePCCoupon(self):
     print("开始test_16_calculatePCCoupon接口")
     id = cashdata.ORDER['orderId']
     sql = "SELECT * FROM biz_coupondetail WHERE MemberId = 21421 AND CouponId = 132 AND isUser = 0 LIMIT 0,1000"
     db = database.Database(self.dbEnv)
     res = db.query(sql)
     if len(res) <= 1:
          print("优惠券不足了,请添加优惠券再测试")
     else:
         couponDetailId = res[1][0]
         response_data = self.excel_data.get_case_data(self.file_name,15,1,content_type="application/json",couponDetailId=couponDetailId,id=id)
         print("返回数据:",response_data)
Example #5
0
 def test_49_waitOrder(self):
     print("开始test_49_waitOrder接口")
     sql = "SELECT * FROM biz_coupondetail WHERE MemberId = 21421 AND CouponId = 132 AND isUser = 0 LIMIT 0,1000"
     db = database.Database(self.dbEnv)
     res = db.query(sql)
     if len(res) <= 1:
          print("优惠券不足了,请添加优惠券再测试")
     else:
         couponDetailId = res[1][0]
         res_data = self.excel_data.get_case_data(self.file_name,14,1,content_type="application/json",appoint=False, \
                                                       carType=4,couponFeeTotal=57.270000457763672,dateFrom='',dateTo='',\
                                                       detailId=couponDetailId,distance=15273,fee=0.0099999997764825821,\
                                                       lineId='',orderPerson=0,type=1,pickType=0)
         RealtimeorderId = res_data['data']['id']
         cashdata.ORDER['RealtimeorderId'] = RealtimeorderId
         response_data = self.excel_data.get_case_data(self.file_name,48,1,content_type="application/json",id=RealtimeorderId)
         print("返回数据:",response_data)