Browse Source

no message

master
LG_lai 2 years ago
parent
commit
fad91202f4
1 changed files with 4 additions and 4 deletions
  1. 8
      003-CreateOrder/Order.robot

8
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}
Loading…
Cancel
Save