|
|
|
@ -20,7 +20,11 @@ create_delegation |
|
|
|
${orgId} Get From Dictionary ${reps.json()['data']['records'][0]} id #委托方组织id |
|
|
|
Set Global Variable ${fullName} |
|
|
|
#创建委托拍品 |
|
|
|
${autionData} Set Variable { \ \ \ \ "auctionEntrustDto":{ \ \ \ \ \ \ \ \ "contact":"小小", \ \ \ \ \ \ \ \ "contactNumber":"15014242835", \ \ \ \ \ \ \ \ "entrustTime":"${time}", \ \ \ \ \ \ \ \ "orgId":"${orgId}" \ \ \ \ }, \ \ \ \ "auctionLotDto":{ \ \ \ \ \ \ \ \ "address":"重庆", \ \ \ \ \ \ \ \ "lotDescribe":"黄废", \ \ \ \ \ \ \ \ "name":"一级纸(黄废)" \ \ \ \ } } |
|
|
|
${quantity} Evaluate round(random.uniform(0,30),3) random #拍品重量/吨 |
|
|
|
${startingPrice} Evaluate random.randint(1500,1800) random #拍品起拍价 |
|
|
|
${expectedPrice} Evaluate random.randint(1800,2150) random #拍品目标价 |
|
|
|
${contactNumber} Evaluate random.choice(['139','188','185','136','158','151'])+"".join(random.choice("0123456789") for i in range(8)) random #11位随机数 |
|
|
|
${autionData} Set Variable { \ \ \ \ "auctionEntrustDto":{ \ \ \ \ \ \ \ \ "contact":"${auctionFullName}", \ \ \ \ \ \ \ \ "quantity":${quantity}, \ \ \ \ \ \ \ \ "contactNumber":"${contactNumber}", \ \ \ \ \ \ \ \ "startingPrice":${startingPrice}, \ \ \ \ \ \ \ \ "expectedPrice":${expectedPrice}, \ \ \ \ \ \ \ \ "orgId":"${orgId}", \ \ \ \ \ \ \ \ "sellerName":"${auctionFullName}", \ \ \ \ \ \ \ \ "entrustTime":"${time}" \ \ \ \ }, \ \ \ \ "auctionLotDto":{ \ \ \ \ \ \ \ \ "name":"${auctionFullName}的拍品", \ \ \ \ \ \ \ \ "address":"${auctionFullName}委托公司地址", \ \ \ \ \ \ \ \ "lotDescribe":"${auctionFullName}的拍品" \ \ \ \ } } |
|
|
|
${reps} POST On Session auction auction-service/admin/create/auction ${autionData.encode('utf-8')} |
|
|
|
Should Be Equal As Strings ${reps.json()['message']} successful |
|
|
|
#委托拍品列表 |
|
|
|
@ -28,8 +32,8 @@ create_delegation |
|
|
|
${List} Get From Dictionary ${reps.json()['data']} records #委托拍品列表 |
|
|
|
FOR ${items} IN @{List} |
|
|
|
${auctionEntrustId} Get From Dictionary ${items} auctionEntrustId #委托拍品id |
|
|
|
${auctionSellerOrgName} Get From Dictionary ${items} auctionSellerOrgName #委托组织名称 |
|
|
|
Exit For Loop If '${auctionSellerOrgName}'=='${fullName}' |
|
|
|
${sellerName} Get From Dictionary ${items} sellerName #委托组织名称 |
|
|
|
Exit For Loop If '${sellerName}'=='${fullName}' |
|
|
|
END |
|
|
|
Set Global Variable ${auctionEntrustId} |
|
|
|
|
|
|
|
@ -100,8 +104,8 @@ auction_detail |
|
|
|
FOR ${items} IN @{List} |
|
|
|
${isDown} Get From Dictionary ${items} isDown #拍品上、下架状态 |
|
|
|
${auctionId} Get From Dictionary ${items} auctionId #竞拍唯一标识 |
|
|
|
${auctionSellerOrgName} Get From Dictionary ${items} auctionSellerOrgName #委托组织名称 |
|
|
|
Exit For Loop If '${auctionSellerOrgName}'=='${fullName}' |
|
|
|
${sellerName} Get From Dictionary ${items} sellerName #委托组织名称 |
|
|
|
Exit For Loop If '${sellerName}'=='${fullName}' |
|
|
|
END |
|
|
|
${isDown} Set Variable If '${isDown}'=='${true}' false true |
|
|
|
#上架拍品 |
|
|
|
|