Files
OMS/app/inventorydepth/lib/service/shop/skus.php
2025-12-28 23:13:25 +08:00

50 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
/**
* 店铺SKU,RPC调用类
*
* @author chenping<chenping@shopex.cn>
*/
class inventorydepth_service_shop_skus {
public function __construct($app)
{
$this->app = $app;
}
/**
* 下载货品
*
* @param Array $sku
* $sku = array(
* 'sku_id' => {SKU的ID}
* 'iid' => {商品ID}
* 'seller_uname' => {卖家帐号}
* );
* @param String $shop_id 店铺ID
* @param String $errormsg 错误信息
* @return void
* @author
**/
public function item_sku_get($sku,$shop_id,&$errormsg)
{
$result = kernel::single('inventorydepth_rpc_request_shop_skus')->item_sku_get($sku,$shop_id);
if ($result === false) {
$errormsg = $this->app->_('请求失败:数据错误或请求超时');
return false;
} elseif ($result->rsp !== 'succ') {
$errormsg = $this->app->_('请求失败:'.$result->err_msg);
return false;
}
return json_decode($result->data,true);
}
}