本文整理汇总了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');
}