本文整理汇总了PHP中CommonModel::getCarrierListById方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonModel::getCarrierListById方法的具体用法?PHP CommonModel::getCarrierListById怎么用?PHP CommonModel::getCarrierListById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommonModel
的用法示例。
在下文中一共展示了CommonModel::getCarrierListById方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: auto_contrast_intercept
public static function auto_contrast_intercept($orderData)
{
global $SYSTEM_ACCOUNTS, $__liquid_items_fenmocsku, $__liquid_items_BuiltinBattery, $__liquid_items_SuperSpecific, $__liquid_items_Paste;
global $GLOBAL_EBAY_ACCOUNT;
global $express_delivery, $no_express_delivery;
if (!$SYSTEM_ACCOUNTS) {
$__liquid_items_array = PurchaseAPIModel::getAdjustransportFromPurchase();
//var_dump($__liquid_items_array);
//echo time(); echo "<br>";
$__liquid_items_postbyhkpost = array_filter(explode(",", $__liquid_items_array['液体产品']));
//液体产品
$__liquid_items_postbyfedex = array_filter(explode(",", $__liquid_items_array['贵重产品']));
//贵重物品走联邦
$__liquid_items_cptohkpost = array_filter(explode(",", $__liquid_items_array['指甲油产品']));
//指甲油转香港小包
$__liquid_items_elecsku = array_filter(explode(",", $__liquid_items_array['电子类产品']));
//电子类产品走香港小包
//$__elecsku_countrycn_array = array_filter(explode(",", $__liquid_items_array['']));//电子类产品指定国家
$__liquid_items_fenmocsku = array_filter(explode(",", $__liquid_items_array['粉末状产品']));
//粉末状SKU
$__liquid_items_BuiltinBattery = array_filter(explode(",", $__liquid_items_array['内置电池产品']));
//内置电池类产品
$__liquid_items_SuperSpecific = array('6471', '14995');
//超规格的产品,长度大于60cm, 三边大于 90cm
$__liquid_items_Paste = array_filter(explode(",", $__liquid_items_array['膏状产品']));
//膏状SKU*/
$__liquid_items_elecWithoutBattery = array_filter(explode(",", $__liquid_items_array['电子类【不带电池】']));
//电子类【不带电池】*/
$__liquid_items_OutWeight = array_filter(explode(",", $__liquid_items_array['超重产品>=1.9kg']));
//超重产品>=1.9kg*/
//取统一包装材料重量数据
//$MaterInfo = CommonModel::getMaterInfo();
//取统一国家中文名对应英文名
/*$ec = "select * from ebay_countrys where ebay_user='$user' ";
$result = $dbConn->execute($ec);
$ebay_country_lists = $dbConn->getResultArray($result);
$global_countrycn_coutryen = array();
foreach($ebay_country_lists AS $ebay_country_list){
$global_countrycn_coutryen[trim($ebay_country_list['countryen'])] = trim($ebay_country_list['countrycn']);
}*/
//取各个平台的账号名称
$SYSTEM_ACCOUNTS = OmAvailableModel::getPlatformAccount();
//echo "<pre>";print_r($SYSTEM_ACCOUNTS);
$express_delivery = array();
$express_delivery_value = array();
$no_express_delivery = array();
$no_express_delivery_value = array();
$express_delivery_value = CommonModel::getCarrierListById(1);
/*foreach($express_delivery_arr as $value){
$express_delivery_value[$value['id']] = $value['carrierNameCn'];
}*/
$express_delivery = array_keys($express_delivery_value);
//var_dump($express_delivery);
$no_express_delivery_value = CommonModel::getCarrierListById(0);
/*foreach($no_express_delivery_arr as $value){
$no_express_delivery_value[$value['id']] = $value['carrierNameCn'];
}*/
$no_express_delivery = array_keys($no_express_delivery_value);
}
if (!$GLOBAL_EBAY_ACCOUNT) {
$GLOBAL_EBAY_ACCOUNT = array();
foreach ($SYSTEM_ACCOUNTS as $acct) {
foreach ($acct as $key => $value) {
$GLOBAL_EBAY_ACCOUNT[$key] = $value;
}
}
}
//var_dump($GLOBAL_EBAY_ACCOUNT);exit;
self::initDB();
//var_dump($orderData); echo "\n";
$log_data = "";
$actualTotal0 = 0;
//该订单实际总数
//$ebay_id = $orderData['orderData']['id'];
$orderStatus = empty($orderData['orderData']['orderStatus']) ? C('STATEPENDING') : $orderData['orderData']['orderStatus'];
$orderType = empty($orderData['orderData']['orderType']) ? C('STATEPENDING_CONV') : $orderData['orderData']['orderType'];
$returnStatus = array('orderStatus' => $orderStatus, 'orderType' => $orderType);
$isNote = $orderData['orderData']['isNote'];
if ($isNote) {
$orderType = C('STATEPENDING_MSG');
}
$calcWeight = $orderData['orderData']['calcWeight'];
$pmId = $orderData['orderData']['pmId'];
//var_dump($calcWeight); echo "\n";
$orderdetaillist = $orderData['orderDetail'];
if (empty($calcWeight)) {
$calcInfo = CommonModel::calcAddOrderWeight($orderdetaillist);
//计算重量和包材
$calcWeight = $calcInfo[0];
$pmId = $calcInfo[1];
$orderData['orderData']['calcWeight'] = $calcWeight;
$orderData['orderData']['pmId'] = $pmId;
}
//var_dump($calcWeight); echo "\n";
$transportId = @$orderData['orderData']['transportId'];
$countryName = $orderData['orderUserInfoData']['countryName'];
$accountId = $orderData['orderData']['accountId'];
$actualTotal = $orderData['orderData']['actualTotal'];
$ebay_username = $orderData['orderUserInfoData']['username'];
$orderDataid = $orderData['orderExtenData']['orderId'];
//.........这里部分代码省略.........
示例2: C
AND ebay_tracknumber!=''
AND ebay_carrier!=''
AND ebay_account = '".$account."'
AND ebay_site = '".$site."'";// limit 0,7";*/
/*$order_sql = " select a.omOrderId
from om_unshipped_order_warehouse as a
where (a.weighTime BETWEEN $start AND $end)
and a.storeId = 1 ";
$order_db = $dbConn->query($order_sql);
$orders = $dbConn->fetch_array_all($order_db);
//var_dump($orders); echo "\n"; exit;
$handle_cnt=count($orders);
if($handle_cnt<=0 ){
exit("No order to handel\n");
}*/
$delivery_arr = CommonModel::getCarrierListById();
$order_sql = "select a.id,a.recordNumber,a.transportId,a.combinePackage,a.orderStatus \n\t\t\t\tfrom om_shipped_order as a \n\t\t\t\tleft join om_shipped_order_warehouse as b\n\t\t\t\ton a.id = b.omOrderId\n\t\t\t\tleft join om_shipped_order_extension_amazon as c\n\t\t\t\ton a.id = c.omOrderId\n\t\t\t\twhere a.accountId = '{$accountId}'\n\t\t\t\tand\tc.site = '{$site}'\n\t\t\t\tand a.orderStatus ='" . C("STATESHIPPED") . "'\n\t\t\t\tand a.orderType ='" . C("STATEHASSHIPPED_CONV") . "'\n\t\t\t\tand (b.weighTime BETWEEN {$start} AND {$end}) and (a.ShippedTime ='' or a.ShippedTime is null) \n\t\t\t\tORDER BY b.weighTime ";
$order_db = $dbConn->query($order_sql);
$orders = $dbConn->fetch_array_all($order_db);
/*$order_sql = " select ebay_orderid,ebay_account,ebay_ordersn,ebay_countryname,
ebay_id,ebay_tracknumber,ebay_carrier,ebay_combine,recordnumber
from ebay_order where recordnumber in(
'002-8137713-8318634',
'115-9924496-2629023',
'107-8620600-1710651',
'109-4445248-2697864',
'112-8959307-6029052',
'112-8141525-2093001')
";*/
//$order_db = $dbcon->execute($order_sql);
示例3: C
$order_sql = "select id,recordNumber,transportId,combinePackage,orderStatus \n\t\t\t\tfrom om_shipped_order as a \n\t\t\t\tleft join om_shipped_order_warehouse as b \n\t\t\t\ton a.id = b.omOrderId\n\t\t\t\twhere a.accountId = '{$accountId}' \n\t\t\t\tand a.orderStatus ='" . C("STATESHIPPED") . "'\n\t\t\t\tand a.orderType = '" . C("STATEHASSHIPPED_CONV") . "' \n\t\t\t\tand b.weighTime > {$start} and (a.ShippedTime ='' or a.ShippedTime is null) \n\t\t\t\tORDER BY b.weighTime ";
// and ebay_status ='2'
//$testsql = " ORDER BY scantime"; $sql .= $testsql; // for test
/*$order_sql = " select a.omOrderId
from om_unshipped_order_warehouse as a
where (a.weighTime BETWEEN $start AND $end)
and a.storeId = 1 ";*/
//echo $order_sql;exit;
$order_db = $dbConn->query($order_sql);
$alldata = $dbConn->fetch_array_all($order_db);
//var_dump($alldata); echo "\n"; exit;
$sum = sizeof($alldata);
if ($sum <= 0) {
exit("No order to handel\n");
}
$transportData = CommonModel::getCarrierListById();
if ($sum > 0) {
foreach ($alldata as $val) {
$omOrderId = $val['id'];
$transportId = $val['transportId'];
$carrier = $delivery_arr[$transportId];
echo "开始上传订单【{$omOrderId}】 ----------运输方式={$carrier}------\n\n";
$recordnumber = $val['recordNumber'];
//$ebay_carrier = $val['transportId'];
/*$where = " where id = {$omOrderId} and storeId = 1 and is_delete = 0 ";
$orderList = OrderindexModel::showOrderList($tableName, $where);
$orderTracknumber = $orderList[$omOrderId]['orderTracknumber'];*/
$orderList = is_array($omOrderId) ? implode(',', $omOrderId) : $omOrderId;
$orderTracknumber = getTracknumber($orderList);
//获取订单的跟踪号
if (empty($orderTracknumber)) {
示例4: array_filter
//电子类【不带电池】*/
$__liquid_items_OutWeight = array_filter(explode(",", $__liquid_items_array['超重产品>=1.9kg']));
//超重产品>=1.9kg*/
//取统一包装材料重量数据
//$MaterInfo = CommonModel::getMaterInfo();
//取统一国家中文名对应英文名
/*$ec = "select * from ebay_countrys where ebay_user='$user' ";
$result = $dbConn->execute($ec);
$ebay_country_lists = $dbConn->getResultArray($result);
$global_countrycn_coutryen = array();
foreach($ebay_country_lists AS $ebay_country_list){
$global_countrycn_coutryen[trim($ebay_country_list['countryen'])] = trim($ebay_country_list['countrycn']);
}*/
//取各个平台的账号名称
$SYSTEM_ACCOUNTS = OmAvailableModel::getPlatformAccount();
//echo "<pre>";print_r($SYSTEM_ACCOUNTS);
$express_delivery = array();
$express_delivery_value = array();
$no_express_delivery = array();
$no_express_delivery_value = array();
$express_delivery_value = CommonModel::getCarrierListById(1);
/*foreach($express_delivery_arr as $value){
$express_delivery_value[$value['id']] = $value['carrierNameCn'];
}*/
$express_delivery = array_keys($express_delivery_value);
//var_dump($express_delivery);
$no_express_delivery_value = CommonModel::getCarrierListById(0);
/*foreach($no_express_delivery_arr as $value){
$no_express_delivery_value[$value['id']] = $value['carrierNameCn'];
}*/
$no_express_delivery = array_keys($no_express_delivery_value);
示例5: define
define("WEB_PATH", "/data/web/order.valsun.cn/");
}
//define('SCRIPTS_PATH_CRONTAB', '/data/web/erpNew/order.valsun.cn/crontab/');
require_once WEB_PATH . "crontab/scripts.comm.php";
require_once WEB_PATH_CONF_SCRIPTS . "script.ebay.config.php";
require_once WEB_PATH_LIB_SDK_DRESSLINK . "DLCommenScript.php";
//require_once "/data/web/erpNew/order.valsun.DL/lib/sdk/DL/DLCommenScript.php";
echo "调用DL订单接口,时间" . date("Y-m-d H:i:s") . "\r\n";
$orders = getDLOrders();
$orders = json_decode($orders, true);
//print_r($orders);
if (!$orders) {
echo "没有获取订单信息!\n";
exit;
}
$carrierList = CommonModel::getCarrierListById();
$flip_carrierList = array_flip($carrierList);
$orderids = $orders['OrderID'];
//print_r($orderids);
/*if(file_exists(WEB_PATH."crontab/dresslink/orderid.txt")&&!empty($orderids)){
$fp = fopen(WEB_PATH."crontab/dresslink/orderid.txt","a+");
$str = "******************".date("Y-m-d H:i:s")."*******************\r\n\r\n\r\n";
foreach($orderids as $id){
$str .= ",".$id;
}
$str .= "\r\n#############################################################";
fwrite($fp,$str);
fclose($fp);
}*/
if (empty($orderids)) {
//$orderids = array('DL100000204','DL100000398','DL100000407','DL100000411','DL100000420','DL100000422');
示例6: act_fetchOrder
public function act_fetchOrder()
{
$message = "";
$accountId = isset($_POST['amazon_account']) ? $_POST['amazon_account'] : "";
$account = OmAvailableModel::getTNameList("om_account", "*", " where id={$accountId}");
$account = $account[0]['account'];
$recordNumber = isset($_POST['amazon_id']) ? $_POST['amazon_id'] : "";
$amazon_account = isset($_POST['amazon_account']) ? $_POST['amazon_account'] : "";
$site = isset($_POST['site']) ? $_POST['site'] : "";
$recordNumbers = explode(",", $recordNumber);
//print_r($recordNumbers);
//$rids = empty($_GET['rids']) ? array() : array_map('trim', explode(',', $_GET['rids']));
$rids = array_values(array_unique(array_filter(array_map('trim', $recordNumbers))));
if (!defined('WEB_PATH')) {
define("WEB_PATH", "/data/web/order.valsun.cn/");
}
//define('SCRIPTS_PATH_CRONTAB', '/data/web/erpNew/order.valsun.cn/crontab/');
require_once WEB_PATH . "crontab/scripts.comm.php";
require_once WEB_PATH_CONF_SCRIPTS . "script.ebay.config.php";
require_once WEB_PATH_LIB_SCRIPTS_AMAZON . "amazon_order_func.php";
if (strtoupper($site) == "US") {
$keyname = WEB_PATH_CONF_SCRIPTS_KEYS_AMAZON . "amazon_keys_{$account}.php";
} elseif (strtoupper($site) == "UK" || strtoupper($site) == "DE") {
$ext = strtolower($site);
$keyname = WEB_PATH_CONF_SCRIPTS_KEYS_AMAZON . "amazon_keys_{$ext}_{$account}.php";
}
//echo $keyname;
if (file_exists($keyname)) {
include_once $keyname;
} else {
//exit ("未找对应的key文件!\n");
$message .= "<font color='red'>未找对应的key文件</font>";
}
define('APPLICATION_NAME', $APPLICATION_NAME);
define('APPLICATION_VERSION', $APPLICATION_VERSION);
define('AWS_ACCESS_KEY_ID', $AWS_ACCESS_KEY_ID);
define('AWS_SECRET_ACCESS_KEY', $AWS_SECRET_ACCESS_KEY);
define('MERCHANT_ID', $MERCHANT_ID);
define('MARKETPLACE_ID', $MARKETPLACE_ID);
//echo "\n".get_include_path()."\n";
set_include_path(get_include_path() . PATH_SEPARATOR . WEB_PATH_LIB_SDK_AMAZON);
//
//echo "\n".get_include_path()."\n";
//
/*function __autoload($className){
$filePath = str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
$includePaths = explode('/', get_include_path());
foreach($includePaths as $includePath){
if(file_exists($includePath . DIRECTORY_SEPARATOR . $filePath)){
require_once $filePath;
return;
}
}
}*/
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Client.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Interface.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Exception.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Model/GetOrderRequest.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Model/OrderIdList.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Model/ListOrdersRequest.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Model/MarketplaceIdList.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Model/ListOrderItemsRequest.php';
$config = array('ServiceURL' => $serviceUrl, 'ProxyHost' => null, 'ProxyPort' => -1, 'MaxErrorRetry' => 3);
$minute = 100;
$start = date("Y-m-d H:i:s", time() - $minute * 60);
//$order_statistics = new OrderStatistics();
$service = new MarketplaceWebServiceOrders_Client(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, APPLICATION_NAME, APPLICATION_VERSION, $config);
$request = new MarketplaceWebServiceOrders_Model_GetOrderRequest();
$request->setSellerId(MERCHANT_ID);
//$request->setCreatedAfter(new DateTime($start, new DateTimeZone('UTC')));
//$request->setCreatedBefore(new DateTime('2012-08-03 12:00:00', new DateTimeZone('UTC')));
//$request->setMarketplaceId($marketplaceIdList);
//由account得出其accountId
/*$tName = 'om_account';
$select = 'id';
$where = "WHERE account='$account' AND platformId=11"; //亚马孙平台id为11
$accountIdList = OmAvailableModel :: getTNameList($tName, $select, $where);
if (empty ($accountIdList)) {
exit ("$account is not in om_account!\n");
}
$accountId = $accountIdList[0]['id'];*/
$transportList = CommonModel::getCarrierListById();
$flip_transportList = array_flip($transportList);
//var_dump($flip_transportList); exit;
$orderIds = new MarketplaceWebServiceOrders_Model_OrderIdList();
//echo "<pre>"; print_r($rids);
$orderIds->setId($rids);
$request->setAmazonOrderId($orderIds);
$info = self::act_invokeListOrders($service, $request, $account, $site, $accountId, $flip_transportList, $message);
return $info;
}
示例7: array
}
} else {
echo "notice: no data, exit\n";
exit;
}
//$TaobaoAct = new TaobaoAct();
//查询快递信息
/*$checkcarrier = array();
$carrierlists = CommonModel::getCarrierList();
//var_dump($carrierlists); exit;
if($carrierlists){
foreach($carrierlists AS $carrierlist){
$checkcarrier[] = "{$carrierlist['carrierNameCn']}";
}
}*/
$checkcarrier = CommonModel::getCarrierListById();
$flip_checkcarrier = array_flip($checkcarrier);
//var_dump($flip_checkcarrier); exit;
$total = 0;
//总订单条数
$error_data = array();
for ($cur_page = 1; $cur_page <= 1; $cur_page++) {
if ($cur_page > 1) {
$json_data = taobaoTradesSoldGet($url, $session, $appSecret, $appKey, $status, $cur_page, $page_size);
}
//出错处理
if (isset($json_data['error_response'])) {
echo "error: " . $json_data['error_response']['msg'] . " error code:" . $json_data['error_response']['code'] . "\n";
} else {
//数据入库
$data = $json_data['trades_sold_get_response']['trades']['trade'];