# 多采商城登录信息
"username": "BJ0621"
"password": "Aa123456"

#后台运营管理系统登录信息(子公司)
"username1": "Admin00111"
"password1": "Aa123456"

#后台运营管理系统登录信息(总公司)
"username2": "Admin"
"password2": "Aa123456"

json_headers: {
  "Content-Type": "application/json",
  "Cmdc_access_token": "%s"
}
#商品列表接口地址
"url": "/product/mall/queryProductInfoByPage"


#购物车列表接口地址
"url1": "/product/mall/queryTotalBuyerCartList"

#测试场景：获取用户对应的购物车列表信息
json_headers1: {
  "Cmdc_access_token": "%s",
  "Sourcetype": "mall"
}

"payload1": {"productName":"","materialCode":"","manufacturer":"","licenseCode":"","timeSortStatus":0,"pageSize":100,"pageStart":1}
#预期结果
checkDict1: {"success":true,"code":"200","message":"OK"}



#购物车新增商品接口地址
"url2": "/product/mall/addBuyerCart"

#测试场景：增加新的商品至购物车
json_headers2: {
  "Cmdc_access_token": "%s",
  "Sourcetype": "mall"
}
#查询已上架商品列表接口地址
"url20": "/product/mall/queryProductInfoByPage"
#查询已上架商品列表请求报文
"payload20": {"isFbList":0,"filialeCode":null,"productName":null,"productCode":null,"specifications":null,"materialCode":null,"manufacturer":null,"lineName":null,"riskRank":null,"isRelease":"1","isExistImage":null,"jdeStatus":"P","isGift":"0","description":null,"tbsj":[],"pageNum":1,"pageSize":8,"total":453,"firstQuery":true,"flag":true,"preInvalidStatus":null,"isControlSales":"0","startTime":null,"endTime":null,"status":101}
#添加商品至购物车报文
"payload2": {"currentCompanyId":null,"productId":"%d","quantity":1,"agreementPriceId":null,"price":"%d","filialeCode":"%s"}
#预期结果
checkDict2: {"success":true,"code":"200","message":"OK","data":"ok"}


#测试场景：增加新的不存在的商品至购物车
json_headers4: {
  "Cmdc_access_token": "%s",
  "Sourcetype": "mall"
}

"payload4": {"currentCompanyId":2,"productId":1114654363453453532,"quantity":1,"agreementPriceId":0,"price":12,"filialeCode":"00102"}
#预期结果
checkDict4: {"success":false,"code":"1078","message":"该商品不存在，加入购物车失败","data":null,"freshToken":null}

#测试场景：增加已失效商品至购物车
json_headers5: {
  "Cmdc_access_token": "%s",
  "Sourcetype": "mall"
}
#查询已失效商品列表接口地址
"url50": "/product/mall/queryProductByJdeStatus"
#查询已失效商品列表请求报文
"payload50": {"isFbList":0,"filialeCode":null,"productName":null,"productCode":null,"specifications":null,"materialCode":null,"manufacturer":null,"lineName":null,"riskRank":null,"isRelease":null,"isExistImage":null,"jdeStatus":null,"isGift":null,"description":null,"tbsj":[],"pageNum":1,"pageSize":8,"total":28,"firstQuery":true,"flag":true,"preInvalidStatus":null,"isControlSales":null,"startTime":null,"endTime":null,"status":102}
#增加已失效商品至购物车报文
"payload5": {"currentCompanyId":null,"productId":"%d","quantity":1,"agreementPriceId":null,"price":"%d","filialeCode":"%s"}
#预期结果
checkDict5: {"success":false,"code":"addBuyerCartFail","message":"商品为失效状态，不可加入购物车","data":null,"freshToken":null}


