Files
OMS/app/dchain/lib/autotask/mappingproduct.php
2025-12-28 23:13:25 +08:00

47 lines
1.1 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.
*/
class dchain_autotask_mappingproduct
{
/**
* 请求同步翱象商品关系
* @param $params
* @param $error_msg
* @return bool
*/
public function process($params, &$error_msg='')
{
$axInventoryLib = kernel::single('dchain_inventorydepth');
//params
$shop_id = $params['shop_id'];
$shop_bn = $params['shop_bn'];
$task_page = $params['task_page'];
$product_type = $params['product_type'];
$product_bns = json_decode($params['product_bns'], true);
//check
if(empty($shop_id) || empty($product_bns)){
return true;
}
if(!is_array($product_bns)){
return true;
}
//sdfdata
$sdfdata = array(
'shop_id' => $shop_id,
'product_bns' => $product_bns,
);
//推送平台商品关系
$result = $axInventoryLib->reqeustMappingProduct($sdfdata);
return true;
}
}