diff --git a/003-CreateOrder/Order.robot b/003-CreateOrder/Order.robot index 0fa477a..954e9d1 100644 --- a/003-CreateOrder/Order.robot +++ b/003-CreateOrder/Order.robot @@ -111,4 +111,39 @@ Normal ${Technology} Evaluate round(${Long}*${Weight}/100*0.00003*${quantity},2) #工艺费 ${TotalPrice} Evaluate round(${Material}+${Technology},2) #总价 ${Price} Set Variable If '${TotalPrice}'<='125' 125 ${TotalPrice} #比较价格 + Log ${Price} Should Be Equal As Numbers ${Amount} ${Price} + +ConfirmOrder + #确认下单页面 + #查询钱包 + Create Session factory ${uecClient} ${ClientHeader} + ${reps} GET On Session factory wallet-service/user/get/wallet-account + ${amountGift} Get From Dictionary ${reps.json()['data']} amountGift #赠送金额 + ${totalBalance} Get From Dictionary ${reps.json()['data']} totalBalance #总金额 + ${frozenBalance} Get From Dictionary ${reps.json()['data']} frozenBalance #冻结金额 + ${availableBalance} Get From Dictionary ${reps.json()['data']} availableBalance #可用金额 + Set Global Variable ${amountGift} + Set Global Variable ${totalBalance} + Set Global Variable ${frozenBalance} + Set Global Variable ${availableBalance} + #获取送货地址列表 + Create Session factory ${yytClient} ${ClientHeader} + ${reps} GET On Session factory printing-package-mall-service/user/page/user-shipping-address params=pageNum=1&pageSize=100 + ${AddressList} Get From Dictionary ${reps.json()['data']} records #地址列表 + ${Address} Evaluate random.choice(${AddressList}) random #随机获取送货地址 + ${CityId} Get From Dictionary ${Address} cityId #市id + ${DistrictId} Get From Dictionary ${Address} districtId #区id + ${ProvinceId} Get From Dictionary ${Address} provinceId #省id + Set Global Variable ${CityId} + Set Global Variable ${DistrictId} + Set Global Variable ${ProvinceId} + #自提 + ${LocationCityId} Set Variable 120100 + ${LocationDistrictId} Set Variable 120102 + ${LocationProvinceId} Set Variable 120000 + Set Global Variable ${LocationCityId} + Set Global Variable ${LocationDistrictId} + Set Global Variable ${LocationProvinceId} + #送货-获取税点 + ${reps} GET On Session factory printing-package-mall-service/user/get/sale-order/other-fees-config params=factoryId=${Fid}&orgId=${organizationId}&deliveryAddressProvinceId=${ProvinceId}&deliveryAddressCityId=${CityId}&deliveryAddressDistrictId=${DistrictId}