public static function insertOrderLog($omOrderId, $note) { !self::$dbConn ? self::initDB() : null; $data = array('operatorId' => $_SESSION['sysUserId'], 'omOrderId' => $omOrderId, 'note' => $note, 'createdTime' => time()); $string = array2sql($data); //var_dump($string); exit; $sql = "INSERT INTO `" . self::$orderLogTable . "` SET " . $string; //echo $sql; exit; $query = self::$dbConn->query($sql); if ($query) { self::$errCode = "200"; self::$errMsg = "插入成功"; return true; } else { self::$errCode = "001"; self::$errMsg = "获取数据失败"; return false; //失败则设置错误码和错误信息, 返回false } }
/*if(in_array($__ebayaccount, array('betterdeals255','keyhere','befdimall','doeon','charmday88','digitalzone88','enjoy24hours','sunwebhome','enicer','befashion','niceforu365','dealinthebox','sunwebzone','wellchange','360beauty','365digital','itshotsale77','befdi','elerose88','cafase88','niceinthebox','bestinthebox','starangle88','zealdora','choiceroad','voguebase55','dresslink','happydeal88','easytrade2099','easyshopping678','work4best','eshop2098','fiveseason88','easebon','estore2099','mysoulfor','newcandy789','estore456','eseasky68','infourseas','unicecho','vobeau','swzeagoo','easyshopping095','beromantic520','easydealhere','freemart21cn'))){ echo "EUB运输到美国{$order['ebay_carrier']}上传订单编号:".$order['ebay_id']."\n"; //$mark_res = update_order_shippingdetail_to_ebay($order['ebay_orderid'],$order['ebay_ordersn'],$order['ebay_id'],'other'); $mark_res = just_mark_order_shipped($order['ebay_orderid'],$order['ebay_ordersn']); }else*/ if (in_array($__ebayaccount, array('estore456'))) { echo "EUB运输到美国或者波多黎各{$carrier}上传订单编号:" . $omOrderId . "\n"; //$mark_res = update_order_shippingdetail_to_ebay($order['ebay_orderid'],$order['ebay_ordersn'],$order['ebay_id'],'other'); $mark_res = MarkShippingModel::just_mark_order_shipped($tran_datas); } else { echo "运输到美国上传订单编号:" . $omOrderId . "\n"; $mark_res = MarkShippingModel::just_mark_order_shipped($tran_datas); } } else { echo "标记eBay订单号:" . $omOrderId . "\n"; $mark_res = MarkShippingModel::just_mark_order_shipped($tran_datas); } } } if ($mark_res === true) { //标记成功 就删除队列 $returnStatus0 = array('ShippedTime' => time()); if (MarkShippingModel::pop_mark_shipping_order($omOrderId, $account)) { OrderindexModel::updateOrder($tableName, $returnStatus0, $where); } } echo "[" . date('Y-m-d H:i:s') . "]-----------{$handle_idx}/{$handle_cnt}--------done\n"; } $time_end = time(); echo "\t\t\t[耗时:" . ceil(($time_end - $time_start) / 60) . "分钟]\n"; echo "<=====[" . date('Y-m-d H:i:s', $time_end) . "]系统【结束】处理账号【 {$__ebayaccount} 】订单的只标发货====\n";
/** * OrderPushModel::listPushMessage() * 推送信息给仓库系统 * @return array */ public static function listPushOneMessage($orderDataInfo, $flag = 1, $exchange = 'send_order_exchange') { self::initDB(); $orderDataInfo['flag'] = $flag; //1发货单,0配货单 if (!$rabbitMQClass->queue_publish($exchange, $orderDataInfo)) { /*$sql = "UPDATE ".self::$table_order." SET orderStatus = ".C("STATESHIPPED").", orderType = ".C("STATESHIPPED_PRINTPEND")." WHERE id = {$orderDataInfo['orderData']['id']} "; if(!self::$dbConn->query($sql)){*/ self::$errCode = "0023"; self::$errMsg = "订单号推送失败!"; return false; //} } MarkShippingModel::insert_mark_shipping($orderDataInfo['orderData']['id']); self::$errCode = "200"; self::$errMsg = "订单号:{$omid} 申请打印成功!"; return true; }
} } } else { if ($tracknumber == '') { echo "trackno为空,跳过\n"; MarkShippingModel::update_order_shippedmarked_time($omOrderId); echo "[" . date('Y-m-d H:i:s') . "]-----------{$handle_idx}/{$handle_cnt}--------done\n"; continue; } if (preg_match('#^00#i', $tracknumber) && preg_match('#^\\d+$#i', $tracknumber)) { echo "此订单走中国小包平邮的非美国订单,trackno:{$tracknumber} 为伪号码,跳过\n"; MarkShippingModel::update_order_shippedmarked_time($omOrderId); echo "[" . date('Y-m-d H:i:s') . "]-----------{$handle_idx}/{$handle_cnt}--------done\n"; continue; } } if (MarkShippingModel::update_order_shippingdetail_to_ebay($tran_datas)) { MarkShippingModel::update_order_shippedmarked_time($omOrderId); echo "[" . date('Y-m-d H:i:s') . "]-----------{$handle_idx}/{$handle_cnt}--------done\n"; } else { echo "[" . date('Y-m-d H:i:s') . "]-----------{$handle_idx}/{$handle_cnt}--------false\n"; } /*if(strpos($combineOrder, '##')!==false){ MarkShippingModel::update_order_shippingdetail_to_ebay('',$omOrderId,$tracknumber,$carrier); }else{ MarkShippingModel::update_order_shippingdetail_to_ebay($orderId,$omOrderId,$tracknumber,$carrier); }*/ } $time_end = time(); echo "\t\t\t[耗时:" . ceil(($time_end - $time_start) / 60) . "分钟]\n"; echo "<=====[" . date('Y-m-d H:i:s', $time_end) . "]系统【结束】处理账号【 {$__ebayaccount} 】订单 上传发货信息====\n";