diff --git a/003-CreateOrder/Order.robot b/003-CreateOrder/Order.robot index c32f07e..d791b4a 100644 --- a/003-CreateOrder/Order.robot +++ b/003-CreateOrder/Order.robot @@ -161,17 +161,17 @@ DeliveryOrder Set Global Variable ${Charges} Set Global Variable ${InvoiceData} #计算合计金额 - ${Amount} Evaluate 125 #商品金额 + ${Price} Evaluate 1250 #商品金额 ${InvoicePrice} Evaluate round((${Price}+${Charges})*${InvoiceData},2) #开票费用 ${TotalAmount} Evaluate round(${Price}+${InvoicePrice},2) #合计金额 - Set Global Variable ${Amount} + Set Global Variable ${Price} Set Global Variable ${InvoicePrice} Set Global Variable ${TotalAmount} #获取优惠券列表 Create Session factory ${uecClient} ${ClientHeader} ${reps} Get On Session factory coupon-service/user/list/coupon/current-order-usable params=businessType=2&amount=${TotalAmount} ${CouponList} Get From Dictionary ${reps.json()['data']} currentOrderUsableCouponList #可用优惠券信息 - Log ${CouponList} + ${111} Evaluate type(${CouponList}) ${CouponPrice} Run Keyword If '${CouponList}'=='[]' Evaluate 0 ... ELSE Run Keyword Coupon ${TotalPrice} Evaluate round(${Price}+${InvoicePrice}-${CouponPrice}+${Charges},2) #下单金额=商品金额+开票费用+物流-优惠券 @@ -222,6 +222,6 @@ Coupon ${orderAmountLowerLimit} Get From Dictionary ${CouponData} orderAmountLowerLimit #优惠条件金额 ${discountAmountUpperLimit} Get From Dictionary ${CouponData} discountAmountUpperLimit #优惠封顶金额 ${CouponPrice} Run Keyword If '${couponType}'==3 Evaluate ${orderAmountLowerLimit}*(1-${discountAmount}) - ... ELSE Set Variable ${discountAmount} + ... ELSE Evaluate ${discountAmount} ${Coupon} Set Variable If '${CouponPrice}'>'${discountAmountUpperLimit}' ${discountAmountUpperLimit} ${CouponPrice} Set Global Variable ${Coupon}