#测试场景：增加控销商品至购物车
json_headers7: {
  "Cmdc_access_token": "%s",
  "Sourcetype": "mall"
}
#查询控销商品列表接口地址
"url70": "/product/mall/queryProductInfoByPage"
#查询已控销商品列表请求报文
"payload70": {"isFbList":0,"filialeCode":null,"productName":null,"productCode":null,"specifications":null,"materialCode":null,"manufacturer":null,"lineName":null,"riskRank":null,"isRelease":null,"isExistImage":null,"jdeStatus":null,"isGift":null,"description":null,"tbsj":[],"pageNum":1,"pageSize":8,"total":28,"firstQuery":true,"flag":true,"preInvalidStatus":null,"isControlSales":null,"startTime":null,"endTime":null,"status":102}
#增加控销商品至购物车报文
"payload7": {"currentCompanyId":null,"productId":"%d","quantity":1,"agreementPriceId":null,"price":"%d","filialeCode":"%s"}
#预期结果
checkDict7: {"success":false,"code":"addBuyerCartFail","message":"商品为控销商品，不可加入购物车","data":null,"freshToken":null}

#测试场景：添加JDE已停用商品至购物车
json_headers10: {
  "Cmdc_access_token": "%s",
  "Sourcetype": "mall"
}
#查询已上架商品列表接口地址
"url100": "/product/mall/queryProductInfoByPage"
#查询JDE已停用商品列表请求报文
"payload100": {"isFbList":0,"filialeCode":null,"productName":null,"productCode":null,"specifications":null,"materialCode":null,"manufacturer":null,"lineName":null,"riskRank":null,"isRelease":null,"isExistImage":null,"jdeStatus":"O","isGift":null,"description":null,"tbsj":[],"pageNum":1,"pageSize":8,"total":121,"firstQuery":true,"flag":true,"preInvalidStatus":null,"isControlSales":"","startTime":null,"endTime":null,"status":101}
#添加JDE已停用商品至购物车报文
"payload10": {"currentCompanyId":null,"productId":"%d","quantity":1,"agreementPriceId":null,"price":"%d","filialeCode":"%s"}
#预期结果
checkDict10: {"success":false,"code":"addBuyerCartFail","message":"商品为失效状态，不可加入购物车","data":null,"freshToken":null}


#测试场景：增加赠品至购物车
json_headers8: {
  "Cmdc_access_token": "%s",
  "Sourcetype": "mall"
}

#查询已上架商品列表接口地址
"url80": "/product/mall/queryProductInfoByPage"
#查询赠品请求报文
"payload80": {"isFbList":0,"filialeCode":null,"productName":null,"productCode":null,"specifications":null,"materialCode":null,"manufacturer":null,"lineName":"","riskRank":null,"isRelease":"1","isExistImage":null,"jdeStatus":"P","isGift":"1","description":null,"tbsj":[],"pageNum":1,"pageSize":8,"total":21,"firstQuery":true,"flag":true,"preInvalidStatus":null,"isControlSales":"0","sdOutStorage":"","startTime":null,"endTime":null,"status":101}
#添加赠品至购物车报文
"payload8": {"currentCompanyId":null,"productId":"%d","quantity":1,"agreementPriceId":null,"price":"%d","filialeCode":"%s"}
#预期结果
checkDict8: {"success":true,"code":"200","message":"OK","data":"ok"}




#测试场景：增加赠品且控销商品至购物车
json_headers11: {
  "Cmdc_access_token": "%s",
  "Sourcetype": "mall"
}

#查询已上架商品列表接口地址
"url110": "/product/mall/queryProductInfoByPage"
#查询赠品请求报文
"payload110": {"isFbList":0,"filialeCode":null,"productName":null,"productCode":null,"specifications":null,"materialCode":null,"manufacturer":null,"lineName":"","riskRank":null,"isRelease":"1","isExistImage":null,"jdeStatus":"P","isGift":"1","description":null,"tbsj":[],"pageNum":1,"pageSize":8,"total":6,"firstQuery":true,"flag":true,"preInvalidStatus":null,"isControlSales":"1","sdOutStorage":"","startTime":null,"endTime":null,"status":101}
#添加赠品至购物车报文
"payload11": {"currentCompanyId":null,"productId":"%d","quantity":1,"agreementPriceId":null,"price":"%d","filialeCode":"%s"}
#预期结果
checkDict11: {"success":false,"code":"addBuyerCartFail","message":"商品为控销商品，不可加入购物车","data":null,"freshToken":null}





