diff --git a/RF-TEST/2-Platform/Auction.robot b/RF-TEST/2-Platform/Auction.robot index f079934..81fe199 100644 --- a/RF-TEST/2-Platform/Auction.robot +++ b/RF-TEST/2-Platform/Auction.robot @@ -98,59 +98,13 @@ auction_detail ${reps} GET On Session auction auction-service/admin/page/auction params=status=&pageNum=1&pageSize=10 ${List} Get From Dictionary ${reps.json()['data']} records #委托拍品列表 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}' END + ${isDown} Set Variable If '${isDown}'=='${true}' false true #上架拍品 - ${PutonAuction} Set Variable { \ \ \ \ "id":"${auctionId}", \ \ \ \ "isDown":false } + ${PutonAuction} Set Variable { \ \ \ \ "id":"${auctionId}", \ \ \ \ "isDown":${isDown}} ${reps} POST On Session auction auction-service/admin/operate/auction ${PutonAuction.encode('utf-8')} Should Be Equal As Strings ${reps.json()['message']} successful - -auction_detail1 - #拍品详情 - Create Session auction ${uecops} ${ztbsc_header} - ${reps} GET On Session auction auction-service/admin/get/auction/detail/${auctionEntrustId} - ${auctionId} Get From Dictionary ${reps.json()['data']} auctionId #拍品唯一标识 - ${displayName} Get From Dictionary ${reps.json()['data']} displayName #拍品名称 - ${auctionLotId} Get From Dictionary ${reps.json()['data']} auctionLotId - ${displayAddress} Get From Dictionary ${reps.json()['data']} displayAddress #拍品地 - ${displayDescribe} Get From Dictionary ${reps.json()['data']} displayDescribe #拍品描述 - ${auctionId} Set Variable If '${auctionId}'=='${None}' null ${auctionId} - #修改拍品设置 - #上传图片 - Disable Warnings - ${image} Evaluate open('./标的1-6.jpg','rb') - ${filepath} Evaluate open('./标的1-6.jpg','rb') - ${file} Create Dictionary filepath=${filepath} image=${image} - Create Session auction ${ztbops} - ${reps} POST On Session auction recycle-user-center/upload/image files=${file} - ${pictures} Get From Dictionary ${reps.json()} data - #上传MP4文件 - #${file} Evaluate open('./5e7f47fb6aea3.mp4','rb') - #${file_data} Create Dictionary file=${file} - #${type_data} Create Dictionary type='mp4' - #Create Session auction ${ztbops} - #${reps} POST On Session auction recycle-user-center/upload/file data=${type_data} files=${fileData} - #${MP4Data} Get From Dictionary ${reps.json()} data - #Set Global Variable ${MP4Data} - #sleep 0.5 - #保存拍品设置 - Create Session auction ${uecops} ${ztbsc_header} - ${quantity} Evaluate round(random.uniform(2,30),2) random #拍卖重量(吨) - ${auctionData} Set Variable { \ \ \ \ "auctionLotImageList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "url":"${pictures}", \ \ \ \ \ \ \ \ \ \ \ \ "type":1 \ \ \ \ \ \ \ \ }], \ \ \ \ "displayDescribe":"${displayDescribe}", \ \ \ \ "displayAddress":"${displayAddress}", \ \ \ \ "displayName":"${displayName}", \ \ \ \ "quantity":${quantity}, \ \ \ \ "id":"${auctionLotId}" } - ${reps} POST On Session auction auction-service/admin/modify/auction-lot ${auctionData.encode('utf-8')} - Should Be Equal As Strings ${reps.json()['message']} successful - #设置拍品规则 - #随机获取竞拍人员 - ${reps} GET On Session auction auction-service/admin/page/auction-bidder params=pageNum=1&pageSize=30&keyword=&depositPaymentStatus=1 - ${List} Create List - ${Bidders} Get From Dictionary ${reps.json()['data']} records #竞拍人员列表 - FOR ${items} IN @{Bidders} - ${id} Get From Dictionary ${items} id #竞拍人员id - Append To List ${List} {"id":"${id}"} - END - ${Num} Evaluate random.randint(1,6) random #获取随机数字 - ${bidders_List} Evaluate random.sample(${List},${Num}) random - ${BList} Convert To String ${bidders_List} - ${BList} Replace Variables ${BList} ' "