本文整理汇总了PHP中OmAvailableModel::replaceTNameRow2arr方法的典型用法代码示例。如果您正苦于以下问题:PHP OmAvailableModel::replaceTNameRow2arr方法的具体用法?PHP OmAvailableModel::replaceTNameRow2arr怎么用?PHP OmAvailableModel::replaceTNameRow2arr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OmAvailableModel
的用法示例。
在下文中一共展示了OmAvailableModel::replaceTNameRow2arr方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if (!empty($taker)) {
echo "领取人 is {$taker}\n";
$queryConditions = array('userName' => $taker);
$queryConditions = json_encode($queryConditions);
$userInfo = Auth::getApiGlobalUser($queryConditions);
$userInfo = json_decode($userInfo, true);
//print_r($userInfo);
//echo "\n";
$personId = $userInfo[0]['userId'];
echo "领取人Id is '{$personId}'\n";
$pcProductsArr['productsTakerId'] = $personId;
}
if (!empty($completer)) {
echo "制作完成人 is {$completer}\n";
$queryConditions = array('userName' => $completer);
$queryConditions = json_encode($queryConditions);
$userInfo = Auth::getApiGlobalUser($queryConditions);
$userInfo = json_decode($userInfo, true);
//print_r($userInfo);
//echo "\n";
$personId = $userInfo[0]['userId'];
echo "制作完成人Id is '{$personId}'\n";
$pcProductsArr['productsCompleterId'] = $personId;
}
$pcProductsArr['productsComfirmTime'] = $value['comfirmtime'];
$pcProductsArr['productsTakeTime'] = $value['taketime'];
$pcProductsArr['productsCompleteTime'] = $value['completetime'];
$tName = 'pc_products';
OmAvailableModel::replaceTNameRow2arr($tName, $pcProductsArr);
}
}
示例2:
//if($countIsExist == 0){
// $affectRow = OmAvailableModel::addTNameRow($tName, $set);
// echo "{$pcGoodsArr['sku']} insert success!\n";
// }
// else{
// if(!empty($pcGoodsArr['goodsCategory']) && !empty($pcGoodsArr['purchaseId'])){
// $set = "SET goodsCategory='{$pcGoodsArr['goodsCategory']}',purchaseId='{$pcGoodsArr['purchaseId']}',goodsStatus='{$pcGoodsArr['goodsStatus']}',isNew='{$pcGoodsArr['isNew']}'";
// $where = "WHERE sku='{$pcGoodsArr['sku']}'";
// OmAvailableModel::updateTNameRow($tName, $set, $where);
// echo "{$pcGoodsArr['sku']} update category,purchaseId,goodsStatus {$pcGoodsArr['goodsCategory']},{$pcGoodsArr['purchaseId']},{$pcGoodsArr['goodsStatus']} success!\n";
// }else{
// echo "{$pcGoodsArr['sku']} not update category,purchaseId,because its empty!\n";
// }
//
// }
OmAvailableModel::replaceTNameRow2arr($tName, $pcGoodsArr);
//if($affectRow){
$partnerId = $value['factory'] ? $value['factory'] : 0;
$tName = 'pc_goods_partner_relation';
$set = "SET sku='{$pcGoodsArr['sku']}',partnerId='{$partnerId}'";
OmAvailableModel::addTNameRow($tName, $set);
//插入sku,供应商关系表
echo "{$pcGoodsArr['sku']} {$partnerId} insert relation success!\n";
if (!empty($value['goods_hgbm'])) {
//海关编码不为空时,插入sku,海关编码关系表
$tName = 'pc_sku_hscode';
$where = "WHERE sku='{$value['goods_sn']}' AND hsCode='{$value['goods_hgbm']}'";
$countHscode = OmAvailableModel::getTNameCount($tName, $where);
if ($countHscode) {
echo "hscode {$value['goods_sn']} {$value['goods_hgbm']} had exist\n";
//continue;
示例3: array
$ioStoreId = OmAvailableModel::replaceTNameRow2arr($tName, $iostoreArr);
if (!$ioStoreId) {
continue;
}
$ioStoreDetailList = UserCacheModel::getOpenSysApi('pc.erp.getEbayProductIostoreDetailCrontab', array('io_ordersn' => $value['io_ordersn']), 'gw88');
//print_r($ioStoreDetailList);
// exit;
$countStoreDetail = count($ioStoreDetailList);
echo "{$value['io_ordersn']} 一共有 {$countStoreDetail} 条详细记录\n";
foreach ($ioStoreDetailList as $valueDetail) {
$iostoreDetailArr = array();
$iostoreDetailArr['id'] = $valueDetail['id'];
$iostoreDetailArr['iostoreId'] = $ioStoreId;
$iostoreDetailArr['iostoreTypeId'] = $iostoreArr['iostoreTypeId'];
$iostoreDetailArr['useTypeId'] = $iostoreArr['useTypeId'];
$iostoreDetailArr['sku'] = $valueDetail['goods_sn'];
if (intval($iostoreArr['addUserId']) > 0) {
$iostoreDetailArr['addUserId'] = $iostoreArr['addUserId'];
$iostoreDetailArr['addTime'] = $iostoreArr['createdTime'];
}
$iostoreDetailArr['iostoreStatus'] = 2;
if (!empty($iostoreArr['isAudit'])) {
$iostoreDetailArr['isAudit'] = $iostoreArr['isAudit'];
}
if (!empty($iostoreArr['isComfirm'])) {
$iostoreDetailArr['isComfirm'] = $iostoreArr['isComfirm'];
}
$tName = 'pc_products_iostore_detail';
OmAvailableModel::replaceTNameRow2arr($tName, $iostoreDetailArr);
}
}
示例4: act_updateOmAccount
function act_updateOmAccount()
{
require_once WEB_PATH . "api/include/functions.php";
$paramArr = array('method' => 'order.erp.cronOmAccount', 'format' => 'json', 'v' => '1.0', 'username' => 'purchase', 'all' => "all");
$result = callOpenSystem($paramArr, '88');
$data = json_decode($result, true);
if (is_array($data) && !empty($data)) {
foreach ($data as $value) {
OmAvailableModel::replaceTNameRow2arr('om_account', $value);
}
echo 'success';
} else {
echo 'false';
}
exit;
}
示例5: updateOmAccount
/**
* 同步旧系统的账号表到新系统(按照 id replace),并也会replace旧系统的om_account表(oldErp)
* @return array
* @author zqt
*/
public function updateOmAccount()
{
$conf = $this->getRequestConf(__FUNCTION__);
if (empty($conf)) {
return false;
}
$result = callOpenSystem($conf);
$data = json_decode($result, true);
if (is_array($data) && !empty($data)) {
foreach ($data as $value) {
OmAvailableModel::replaceTNameRow2arr('om_account', $value);
}
echo 'success';
} else {
echo 'false';
}
exit;
}