You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
120 lines
6.7 KiB
120 lines
6.7 KiB
*** Settings ***
|
|
Library urllib3
|
|
Library String
|
|
Library DateTime
|
|
Library Collections
|
|
Library RequestsLibrary
|
|
Library DatabaseLibrary
|
|
|
|
*** Keywords ***
|
|
扫描${dating}邀请绑定代理人二维码
|
|
#扫描邀请绑定代理人二维码
|
|
FOR ${client_header} IN @{Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${reps} GET On Session dating dating-agency-uec/user/verify/qrcode params=mark=50325897884795883&qrCodeRecordId=1023654201504436224
|
|
${code} Get From Dictionary ${reps.json()} code
|
|
${orgId} Get From Dictionary ${reps.json()['data']['metaData']} orgId #运营中心组织id
|
|
END
|
|
Set Global Variable ${orgId}
|
|
|
|
用户绑定${dating}运营中心
|
|
#用户绑定运营中心
|
|
FOR ${client_header} IN @{Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${data} Set Variable {"orgId":${orgId}}
|
|
${reps} POST On Session dating dating-agency-uec/user/bind/operation-center ${data.encode('utf-8')}
|
|
${message} Get From Dictionary ${reps.json()} message
|
|
Should Be Equal As Strings ${message} successful
|
|
END
|
|
|
|
查询${dating}用户组织信息
|
|
#查询用户组织信息
|
|
FOR ${client_header} IN @{Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${reps} Get From Dictionary dating dating-agency-uec/user/get/org/list
|
|
${data} Get From Dictionary ${reps.json()} data #用户组织数组
|
|
${orgData} Evaluate random.choice(${data}) random #随机获取用户组织信息
|
|
${orgId} Get From Dictionary ${orgData} id #组织id
|
|
${orgName} Get From Dictionary ${orgData} fullName #组织name
|
|
${message} Get From Dictionary ${reps.json()} message
|
|
Should Be Equal As Strings ${message} successful
|
|
END
|
|
Set Global Variable ${orgId}
|
|
Set Global Variable ${orgName}
|
|
|
|
填写${dating}店铺申请信息
|
|
#填写店铺申请信息
|
|
${orgId} Set Variable 1023317811931516928
|
|
${orgId} Convert To String ${orgId}
|
|
FOR ${client_header} ${phone} IN ZIP ${Cheader_list} ${phoneList}
|
|
region固定省市-广州
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${DateTime} Get Current Date result_format=%Y-%m-%d #获取当天日期
|
|
${data} Set Variable {"operationCenterOrgId":"${orgId}","managerName":"测试${DateTime}","phone":"${phone}","captcha":"888888","serviceAreaList":[{"provinceCode":${provinceCode},"provinceName":"${provinceName}","cityCode":${cityCode},"cityName":"${cityName}","districtCode":${districtCode},"districtName":"${districtName}"}],"storeName":"测试门店${DateTime}"}
|
|
${reps} POST On Session dating dating-agency-uec/user/apply/store-audit ${data.encode('utf-8')}
|
|
${storeAuditId} Get From Dictionary ${reps.json()} data #门店id
|
|
${message} Get From Dictionary ${reps.json()} message #响应体信息
|
|
Run Keyword If ${storeAuditId}==None log ${message}
|
|
... ELSE Should Be Equal As Strings ${message} successful
|
|
END
|
|
Set Global Variable ${storeAuditId}
|
|
|
|
查询${dating}门店管理审核列表
|
|
#代理商门店管理审核列表
|
|
FOR ${client_header} IN @{Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${reps} GET On Session dating dating-agency-uec/user/page/store-audit/by/operation-center params=pageNum=1&pageSize=10
|
|
${records} Get From Dictionary ${reps.json()['data']} records #门店待审核列表
|
|
Set Global Variable ${records}
|
|
遍历门店待审核列表
|
|
${message} Get From Dictionary ${reps.json()} message
|
|
Should Be Equal As Strings ${message} successful #断言是否相等
|
|
END
|
|
|
|
遍历门店待审核列表
|
|
FOR ${storeData} IN @{records}
|
|
${SAuditId} Get From Dictionary ${storeData} id #门店审核列表id
|
|
${storeName} Get From Dictionary ${storeData} storeName #门店name
|
|
${operationId} Get From Dictionary ${storeData} operationCenterId #代理商id
|
|
${operationOrgId} Get From Dictionary ${storeData} operationCenterOrgId #代理商orgid
|
|
Exit For Loop If ${SAuditId}==${storeAuditId}
|
|
END
|
|
Set Global Variable ${SAuditId}
|
|
Set Global Variable ${storeName}
|
|
Set Global Variable ${operationId}
|
|
Set Global Variable ${operationOrgId}
|
|
|
|
region固定省市-广州
|
|
Disable Warnings
|
|
Create Session region http://qncloud.oss-cn-shenzhen.aliyuncs.com
|
|
${reps} GET On Session region address.json
|
|
${local_data} Get From Dictionary ${reps.json()} data
|
|
FOR ${province} IN @{local_data} #省列表数据
|
|
${provinceCode} Get From Dictionary ${province} value #获取省编码
|
|
${provinceName} Get From Dictionary ${province} label #获取省名称
|
|
Exit For Loop If '${provinceName}'=='广东省'
|
|
END
|
|
${city_data} Get From Dictionary ${province} children #广东省市列表数据
|
|
FOR ${city} IN @{city_data}
|
|
${cityCode} Get From Dictionary ${city} value #获取市编码
|
|
${cityName} Get From Dictionary ${city} label #获取市名称
|
|
Exit For Loop If '${cityName}'=='广州市'
|
|
END
|
|
${district_data} Get From Dictionary ${city} children #广州市列表数据
|
|
log ${district_data}
|
|
${district} Evaluate random.choice(${district_data}) random
|
|
${districtCode} Get From Dictionary ${district} value #随机获取广州市区编码
|
|
${districtName} Get From Dictionary ${district} label #随机获取广州市区名称
|
|
Set Global Variable ${cityCode}
|
|
Set Global Variable ${cityName}
|
|
Set Global Variable ${districtCode}
|
|
Set Global Variable ${districtName}
|
|
Set Global Variable ${provinceCode}
|
|
Set Global Variable ${provinceName}
|
|
|
|
代理商审核${dating}门店
|
|
#审核门店信息
|
|
FOR ${client_header} IN @{Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${status} Evaluate random.choice(1,2,3) random #审核状态
|
|
${data} Set Variable {"id":"${SAuditId}","status":${status}}
|