public static function addPricingQueue($brokerId, $data) { if (!is_array($data) || empty($data)) { return 0; } unset($data['updateTime']); try { $oQueue = Model_Queue_Pricing::data_access(self::getTableSplitSuffix($brokerId))->force_master(); $oQueue->set_field('brokerId', $brokerId); foreach ($data as $field => $value) { $oQueue->set_field($field, $value); } if ($oQueue->insert() == 0) { return 0; } return $oQueue->connection->lastInsertId(); } catch (Exception $e) { return 0; } }
public function savePricingQueue($brokerId, $cityId, $propId, $flag, $hpStartTime, $hpPlanId) { $data = array('cityId' => $cityId, 'propId' => $propId, 'flag' => $flag, 'fromType' => 106, 'hpStartTime' => $hpStartTime, 'hpEndTime' => 0, 'hpPlanId' => $hpPlanId); return Model_Queue_Pricing::addPricingQueue($brokerId, $data); }