15 changed files with 4514 additions and 488 deletions
Unified View
Diff Options
-
40-Login/LoginResource.robot
-
81-Applet/1-WriteInfo/InfoResource.robot
-
121-Applet/2-Homepage/MarriageInfo/Authentication.robot
-
21-Applet/2-Homepage/MarriageInfo/DataAuthentication.robot
-
51-Applet/5-SeekingReward/SeekingReward.robot
-
841-Applet/5-SeekingReward/SeekingRewardResource.robot
-
21-Applet/5-SeekingReward/__init__.robot
-
22-Web/InfoAudit/AuditInfomation.robot
-
112-Web/Mall/ProductResource.robot
-
22-Web/Mall/product.robot
-
2DA_data.yaml
-
8Phone.txt
-
13output/log.html
-
4837output/output.xml
-
10output/report.html
12
1-Applet/2-Homepage/MarriageInfo/Authentication.robot
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,5 @@ |
|||||
|
*** Settings *** |
||||
|
Suite Setup Import Variables ${EXECDIR}\\DA_data.yaml |
||||
|
Resource SeekingRewardResource.robot |
||||
|
|
||||
|
*** Test Cases *** |
||||
@ -0,0 +1,84 @@ |
|||||
|
*** Settings *** |
||||
|
Library urllib3 |
||||
|
Library String |
||||
|
Library DateTime |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
Library DatabaseLibrary |
||||
|
|
||||
|
*** Keywords *** |
||||
|
查询${dating}用户资料 |
||||
|
${miId_list} Create List |
||||
|
FOR ${userId} ${client_header} IN ZIP ${userid_list} ${Cheader_list} |
||||
|
Disable Warnings |
||||
|
Create Session dating ${${dating}.dating域名} ${client_header} |
||||
|
${reps} GET On Session dating /dating-agency-service/user/get/first/fill/marriage/information/details params=userId=${userId} |
||||
|
${miId} Get From Dictionary ${reps.json()['data']} id #资料id |
||||
|
Append To List ${miId_list} ${miId} |
||||
|
Set Global Variable ${userId} |
||||
|
Set Global Variable ${miId_list} |
||||
|
END |
||||
|
|
||||
|
查询${dating}征婚人的择偶资料 |
||||
|
#通过miId获取征婚人的择偶资料 |
||||
|
FOR ${client_header} IN @{Cheader_list} |
||||
|
Create Session dating ${${dating}.dating域名} ${client_header} |
||||
|
${reps} GET On Session dating dating-agency-service/user/get/demand/marriage/details params=miId=${miId} |
||||
|
${message} Get From Dictionary ${reps.json()} message |
||||
|
Should Be Equal As Strings ${message} successful |
||||
|
END |
||||
|
|
||||
|
查询${dating}征婚人发榜详情 |
||||
|
#通过miId查询征婚人发榜详情 |
||||
|
FOR ${miId} ${client_header} IN ZIP ${miId_list} ${Cheader_list} |
||||
|
Create Session dating ${${dating}.dating域名} ${client_header} |
||||
|
${reps} GET On Session dating dating-agency-service/user/get/marriage/seeking/reward/to/be/announced/detail params=miId=${miId} |
||||
|
${userId} Get From Dictionary ${reps.json()['data']} userId #获取征婚人userId |
||||
|
Set Global Variable ${userId} |
||||
|
END |
||||
|
|
||||
|
用户发布${dating}招亲榜 |
||||
|
#生成第三方订单 |
||||
|
FOR ${miId} ${client_header} IN ZIP ${miId_list} ${Cheader_list} |
||||
|
${resultGift} Evaluate random.uniform(0.1,0.5) random #随机生成结果礼金 |
||||
|
${meetingFee} Evaluate random.uniform(0.01,0.05) random #随机生成每人见面礼金 |
||||
|
${data} Set Variable {"miId":"${miId}","meetingFee":${meetingFee},"resultGift":${resultGift}} |
||||
|
${reps} POST On Session dating dating-agency-mall/user/submit/marriage-bounty-order ${data.encode('utf-8')} |
||||
|
${orderId} Get From Dictionary ${reps.json()['data']} orderId #获取订单号 |
||||
|
${rewardAmount} Evaluate ${meetingFee}*5+${resultGift} #悬赏总金额 |
||||
|
Set Global Variable ${orderId} |
||||
|
Set Global Variable ${resultGift} |
||||
|
Set Global Variable ${meetingFee} |
||||
|
Set Global Variable ${rewardAmount} |
||||
|
END |
||||
|
|
||||
|
数据库插入数据 |
||||
|
${dataTime} Get Current Date result_format=%Y-%m-%d %H:%M:%S #获取当前时间 |
||||
|
FOR ${miId} IN @{miId_list} |
||||
|
Connect To Database Using Custom Params pymysql database='dating_agency_mall',user='jxh_user',password='jxh@2024db',host='rm-wz94koti4awpbd5t3ro.mysql.rds.aliyuncs.com' #生产数据库 |
||||
|
${insert1} Execute Sql String INSERT INTO `dating_agency_mall`.`da_marriage_bounty_order`(`id`, `is_delete`, `create_time`, `update_time`, `user_id`, `mi_id`, `reward_amount`, `status`, `payment_status`) VALUES (NULL, 0, '${dataTime}', '${dataTime}', ${userId}, ${miId}, ${rewardAmount}, 1, 1) #悬赏招亲订单插入数据 |
||||
|
${check1} Query SELECT id FROM `dating_agency_mall`.`da_marriage_bounty_order` WHERE `mi_id` = '${miId}' AND `status` = '1' #查询悬赏订单Id |
||||
|
${bountyOrderId} Set Variable ${check1[0][0]} |
||||
|
${insert2} Execute Sql String INSERT INTO `dating_agency_mall`.`da_marriage_bounty_order_product_record`(`id`, `create_time`, `marriage_bounty_order_id`, `reward_amount`) VALUES (NULL, '${dataTime}', ${bountyOrderId}, ${rewardAmount}) #悬赏招亲订单产品记录表插入数据 |
||||
|
${check2} Query SELECT id FROM `dating_agency_mall`.`da_marriage_bounty_order_product_record` WHERE `marriage_bounty_order_id` = '${bountyOrderId}' #查询悬赏订单产品id |
||||
|
${bountyOrderProductId} Set Variable ${check2[0][0]} |
||||
|
${insert3} Execute Sql String INSERT INTO `dating_agency_mall`.`da_marriage_bounty_order_product_spec_record`(`id`, `create_time`, `marriage_bounty_order_product_record_id`, `sub_category`, `unit_original_price`, `unit_selling_price`) VALUES (NULL, '${dataTime}', ${bountyOrderProductId}, 901, ${meetingFee}, ${meetingFee}),(NULL, '${dataTime}', ${bountyOrderProductId}, 902, ${resultGift}, ${resultGift}) #悬赏招亲订单关系插入数据-见面礼金/结果礼金 |
||||
|
${insert4} Execute Sql String INSERT INTO `dating_agency_mall`.`da_marriage_bounty_order_rel`(`id`, `create_time`, `marriage_bounty_order_id`, `order_id`, `order_amount`) VALUES (NULL, '${dataTime}', ${bountyOrderId}, ${orderId}, ${rewardAmount}) #悬赏招亲订单关系插入数据 |
||||
|
${insert5} Execute Sql String INSERT INTO `dating_agency_mall`.`da_marriage_bounty_order_reward`(`id`, `is_delete`, `create_time`, `update_time`, `marriage_bounty_order_id`, `meeting_mi_id`, `reward_category`, `reward_amount`, `is_receive`) VALUES (NULL, 0, '${dataTime}', '${dataTime}', ${bountyOrderId}, NULL, 901, ${meetingFee}, 0),(NULL, 0, '${dataTime}', '${dataTime}', ${bountyOrderId}, NULL, 901, ${meetingFee}, 0),(NULL, 0, '${dataTime}', '${dataTime}', ${bountyOrderId}, NULL, 901, ${meetingFee}, 0),(NULL, 0, '${dataTime}', '${dataTime}', ${bountyOrderId}, NULL, 901, ${meetingFee}, 0),(NULL, 0, '${dataTime}', '${dataTime}', ${bountyOrderId}, NULL, 901, ${meetingFee}, 0),(NULL, 0, '${dataTime}', '${dataTime}', ${bountyOrderId}, NULL, 902, ${resultGift}, 0) #悬赏招亲订单奖励插入数据 |
||||
|
END |
||||
|
|
||||
|
查询${dating}招亲榜列表 |
||||
|
FOR ${client_header} IN @{Cheader_list} |
||||
|
Create Session dating ${${dating}dating域名} ${client_hader} |
||||
|
${reps} GET On Session dating-agency-service/user/get/marriage/seeking/reward/page params=pageNum=1&pageSize=10&matchmakerFlag=${matchmakerFlag} |
||||
|
${records} Get From Dictionary ${reps.json()['data']} records |
||||
|
Set Global Variable ${records} |
||||
|
遍历招亲榜列表 |
||||
|
END |
||||
|
|
||||
|
遍历招亲榜列表 |
||||
|
FOR ${records} IN @{records} |
||||
|
${MIID} Get From Dictionary ${records} miId |
||||
|
Exit For Loop If ${MIID}==${miId} |
||||
|
Set Global Variable ${MIID} |
||||
|
END |
||||
@ -0,0 +1,2 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 招亲榜 |
||||
13
output/log.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
4837
output/output.xml
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save