#测试场景：增加跨站点商品至购物车
json_headers9: {
  "Cmdc_access_token": "%s",
  "Sourcetype": "mall"
}

"payload9": {"currentCompanyId":2,"productId":1114654363453453532,"quantity":1,"agreementPriceId":0,"price":12,"filialeCode":"00102"}
#预期结果
checkDict9: {"success":false,"code":"1078","message":"该商品不存在，加入购物车失败","data":null,"freshToken":null}





#购物车商品删除接口地址
"url3": "/product/mall/removeBuyerCart"

#测试场景：从用户购物车列表删除已添加的商品
json_headers3: {
  "Cmdc_access_token": "%s",
  "Sourcetype": "mall"
}

"payload3": {"buyerCartIdList":["%s"]}
#预期结果
checkDict3: {"success":true,"code":"200","message":"OK","data":"ok"}


#新增跨站点商品至购物车
"payload300": {"currentCompanyId":6,"productId":7892,"quantity":1,"agreementPriceId":0,"price":1879,"filialeCode":"00111"}
"payload301": {"currentCompanyId":3,"productId":25769,"quantity":1,"agreementPriceId":0,"price":69,"filialeCode":"00103"}

#预期结果
checkDict300: {"success":true,"code":"200","message":"OK","data":"ok"}



#调整购物车中商品数量
"url83": "/product/mall/modifyBuyerCartQuantity"
"payload83": {"buyerCartId":"%s","modifyQuantity":"%s","subtotal":100}
#根据商品名称查询购物列表列表报文
"payload81": {"productName":"%s","materialCode":"","manufacturer":"","licenseCode":"","timeSortStatus":0,"pageSize":100,"pageStart":1}
#预期结果
checkDict80: {"success":true,"code":"200","message":"OK","data":"ok"}
checkDict81: {"quantity":"%s"}
checkDict82: {"quantity":"%s"}



#通过Excel复制添加商品
#查询用户站点信息
"url_user_websites": "/user/mall/queryWebsites"

#切换站点
"url_switch_website": "/user/mall/switchWebsite"
"payload_switch_website": {"companyId":"%d","companyCode":"00102"}

#查询站点对应的商品
"url_website_product": "/product/mall/queryPcProductInfoByPage"
"payload_website_product": {"filterConditions":[],"ranking":"","searchName":"","pageNum":1,"pageSize":40,"orderBy":"","orderByType":""}
"payload_website_product1": {"searchName":"气动植皮刀"}

#通过Excel复制添加商品接口地址
"url_batch": "/product/mall/batchAddBuyerCart"
#测试场景一：添加失败
"payload21": {"currentCompanyId":"","buyerCartList":[{"productCode":"%s","materialCode":"","quantity":"1"}],"excelCopySort":0,"companyId":7}
#预期结果
checkDict21: {"success":false,"code":"200","message":"商品添加完毕，本次添加商品【1】条，成功【0】条，失败【1】条：\n第1行，该商品不存在!","data":[],"freshToken":null}

#测试场景二：必填字段缺失
"payload22": {"currentCompanyId":"","buyerCartList":[{"quantity":"1"}],"excelCopySort":0,"companyId":3}
#预期结果
checkDict22: {"success":false,"code":"200","message":"商品添加完毕，本次添加商品【1】条，成功【0】条，失败【1】条：\n第1行，产品编码或物料编码为空!","data":[],"freshToken":null}

#测试场景三：子站点不存在
"payload24": {"currentCompanyId":"","buyerCartList":[{"productCode":"10231310","materialCode":"","quantity":"1"}],"excelCopySort":0,"companyId":"%d"}
#预期结果
checkDict24: {"success":false,"code":"999","message":"找不到该公司的首营信息","data":null,"freshToken":null}

#测试场景四：添加商品成功
"payload23": {"currentCompanyId":"","buyerCartList":[{"productCode":"%s","materialCode":"","quantity":"1"}],"excelCopySort":0,"companyId":"%s"}
#预期结果
checkDict23: {"success":False,"code":"200","message":"商品添加完毕，本次添加商品【1】条，成功【1】条，失败【0】条。"}
