本文整理匯總了PHP中commonModel::checkRecordNumber方法的典型用法代碼示例。如果您正苦於以下問題:PHP commonModel::checkRecordNumber方法的具體用法?PHP commonModel::checkRecordNumber怎麽用?PHP commonModel::checkRecordNumber使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類commonModel
的用法示例。
在下文中一共展示了commonModel::checkRecordNumber方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: view_guoneiSaleImport
//.........這裏部分代碼省略.........
$orderData[$recordNumber]['orderData']['isFixed'] = 1;
}
}
}
}
foreach ($transportation as $tranValue) {
if ($tranValue['carrierNameCn'] == $carrierNameCn) {
$orderData[$recordNumber]['orderData']['transportId'] = $tranValue['id'];
break;
}
}
if ($trackNumber != '') {
$orderData[$recordNumber]['orderTrack']['tracknumber'] = $trackNumber;
$orderData[$recordNumber]['orderTrack']['addUser'] = $_SESSION['sysUserId'];
$orderData[$recordNumber]['orderTrack']['createdTime'] = time();
}
//order擴展信息
$orderData[$recordNumber]['orderExtenData']['currency'] = $currency;
$orderData[$recordNumber]['orderExtenData']['paymentStatus'] = "PAY_SUCCESS";
$orderData[$recordNumber]['orderExtenData']['transId'] = $recordNumber;
// 交易id;;
$orderData[$recordNumber]['orderExtenData']['PayPalPaymentId'] = $PayPalPaymentId;
$orderData[$recordNumber]['orderExtenData']['platformUsername'] = $platformUsername;
$orderData[$recordNumber]['orderExtenData']['currency'] = $currency;
//user信息
$orderData[$recordNumber]['orderUserInfoData']['platformUsername'] = $platformUsername;
$orderData[$recordNumber]['orderUserInfoData']['username'] = $username;
$orderData[$recordNumber]['orderUserInfoData']['email'] = $email;
$orderData[$recordNumber]['orderUserInfoData']['street'] = $street1;
$orderData[$recordNumber]['orderUserInfoData']['address2'] = ${$street2};
$orderData[$recordNumber]['orderUserInfoData']['currency'] = $currency;
//$orderData[$recordNumber]['orderUserInfoData']['address3'] = $address3;
$orderData[$recordNumber]['orderUserInfoData']['city'] = $city;
$orderData[$recordNumber]['orderUserInfoData']['state'] = $state;
$orderData[$recordNumber]['orderUserInfoData']['zipCode'] = $zipCode;
$orderData[$recordNumber]['orderUserInfoData']['countryName'] = $countryName;
$orderData[$recordNumber]['orderUserInfoData']['landline'] = $phone;
$orderData[$recordNumber]['orderUserInfoData']['phone'] = $phone;
//note信息
if (!empty($note)) {
$orderData[$recordNumber]['orderNote'][$c]['content'] = $note;
$orderData[$recordNumber]['orderNote'][$c]['userId'] = $_SESSION['sysUserId'];
}
}
//print_r($orderData);
//echo "<pre>";print_r($orderData);//exit;
$message = "";
foreach ($orderData as $id => $order) {
//echo $id;
//$msg = commonModel::checkOrder($id);
$msg = commonModel::checkRecordNumber($id, $platformId, $plataccountId);
if ($msg) {
$message .= "<font color='red'>訂單{$id}已存在!</font><br>";
continue;
}
//計算訂單屬性
if (count($order['orderDetail']) == 1) {
$detail = current($order['orderDetail']);
if ($detail['orderDetailData']['amount'] == 1) {
$orderData[id]['orderData']['orderAttribute'] = 1;
} else {
$orderData[id]['orderData']['orderAttribute'] = 2;
}
} else {
$orderData[id]['orderData']['orderAttribute'] = 3;
}
//計算訂單重量及包材
$obj_order_detail_data = array();
foreach ($order['orderDetail'] as $sku => $detail) {
$obj_order_detail_data[] = $detail['orderDetailData'];
}
$weightfee = commonModel::calcOrderWeight($obj_order_detail_data);
$orderData[$id]['orderData']['calcWeight'] = $weightfee[0];
//$orderData[$value[0]]['orderData']['calcShipping'] = $weightfee[3];
$orderData[$id]['orderData']['pmId'] = $weightfee[1];
//計算運費
$calcShippingInfo = CommonModel::calcAddOrderShippingFee($insertOrder, $orderData[$id]['orderData']['isFixed']);
//計算運費
$orderData[$id]['orderData']['channelId'] = $calcShippingInfo['fee']['channelId'];
//$orderData[$id]['orderData']['calcShipping'] = $calcShippingInfo['fee']['fee'];
//缺貨攔截
$orderData[$id] = AutoModel::auto_contrast_intercept($orderData[$id]);
/*$orderData[$id]['orderData']['orderStatus'] = $status['orderStatus'];
$orderData[$id]['orderData']['orderType'] = $status['orderType'];*/
//echo "<pre>";print_r($orderData[$id]);
//print_r($orderData);
//exit;
//插入訂單
$info = OrderAddModel::insertAllOrderRowNoEvent($orderData[$id]);
if ($info) {
$message .= "<font color='green'>訂單{$id}上傳成功!</font><br>";
} else {
$message .= "<font color='red'>訂單{$id}上傳失敗!</font><br>";
}
}
$this->smarty->assign("showerrorinfo", $message);
//header("location:index.php?mod=underLineOrderImport&act=importOrder");
}
$this->smarty->display('guoneiSaleImport.htm');
}