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.
108 lines
1.8 KiB
108 lines
1.8 KiB
8 months ago
|
<?php
|
||
|
/**
|
||
|
* 苏宁开放平台接口 -
|
||
|
*
|
||
|
* @author suning
|
||
|
* @date 2019-12-12
|
||
|
*/
|
||
|
class InventoryGetRequest extends SuningRequest{
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
private $cityId;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
private $countyId;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
private $skuIds;
|
||
|
|
||
|
public function getCityId() {
|
||
|
return $this->cityId;
|
||
|
}
|
||
|
|
||
|
public function setCityId($cityId) {
|
||
|
$this->cityId = $cityId;
|
||
|
$this->apiParams["cityId"] = $cityId;
|
||
|
}
|
||
|
|
||
|
public function getCountyId() {
|
||
|
return $this->countyId;
|
||
|
}
|
||
|
|
||
|
public function setCountyId($countyId) {
|
||
|
$this->countyId = $countyId;
|
||
|
$this->apiParams["countyId"] = $countyId;
|
||
|
}
|
||
|
|
||
|
public function getSkuIds() {
|
||
|
return $this->skuIds;
|
||
|
}
|
||
|
|
||
|
public function setSkuIds($skuIds) {
|
||
|
$this->skuIds = $skuIds;
|
||
|
$arr = array();
|
||
|
foreach ($skuIds as $temp){
|
||
|
array_push($arr,$temp->getApiParams());
|
||
|
}
|
||
|
$this->apiParams["skuIds"] = $arr;
|
||
|
}
|
||
|
|
||
|
public function getApiMethodName(){
|
||
|
return 'suning.govbus.inventory.get';
|
||
|
}
|
||
|
|
||
|
public function getApiParams(){
|
||
|
return $this->apiParams;
|
||
|
}
|
||
|
|
||
|
public function check(){
|
||
|
//非空校验
|
||
|
RequestCheckUtil::checkNotNull($this->cityId, 'cityId');
|
||
|
RequestCheckUtil::checkNotNull($this->countyId, 'countyId');
|
||
|
}
|
||
|
|
||
|
public function getBizName(){
|
||
|
return "getInventory";
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
class SkuIds {
|
||
|
|
||
|
private $apiParams = array();
|
||
|
|
||
|
private $num;
|
||
|
|
||
|
private $skuId;
|
||
|
|
||
|
public function getNum() {
|
||
|
return $this->num;
|
||
|
}
|
||
|
|
||
|
public function setNum($num) {
|
||
|
$this->num = $num;
|
||
|
$this->apiParams["num"] = $num;
|
||
|
}
|
||
|
|
||
|
public function getSkuId() {
|
||
|
return $this->skuId;
|
||
|
}
|
||
|
|
||
|
public function setSkuId($skuId) {
|
||
|
$this->skuId = $skuId;
|
||
|
$this->apiParams["skuId"] = $skuId;
|
||
|
}
|
||
|
|
||
|
public function getApiParams(){
|
||
|
return $this->apiParams;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
?>
|