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.
188 lines
3.3 KiB
188 lines
3.3 KiB
8 months ago
|
<?php
|
||
|
/**
|
||
|
* 苏宁开放平台接口 -
|
||
|
*
|
||
|
* @author suning
|
||
|
* @date 2020-11-17
|
||
|
*/
|
||
|
class PriceforcartQueryRequest extends SuningRequest{
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
private $address;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
private $city;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
private $cmmdtyInfo;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
private $county;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
private $province;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
private $shopId;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
private $village;
|
||
|
|
||
|
public function getAddress() {
|
||
|
return $this->address;
|
||
|
}
|
||
|
|
||
|
public function setAddress($address) {
|
||
|
$this->address = $address;
|
||
|
$this->apiParams["address"] = $address;
|
||
|
}
|
||
|
|
||
|
public function getCity() {
|
||
|
return $this->city;
|
||
|
}
|
||
|
|
||
|
public function setCity($city) {
|
||
|
$this->city = $city;
|
||
|
$this->apiParams["city"] = $city;
|
||
|
}
|
||
|
|
||
|
public function getCmmdtyInfo() {
|
||
|
return $this->cmmdtyInfo;
|
||
|
}
|
||
|
|
||
|
public function setCmmdtyInfo($cmmdtyInfo) {
|
||
|
$this->cmmdtyInfo = $cmmdtyInfo;
|
||
|
$arr = array();
|
||
|
foreach ($cmmdtyInfo as $temp){
|
||
|
array_push($arr,$temp->getApiParams());
|
||
|
}
|
||
|
$this->apiParams["cmmdtyInfo"] = $arr;
|
||
|
}
|
||
|
|
||
|
public function getCounty() {
|
||
|
return $this->county;
|
||
|
}
|
||
|
|
||
|
public function setCounty($county) {
|
||
|
$this->county = $county;
|
||
|
$this->apiParams["county"] = $county;
|
||
|
}
|
||
|
|
||
|
public function getProvince() {
|
||
|
return $this->province;
|
||
|
}
|
||
|
|
||
|
public function setProvince($province) {
|
||
|
$this->province = $province;
|
||
|
$this->apiParams["province"] = $province;
|
||
|
}
|
||
|
|
||
|
public function getShopId() {
|
||
|
return $this->shopId;
|
||
|
}
|
||
|
|
||
|
public function setShopId($shopId) {
|
||
|
$this->shopId = $shopId;
|
||
|
$this->apiParams["shopId"] = $shopId;
|
||
|
}
|
||
|
|
||
|
public function getVillage() {
|
||
|
return $this->village;
|
||
|
}
|
||
|
|
||
|
public function setVillage($village) {
|
||
|
$this->village = $village;
|
||
|
$this->apiParams["village"] = $village;
|
||
|
}
|
||
|
|
||
|
public function getApiMethodName(){
|
||
|
return 'suning.enable.priceforcart.query';
|
||
|
}
|
||
|
|
||
|
public function getApiParams(){
|
||
|
return $this->apiParams;
|
||
|
}
|
||
|
|
||
|
public function check(){
|
||
|
//非空校验
|
||
|
RequestCheckUtil::checkNotNull($this->city, 'city');
|
||
|
RequestCheckUtil::checkNotNull($this->county, 'county');
|
||
|
RequestCheckUtil::checkNotNull($this->province, 'province');
|
||
|
RequestCheckUtil::checkNotNull($this->shopId, 'shopId');
|
||
|
}
|
||
|
|
||
|
public function getBizName(){
|
||
|
return "queryPriceforcart";
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
class CmmdtyInfo {
|
||
|
|
||
|
private $apiParams = array();
|
||
|
|
||
|
private $cmmdtyCode;
|
||
|
|
||
|
private $itemId;
|
||
|
|
||
|
private $saleNum;
|
||
|
|
||
|
private $supplierCode;
|
||
|
|
||
|
public function getCmmdtyCode() {
|
||
|
return $this->cmmdtyCode;
|
||
|
}
|
||
|
|
||
|
public function setCmmdtyCode($cmmdtyCode) {
|
||
|
$this->cmmdtyCode = $cmmdtyCode;
|
||
|
$this->apiParams["cmmdtyCode"] = $cmmdtyCode;
|
||
|
}
|
||
|
|
||
|
public function getItemId() {
|
||
|
return $this->itemId;
|
||
|
}
|
||
|
|
||
|
public function setItemId($itemId) {
|
||
|
$this->itemId = $itemId;
|
||
|
$this->apiParams["itemId"] = $itemId;
|
||
|
}
|
||
|
|
||
|
public function getSaleNum() {
|
||
|
return $this->saleNum;
|
||
|
}
|
||
|
|
||
|
public function setSaleNum($saleNum) {
|
||
|
$this->saleNum = $saleNum;
|
||
|
$this->apiParams["saleNum"] = $saleNum;
|
||
|
}
|
||
|
|
||
|
public function getSupplierCode() {
|
||
|
return $this->supplierCode;
|
||
|
}
|
||
|
|
||
|
public function setSupplierCode($supplierCode) {
|
||
|
$this->supplierCode = $supplierCode;
|
||
|
$this->apiParams["supplierCode"] = $supplierCode;
|
||
|
}
|
||
|
|
||
|
public function getApiParams(){
|
||
|
return $this->apiParams;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
?>
|