public static function addLucene($data) { try { $oLucene = new Model_House_HzPropLuceneUpdated(); return $oLucene->save(); } catch (Exception $e) { return 0; } }
public static function luceneUpdate($cityId, $propId, $propPlanStatus, $type) { switch ($type) { case 1: // 定价赠 $flag = 1; break; case 2: // 定价减 $flag = isset($propPlanStatus['bid']['isValid']) && $propPlanStatus['bid']['isValid'] == 1 ? 1 : 2; break; case 3: // 定价、竞价减 $flag = 2; break; case 4: // 竞价赠 $flag = 1; break; case 5: // 竞价减 $flag = isset($info['fix']['isValid']) && $info['fix']['isValid'] == 1 ? 1 : 2; break; } $data = array('cityid' => $cityId, 'type' => 2, 'proid' => $propId, 'flag' => $flag, 'updated' => time()); Model_House_HzPropLuceneUpdated::addLucene($data); }