|
我用LR录制了一个脚本,新增订单的,做了关联,回放也没有错误,我看的日志参数也取到值了,但是数据库里确没有数据,有哪位大神可以看一下是何原因!!
add_order()
{
/*---------------------------------add_order--------------------------------------*/
lr_start_transaction("add_order");
web_url("neworder.html",
"URL=http://10.40.1.10:8100/ebiz/view/sale/neworder.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.40.1.10:8100/ebiz/#/sale/dealerLists",
"Snapshot=t163.inf",
"Mode=HTTP",
LAST);
web_url("neworder.dealer.html",
"URL=http://10.40.1.10:8100/ebiz/view/sale/neworder.dealer.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.40.1.10:8100/ebiz/#/sale/dealerLists",
"Snapshot=t164.inf",
"Mode=HTTP",
LAST);
web_set_max_html_param_len("9999999");
web_reg_save_param("sellerid",
"LB=\"OrgId\":\"",
"RB=\",",
"Ord=1",
LAST);
web_reg_save_param("dealerid",
"LB=\"DealerOrgId\":\"",
"RB=\",",
"Ord=1",
LAST);
web_reg_save_param("dealername",
"LB=\"DealerRemarkName\":\"",
"RB=\"}",
"Ord=1",
LAST);
web_url("GetBoundDealerList",
"URL=http://10.40.1.10:8100/site/Dealer/GetBoundDealerList?CurPage=1&PageSize=10",
"Resource=1",
"RecContentType=application/json",
"Referer=http://10.40.1.10:8100/ebiz/#/sale/dealerLists",
"Snapshot=t165.inf",
LAST);
web_url("selectProducts.html",
"URL=http://10.40.1.10:8100/ebiz/view/product/selectProducts.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.40.1.10:8100/ebiz/#/sale/neworder/dealer",
"Snapshot=t166.inf",
"Mode=HTTP",
LAST);
/* web_reg_save_param("SubDescription",
"LB=\"AttrDesc\":\"",
"RB=\",",
"Ord=1",
LAST);*/
web_set_max_html_param_len("999999");
web_reg_save_param("code",
"LB={\"ProductCode\":\"",
"RB=\",",
"Ord=1",
LAST);
web_reg_save_param("price",
"LB=\"SalePrice\":",
"RB=,",
"Ord=1",
LAST);
web_reg_save_param("name",
"LB=\"Fullname\":\"",
"RB=\",",
"Ord=1",
LAST);
web_reg_save_param("check",
"LB=\"Code\":",
"RB=,",
LAST);
web_reg_save_param("errorinfo",
"LB={",
"RB=,\"Proposal\"",
LAST);
web_url("GetShelvesSkuList",
"URL=http://10.40.1.10:8100/site/Product/GetShelvesSkuList?CurPage=1&FullName=&MarketingDealerOrgId={dealerid}&PageSize=10&ProductCode=",
"Resource=1",
"RecContentType=application/json",
"Referer=http://10.40.1.10:8100/ebiz/#/sale/neworder/dealer",
"Snapshot=t167.inf",
LAST);
web_url("neworder.info.html",
"URL=http://10.40.1.10:8100/ebiz/view/sale/neworder.info.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.40.1.10:8100/ebiz/#/sale/neworder/products?type=3&OrgId={dealerid}",
"Snapshot=t168.inf",
"Mode=HTTP",
LAST);
web_url("Get",
"URL=http://10.40.1.10:8100/site/SystemSetting/Get",
"Resource=1",
"RecContentType=application/json",
"Referer=http://10.40.1.10:8100/ebiz/#/sale/neworder/products?type=3&OrgId={dealerid}",
"Snapshot=t169.inf",
LAST);
web_url("GetSettingInfo",
"URL=http://10.40.1.10:8100/site/SystemSetting/GetSettingInfo?SupplierOrgId=",
"Resource=1",
"RecContentType=application/json",
"Referer=http://10.40.1.10:8100/ebiz/#/sale/neworder/products?type=3&OrgId={dealerid}",
"Snapshot=t170.inf",
LAST);
web_custom_request("SubmitOrder",
"URL=http://10.40.1.10:8100/site/Sales/SubmitOrder",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://10.40.1.10:8100/ebiz/#/sale/neworder/info",
"Snapshot=t174.inf",
"Mode=HTTP",
"EncType=application/json;charset=utf-8",
//"Body={\"DealerOrgId\":\"{dealerid}\",\"DealerOrgName\":\"{dealername}\",\"SupplierOrgType\":0,\"DealerOrgType\":2,\"Remark\":\"\",\"ShipmentAddress\":\"\",\"isCredit\":false,\"isEntrust\":false,\"BillId\":\"\",\"TotalValue\":12.35,\"SettlementTotalValue\":\"12.35\",\"ProductData\":\"[{\\\"ID\\\":1,\\\"Price\\\":12.35,\\\"ProductCode\\\":\\\"1000021686\\\",\\\"ProductName\\\":\\\"TANG\\\",\\\"ProductSubCode\\\":\\\"006\\\",\\\"Quantity\\\":1,\\\"SettlementPrice\\\":12.35,\\\"UomCode\\\":\\\"00001\\"
//"\",\\\"UomName\\\":\\\"\\\\u4e2a\\\",\\\"SubDescription\\\":\\\"{SubDescription}\\\"}]\"}",
//"Body={\"DealerOrgId\":\"{dealerid}\",\"DealerOrgName\":\"{dealername}\",\"SupplierOrgType\":0,\"DealerOrgType\":2,\"Remark\":\"\",\"ShipmentAddress\":\"\",\"isCredit\":false,\"isEntrust\":false,\"BillId\":\"\",\"TotalValue\":12,\"SettlementTotalValue\":\"12.35\",\"ProductData\":\"[{\\\"ID\\\":1,\\\"Price\\\":{price},\\\"ProductCode\\\":\\\"{code}\\\",\\\"ProductName\\\":\\\"{name}\\\",\\\"ProductSubCode\\\":\\\"006\\\",\\\"Quantity\\\":1,\\\"SettlementPrice\\\":12.35,\\\"UomCode\\\":\\\"00001\\\",\\\"UomName\\\":\\\"\\\\u4e2a\\\",\\\"SubDescription\\\":\\\"{SubDescription}\\\"}]\"}",
"Body={\"DealerOrgId\":\"{dealerid}\",\"DealerOrgName\":\"{dealername}\",\"SupplierOrgType\":0,\"DealerOrgType\":2,\"Remark\":\"\",\"ShipmentAddress\":\"\",\"isCredit\":false,\"isEntrust\":false,\"BillId\":\"\",\"TotalValue\":12.35,\"SettlementTotalValue\":\"12.35\",\"ProductData\":\"[{\\\"ID\\\":1,\\\"Price\\\":{price},\\\"ProductCode\\\":\\\"code\\\",\\\"ProductName\\\":\\\"name\\\",\\\"ProductSubCode\\\":\\\"006\\\",\\\"Quantity\\\":1,\\\"SettlementPrice\\\":12.35,\\\"UomCode\\\":\\\"00001\\"
"\",\\\"UomName\\\":\\\"\\\\u4e2a\\\",\\\"SubDescription\\\":\\\"\\\"}]\"}",
LAST);
if(atoi(lr_eval_string("{check}"))==0)
lr_end_transaction("add_order", LR_PASS);
else
{
lr_error_message(lr_eval_string("{errorinfo}"));
lr_end_transaction("add_order", LR_FAIL);
}
return 0;
}
|
|