Commit 9926fa2b authored by liuqiao's avatar liuqiao

Merge branch 'master' into feature-lq-04

parents fad9b05c bf84ad7e
...@@ -846,7 +846,7 @@ if(!function_exists('sendsms')) ...@@ -846,7 +846,7 @@ if(!function_exists('sendsms'))
{ {
function sendsms($mobile,$msg){ function sendsms($mobile,$msg){
global $conf_city; global $conf_city;
curl_get_contents("http://mysms.house365.com:81/index.php/Interface/apiSendMobil/jid/7/depart/3/city/".$conf_city."/mobileno/".$mobile."/?msg=".urlencode($msg)); curl_get_contents("http://mysms.house365.com/index.php/Interface/apiSendMobil/jid/7/depart/3/city/".$conf_city."/mobileno/".$mobile."/?msg=".urlencode($msg));
} }
} }
......
...@@ -860,7 +860,7 @@ if(!function_exists('sendsms')) ...@@ -860,7 +860,7 @@ if(!function_exists('sendsms'))
{ {
function sendsms($mobile,$msg){ function sendsms($mobile,$msg){
global $conf_city; global $conf_city;
curl_get_contents("http://mysms.house365.com:81/index.php/Interface/apiSendMobil/jid/7/depart/3/city/".$conf_city."/mobileno/".$mobile."/?msg=".urlencode($msg)); curl_get_contents("http://mysms.house365.com/index.php/Interface/apiSendMobil/jid/7/depart/3/city/".$conf_city."/mobileno/".$mobile."/?msg=".urlencode($msg));
} }
} }
......
<?php <?php
/** /**
* 竞投结束后的处理 * ��Ͷ������Ĵ���
* 1,on表数据移动到history表 * 1��on�������ƶ���history��
* 2,对竞投成功的,扣除积分,且解冻相应积分 * 2���Ծ�Ͷ�ɹ��ģ��۳����֣��ҽⶳ��Ӧ����
* 3, 加成长 * 3, �ӳɳ�ֵ
* 4,对竞投成功的,刷成功表 * 4���Ծ�Ͷ�ɹ��ģ�ˢ�ɹ���
* @param int $periodsId 期次id * @param int $periodsId �ڴ�id
* @param string $type house 或者 blockExpert * @param string $type house ���� blockExpert
*/ */
function bidFinishHandle($periodsId,$type) { function bidFinishHandle($periodsId,$type) {
$growthRecordOn = GrowthBidRecordFactory::getRecordOnClass($type); $growthRecordOn = GrowthBidRecordFactory::getRecordOnClass($type);
...@@ -37,19 +37,19 @@ function bidFinishHandle($periodsId,$type) { ...@@ -37,19 +37,19 @@ function bidFinishHandle($periodsId,$type) {
} }
$inserTemp[] = $temp; $inserTemp[] = $temp;
if ($bidNum == $j) { if ($bidNum == $j) {
GrowthLog::log('始刷'.$growthRecordHistory->getTable(),''); GrowthLog::log('��ʼˢ'.$growthRecordHistory->getTable(),'');
$affectedLineNumber = $growthRecordHistory->insertMutl($inserTemp); $affectedLineNumber = $growthRecordHistory->insertMutl($inserTemp);
GrowthLog::log('结束'.$growthRecordHistory->getTable().'共'.$affectedLineNumber.'条数据', $inserTemp); GrowthLog::log('����'.$growthRecordHistory->getTable().'��'.$affectedLineNumber.'������', $inserTemp);
$inserTemp = array(); $inserTemp = array();
} }
if($temp['status']==1) {//暂时保存成功的数据 if($temp['status']==1) {//��ʱ����ɹ�������
$bidSuccessData[] = $temp; $bidSuccessData[] = $temp;
} }
} }
$runCount += $affectedLineNumber; $runCount += $affectedLineNumber;
//更新前4名的status //����ǰ4����status
/* /*
array_unique($bidIds);//去重复 array_unique($bidIds);//ȥ�ظ�
if($bidIds) { if($bidIds) {
foreach ($bidIds as $bid) { foreach ($bidIds as $bid) {
$tableName = $growthRecordHistory->getTable(); $tableName = $growthRecordHistory->getTable();
...@@ -61,47 +61,47 @@ function bidFinishHandle($periodsId,$type) { ...@@ -61,47 +61,47 @@ function bidFinishHandle($periodsId,$type) {
} }
} }
if ($recordOnCount == $runCount) { if ($recordOnCount == $runCount) {
GrowthLog::log('成功,期次为'.$pid.'的所有竞投记录已刷到history表',array('total'=>$recordOnCount,'runcount'=>$runCount)); GrowthLog::log('�ɹ����ڴ�Ϊ'.$pid.'�����о�Ͷ��¼��ˢ��history��',array('total'=>$recordOnCount,'runcount'=>$runCount));
sendMessage('成功,期次为'.$pid.'的所有竞投记录已刷到history表'); sendMessage('�ɹ����ڴ�Ϊ'.$pid.'�����о�Ͷ��¼��ˢ��history��');
handleBidSuccessData($bidSuccessData,$type,$pid); handleBidSuccessData($bidSuccessData,$type,$pid);
echo 'success'; echo 'success';
return true; return true;
} else { } else {
GrowthLog::log('失败,期次为'.$pid.'的竞投记录未全部刷到history表',array('number'=>$recordOnCount,'runcount'=>$runCount)); GrowthLog::log(�ܣ��ڴ�Ϊ'.$pid.'�ľ�Ͷ��¼δȫ��ˢ��history��',array('number'=>$recordOnCount,'runcount'=>$runCount));
echo 'failture'; echo 'failture';
return false; return false;
} }
} }
/** /**
* 保存竞投成功记录;扣除积分,解冻积分;加成长 * ���澺Ͷ�ɹ���¼���۳����֣��ⶳ���֣��ӳɳ�ֵ
* @param type $bidSuccessData 竞投成功记 * @param type $bidSuccessData ��Ͷ�ɹ���¼
* @param type $type 竞投类型,小区专家或房源竞 * @param type $type ��Ͷ���ͣ�С��ר�һ�Դ��Ͷ
* @param type $pid 竞投期次id * @param type $pid ��Ͷ�ڴ�id
* @return null * @return null
*/ */
function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) { function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) {
//不是数组,或空数组 //�������飬�������
if(!is_array($bidSuccessData)||empty($bidSuccessData)) { if(!is_array($bidSuccessData)||empty($bidSuccessData)) {
return null; return null;
} }
//查找期次的推广时间 //�����ڴε��ƹ�ʱ��
$growthBidPeriods = new GrowthBidPeriods(); $growthBidPeriods = new GrowthBidPeriods();
//$cPeriods //$cPeriods
$cPeriods = $growthBidPeriods->findById($pid); $cPeriods = $growthBidPeriods->findById($pid);
$growthRecordFinish = GrowthBidRecordFactory::getRecordFinishClass($type);//new GrowthBidBlockExpertRecordHistory(); $growthRecordFinish = GrowthBidRecordFactory::getRecordFinishClass($type);//new GrowthBidBlockExpertRecordHistory();
//print_r($recordOn); //print_r($recordOn);
$wayBlock = new WayBlock(); $wayBlock = new WayBlock();
//房源竞投关键词 //��Դ��Ͷ�ؼ���
$growthBidHouse = new GrowthBidHouse(); $growthBidHouse = new GrowthBidHouse();
$block = new Block(); $block = new Block();
GrowthLog::log('开始刷竞投成功表,期次为'.$pid.'',array()); GrowthLog::log('��ʼˢ��Ͷ�ɹ����ڴ�Ϊ'.$pid.'',array());
foreach ($bidSuccessData as $temp) { foreach ($bidSuccessData as $temp) {
if($type=='blockExpert') {//如果是小区专家竞投 if($type=='blockExpert') {//�����С��ר�Ҿ�Ͷ
/*****************扣积分*****************/ /*****************�ۻ���*****************/
$blockId = $temp['block_id']; $blockId = $temp['block_id'];
$creditWay = $wayBlock->getBlockExpertWayAlias($blockId); $creditWay = $wayBlock->getBlockExpertWayAlias($blockId);
//刷成功记录表 //ˢ�ɹ���¼��
$tempBlock = array( $tempBlock = array(
'broker_id' => $temp['broker_id'], 'broker_id' => $temp['broker_id'],
'block_id' => $temp['block_id'], 'block_id' => $temp['block_id'],
...@@ -113,12 +113,12 @@ function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) { ...@@ -113,12 +113,12 @@ function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) {
); );
$insertId = $growthRecordFinish->insert($tempBlock); $insertId = $growthRecordFinish->insert($tempBlock);
if($insertId) { if($insertId) {
GrowthLog::log('成功,刷小区竞投id为'.$temp['bid_id'].'成功记录',$tempBlock); GrowthLog::log('�ɹ���ˢС����ͶidΪ'.$temp['bid_id'].'�ɹ���¼',$tempBlock);
} else { } else {
GrowthLog::log('失败,刷小区竞投id为'.$temp['bid_id'].'成功记录',$tempBlock); GrowthLog::log(�ܣ�ˢС����ͶidΪ'.$temp['bid_id'].'�ɹ���¼',$tempBlock);
} }
} }
if($type=='house') {//房源竞 if($type=='house') {//��Դ��Ͷ
$bidRow = $growthBidHouse->findById($temp['bid_id']); $bidRow = $growthBidHouse->findById($temp['bid_id']);
if ($temp['type'] == 1) { if ($temp['type'] == 1) {
$blockInfo = $block->findOneBy($bidRow['block_id']); $blockInfo = $block->findOneBy($bidRow['block_id']);
...@@ -140,9 +140,9 @@ function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) { ...@@ -140,9 +140,9 @@ function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) {
); );
$insertId = $growthRecordFinish->insert($tempHouse); $insertId = $growthRecordFinish->insert($tempHouse);
if($insertId) { if($insertId) {
GrowthLog::log('成功,刷房源竞投id为'.$temp['bid_id'].'成功记录',$tempHouse); GrowthLog::log('�ɹ���ˢ��Դ��ͶidΪ'.$temp['bid_id'].'�ɹ���¼',$tempHouse);
} else { } else {
GrowthLog::log('失败,刷房源竞投id为'.$temp['bid_id'].'成功记录',$tempHouse); GrowthLog::log(�ܣ�ˢ��Դ��ͶidΪ'.$temp['bid_id'].'�ɹ���¼',$tempHouse);
} }
} }
if(!$debug) { if(!$debug) {
...@@ -152,56 +152,56 @@ function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) { ...@@ -152,56 +152,56 @@ function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) {
$broker = array('id'=>$brokerId); $broker = array('id'=>$brokerId);
$brokerGroup = new BrokerGroup(); $brokerGroup = new BrokerGroup();
$brokerRow = $brokerGroup->getBrokerGroupInfo($brokerId); $brokerRow = $brokerGroup->getBrokerGroupInfo($brokerId);
if(!$brokerRow) {GrowthLog::log('经纪人'.$brokerId.'不存在'.$score,array());continue;} if(!$brokerRow) {GrowthLog::log('������'.$brokerId.'������'.$score,array());continue;}
$broker['groupid'] = $brokerRow['groupid']; $broker['groupid'] = $brokerRow['groupid'];
$growthBrokerCredit = new GrowthBrokerCredit($broker); $growthBrokerCredit = new GrowthBrokerCredit($broker);
$growthBrokerCredit->reduce($creditWay, $description, $score); $growthBrokerCredit->reduce($creditWay, $description, $score);
GrowthLog::log('扣除'.$brokerId.'的积分'.$score,array()); GrowthLog::log('�۳�'.$brokerId.'�Ļ���'.$score,array());
/*************扣完积分,解除冻结*****************/ /*************�������,�������*****************/
$growthBrokerCredit->frozenCredit("-".$score); $growthBrokerCredit->frozenCredit("-".$score);
GrowthLog::log('解除冻结'.$brokerId.'的积分'.$score,array()); GrowthLog::log('�������'.$brokerId.'�Ļ���'.$score,array());
/*************加成长值************************/ /*************�ӳɳ�ֵ************************/
$growthBrokerExp = new GrowthBrokerExp($broker); $growthBrokerExp = new GrowthBrokerExp($broker);
$growthBrokerExp->increase($creditWay, $description); $growthBrokerExp->increase($creditWay, $description);
GrowthLog::log('增加'.$brokerId.'的成长值'.$score,array()); GrowthLog::log('����'.$brokerId.'�ijɳ�ֵ'.$score,array());
} }
} }
sendMessage('结束刷竞投成功表,期次为'.$pid); sendMessage('����ˢ��Ͷ�ɹ����ڴ�Ϊ'.$pid);
GrowthLog::log('结束刷竞投成功表,期次为'.$pid.'',array()); GrowthLog::log('����ˢ��Ͷ�ɹ����ڴ�Ϊ'.$pid.'',array());
} }
/** /**
* 根据时间创建小区专家竞 * ����ʱ�䴴��С��ר�Ҿ�Ͷ
* @param type $startTime 竞投开始时间Y-m-d H:i:s格式的字符串,下 * @param type $startTime ��Ͷ��ʼʱ��Y-m-d H:i:s��ʽ���ַ�������ͬ
* @param type $endTime 竞投结束时间 * @param type $endTime ��Ͷ����ʱ��
* @param type $tgStartTime 推广开始时间 * @param type $tgStartTime �ƹ㿪ʼʱ��
* @param type $tgEndTime 推广结束时间 * @param type $tgEndTime �ƹ����ʱ��
*/ */
function createNextBidBlockExpert($startTime,$endTime,$tgStartTime,$tgEndTime) { function createNextBidBlockExpert($startTime,$endTime,$tgStartTime,$tgEndTime) {
$growthBidPeriods = new GrowthBidPeriods(); $growthBidPeriods = new GrowthBidPeriods();
$growthBid = new GrowthBidBlockExpert(); $growthBid = new GrowthBidBlockExpert();
//竞投小区专家期次 //��ͶС��ר���ڴ�
$fieldData = array( $fieldData = array(
'type' => 1, 'type' => 1,
'name' => '小区专家竞投', 'name' => ��ר�Ҿ�Ͷ',
'start_time'=>$startTime, 'start_time'=>$startTime,
'end_time'=>$endTime, 'end_time'=>$endTime,
'tg_start_time'=>$tgStartTime, 'tg_start_time'=>$tgStartTime,
'tg_end_time'=>$tgEndTime); 'tg_end_time'=>$tgEndTime);
$bidPeriodsId = $growthBidPeriods->insert($fieldData); $bidPeriodsId = $growthBidPeriods->insert($fieldData);
if($bidPeriodsId) { if($bidPeriodsId) {
echo "创建小区专家竞投期次,id=".$bidPeriodsId."。"."时间:".$fieldData['tg_start_time']."到".$fieldData['tg_end_time']; echo "����С��ר�Ҿ�Ͷ�ڴΣ�id=".$bidPeriodsId."��"."ʱ�䣺".$fieldData['tg_start_time']."��".$fieldData['tg_end_time'];
echo "<br/>"; echo "<br/>";
} else { } else {
echo "创建小区专家竞投期次,失败"; echo "����С��ר�Ҿ�Ͷ�ڴΣ�ʧ��";
} }
//小区id和等级 //С��id�͵ȼ�
$blockLevelHeat = new BlockLevelHeat(); $blockLevelHeat = new BlockLevelHeat();
$blocks = $blockLevelHeat->findAll(); $blocks = $blockLevelHeat->findAll();
//起拍积分,参与等级 //���Ļ��֣�����ȼ�
$growthBidStartSetting = new GrowthBidStartSetting(); $growthBidStartSetting = new GrowthBidStartSetting();
$data_info = $growthBidStartSetting->getData(); $data_info = $growthBidStartSetting->getData();
$data_info1 = array(); $data_info1 = array();
...@@ -222,47 +222,47 @@ function createNextBidBlockExpert($startTime,$endTime,$tgStartTime,$tgEndTime) { ...@@ -222,47 +222,47 @@ function createNextBidBlockExpert($startTime,$endTime,$tgStartTime,$tgEndTime) {
$temp['ctime'] = date("Y-m-d H:i:s"); $temp['ctime'] = date("Y-m-d H:i:s");
$inid = $growthBid->insert($temp); $inid = $growthBid->insert($temp);
if($inid) { if($inid) {
echo "创建小区竞投成功,id=".$inid."。小区id为".$value['id']; echo "����С����Ͷ�ɹ���id=".$inid."��С��idΪ".$value['id'];
} else { } else {
echo "失败,小区id为".$value['id']; echo �ܣ�С��idΪ".$value['id'];
} }
echo "<br/>"; echo "<br/>";
} }
} }
sendMessage('创建小区竞投成功'); sendMessage('����С����Ͷ�ɹ�');
} }
/** /**
* 根据时间创建房源竞 * ����ʱ�䴴����Դ��Ͷ
* @param type $startTime 竞投开始时间Y-m-d H:i:s格式的字符串,下 * @param type $startTime ��Ͷ��ʼʱ��Y-m-d H:i:s��ʽ���ַ�������ͬ
* @param type $endTime 竞投结束时间 * @param type $endTime ��Ͷ����ʱ��
* @param type $tgStartTime 推广开始时间 * @param type $tgStartTime �ƹ㿪ʼʱ��
* @param type $tgEndTime 推广结束时间 * @param type $tgEndTime �ƹ����ʱ��
*/ */
function createNextBidHouse($startTime,$endTime,$tgStartTime,$tgEndTime) { function createNextBidHouse($startTime,$endTime,$tgStartTime,$tgEndTime) {
$growthBidPeriods = new GrowthBidPeriods(); $growthBidPeriods = new GrowthBidPeriods();
$growthBid = new GrowthBidHouse(); $growthBid = new GrowthBidHouse();
//竞投小区词期次 //��ͶС�����ڴ�
$fieldData = array( $fieldData = array(
'type' => 2, 'type' => 2,
'name' => '房源竞投', 'name' => '��Դ��Ͷ',
'start_time'=>$startTime, 'start_time'=>$startTime,
'end_time'=>$endTime, 'end_time'=>$endTime,
'tg_start_time'=>$tgStartTime, 'tg_start_time'=>$tgStartTime,
'tg_end_time'=>$tgEndTime); 'tg_end_time'=>$tgEndTime);
$bidPeriodsId = $growthBidPeriods->insert($fieldData); $bidPeriodsId = $growthBidPeriods->insert($fieldData);
if($bidPeriodsId) { if($bidPeriodsId) {
echo "创建小区词竞投期次,id=".$bidPeriodsId."。"."时间:".$fieldData['tg_start_time']."到".$fieldData['tg_end_time']; echo "����С���ʾ�Ͷ�ڴΣ�id=".$bidPeriodsId."��"."ʱ�䣺".$fieldData['tg_start_time']."��".$fieldData['tg_end_time'];
echo "<br/>"; echo "<br/>";
} else { } else {
echo "创建小区词竞投期次,失败"; echo "����С���ʾ�Ͷ�ڴΣ�ʧ��";
} }
//小区id和等级 //С��id�͵ȼ�
$blockLevelHeat = new BlockLevelHeat(); $blockLevelHeat = new BlockLevelHeat();
$blocks = $blockLevelHeat->findAll(); $blocks = $blockLevelHeat->findAll();
//起拍积分,参与等级 //���Ļ��֣�����ȼ�
$growthBidStartSetting = new GrowthBidStartSetting(); $growthBidStartSetting = new GrowthBidStartSetting();
$data_info = $growthBidStartSetting->getData(); $data_info = $growthBidStartSetting->getData();
$data_info1 = array(); $data_info1 = array();
...@@ -283,15 +283,15 @@ function createNextBidHouse($startTime,$endTime,$tgStartTime,$tgEndTime) { ...@@ -283,15 +283,15 @@ function createNextBidHouse($startTime,$endTime,$tgStartTime,$tgEndTime) {
$temp['ctime'] = date("Y-m-d H:i:s"); $temp['ctime'] = date("Y-m-d H:i:s");
$inid = $growthBid->insert($temp); $inid = $growthBid->insert($temp);
if($inid) { if($inid) {
echo "创建小区词竞投成功,id=".$inid."。小区id为".$value['id']; echo "����С���ʾ�Ͷ�ɹ���id=".$inid."��С��idΪ".$value['id'];
} else { } else {
echo "失败,小区id为".$value['id']; echo �ܣ�С��idΪ".$value['id'];
} }
echo "<br/>"; echo "<br/>";
} }
} }
//热搜词 //���Ѵ�
$growBidHotSearchSet = new GrowthBidHotSearchSet(); $growBidHotSearchSet = new GrowthBidHotSearchSet();
$arrSearchWords = $growBidHotSearchSet->findWords(); $arrSearchWords = $growBidHotSearchSet->findWords();
if($arrSearchWords) { if($arrSearchWords) {
...@@ -307,18 +307,18 @@ function createNextBidHouse($startTime,$endTime,$tgStartTime,$tgEndTime) { ...@@ -307,18 +307,18 @@ function createNextBidHouse($startTime,$endTime,$tgStartTime,$tgEndTime) {
$temp['ctime'] = date("Y-m-d H:i:s"); $temp['ctime'] = date("Y-m-d H:i:s");
$inid = $growthBid->insert($temp); $inid = $growthBid->insert($temp);
if($inid) { if($inid) {
echo "创建热搜词竞投成功,id=".$inid."。热搜词为".$value['words']; echo "�������Ѵʾ�Ͷ�ɹ���id=".$inid."�����Ѵ�Ϊ".$value['words'];
} else { } else {
echo "失败,热搜词为".$value; echo �ܣ����Ѵ�Ϊ".$value;
} }
echo "<br/>"; echo "<br/>";
} }
} }
sendMessage('创建房源竞投成功'); sendMessage('������Դ��Ͷ�ɹ�');
} }
/** /**
* 更新竞投小区专家最低等级 * ���¾�ͶС��ר����͵ȼ�
*/ */
function updateBidBlockExpertLowLevel() { function updateBidBlockExpertLowLevel() {
$growthBidStartSetting = new GrowthBidStartSetting(); $growthBidStartSetting = new GrowthBidStartSetting();
...@@ -327,7 +327,7 @@ function updateBidBlockExpertLowLevel() { ...@@ -327,7 +327,7 @@ function updateBidBlockExpertLowLevel() {
$minBidBlockLevel = ''; $minBidBlockLevel = '';
$bidBlockLevels = ''; $bidBlockLevels = '';
foreach ($data_info as $key => $value) { foreach ($data_info as $key => $value) {
//subclass = 1 小区竞投 subclass 2 房源竞 //subclass = 1 С����Ͷ subclass 2 ��Դ��Ͷ
if ($value['subclass'] == 1) { if ($value['subclass'] == 1) {
$bidBlockLevels .= str_replace('LV', '', $value['levelnames']) . ','; $bidBlockLevels .= str_replace('LV', '', $value['levelnames']) . ',';
} }
...@@ -336,12 +336,12 @@ function updateBidBlockExpertLowLevel() { ...@@ -336,12 +336,12 @@ function updateBidBlockExpertLowLevel() {
$minBidBlockLevel = min(explode(',', $bidBlockLevels)); $minBidBlockLevel = min(explode(',', $bidBlockLevels));
$bolUpdateBlock = $growthBidLowLevel->updateBlockExpertLevel('LV' . $minBidBlockLevel); $bolUpdateBlock = $growthBidLowLevel->updateBlockExpertLevel('LV' . $minBidBlockLevel);
if ($bolUpdateBlock) { if ($bolUpdateBlock) {
echo '更新小区专家最低竞投等级成功'; echo '����С��ר����;�Ͷ�ȼ��ɹ�';
} }
} }
/** /**
* 更新竞投房源最低等级 * ���¾�Ͷ��Դ��͵ȼ�
*/ */
function updateBidHouseLowLevel() { function updateBidHouseLowLevel() {
$growthBidStartSetting = new GrowthBidStartSetting(); $growthBidStartSetting = new GrowthBidStartSetting();
...@@ -358,12 +358,12 @@ function updateBidHouseLowLevel() { ...@@ -358,12 +358,12 @@ function updateBidHouseLowLevel() {
$minBidHouseLevel = min(explode(',', $bidHouseLevels)); $minBidHouseLevel = min(explode(',', $bidHouseLevels));
$bolUpdateHouse = $growthBidLowLevel->updateHouseLevel('LV' . $minBidHouseLevel); $bolUpdateHouse = $growthBidLowLevel->updateHouseLevel('LV' . $minBidHouseLevel);
if ($bolUpdateHouse) { if ($bolUpdateHouse) {
echo '<br>更新房源最低竞投等级成功'; echo '<br>���·�Դ��;�Ͷ�ȼ��ɹ�';
} }
} }
/** /**
* 更新竞投房源中热搜词和小区词的相关等级 * ���¾�Ͷ��Դ�����Ѵʺ�С���ʵ���صȼ�
*/ */
function updateBidHouseLevel() { function updateBidHouseLevel() {
$growthBidStartSetting = new GrowthBidStartSetting(); $growthBidStartSetting = new GrowthBidStartSetting();
...@@ -383,15 +383,15 @@ function updateBidHouseLevel() { ...@@ -383,15 +383,15 @@ function updateBidHouseLevel() {
$updateBlockStatus = $growthBidHouseLevel->updateBlockLevel($bidHouseBlockLevel); $updateBlockStatus = $growthBidHouseLevel->updateBlockLevel($bidHouseBlockLevel);
$updateHotSearchStatus = $growthBidHouseLevel->updateHotSearchLevel($bidHouseHotSearchLevel); $updateHotSearchStatus = $growthBidHouseLevel->updateHotSearchLevel($bidHouseHotSearchLevel);
if($growthBidHouseLevel && $updateHotSearchStatus) { if($growthBidHouseLevel && $updateHotSearchStatus) {
echo '竞投房源所需要的等级成功'; echo '��Ͷ��Դ����Ҫ�ĵȼ��ɹ�';
} }
} }
} }
/** /**
* 返回几天后的日期 * ���ؼ���������
* @param type $date 日期,格式 Y-m-d H:i:s * @param type $date ���ڣ���ʽ Y-m-d H:i:s
* @param int $days 天数 * @param int $days ����
* @return type * @return type
*/ */
function getNextBidDateFromBidDate($date,$days){ function getNextBidDateFromBidDate($date,$days){
...@@ -399,7 +399,7 @@ function getNextBidDateFromBidDate($date,$days){ ...@@ -399,7 +399,7 @@ function getNextBidDateFromBidDate($date,$days){
} }
/** /**
* 保存执行过job的数据 * ����ִ�й�job������
* @global type $db_sys * @global type $db_sys
* @global type $city * @global type $city
* @param type $jobname * @param type $jobname
...@@ -418,7 +418,7 @@ function insertJobData($jobname, $msg) { ...@@ -418,7 +418,7 @@ function insertJobData($jobname, $msg) {
} }
/** /**
* 查找某个job是某已经执行成功 * ����ij��job��ij�Ѿ�ִ�гɹ�
* @global type $db_sys * @global type $db_sys
* @global type $city * @global type $city
* @param type $jobname * @param type $jobname
...@@ -433,15 +433,15 @@ function getJobState($jobname) { ...@@ -433,15 +433,15 @@ function getJobState($jobname) {
} }
//发送短信 //���Ͷ���
function sendMessage($msg) { function sendMessage($msg) {
$telno = array('13851894682', '18260082244'); $telno = array('13851894682', '18260082244');
foreach($telno as $v) { foreach($telno as $v) {
curl_get_contents("http://mysms.house365.com:81/index.php/Interface/apiSendMobil/jid/7/depart/3/city/nj/mobileno/".$v."/msg/".urlencode($msg)); curl_get_contents("http://mysms.house365.com/index.php/Interface/apiSendMobil/jid/7/depart/3/city/nj/mobileno/".$v."/msg/".urlencode($msg));
} }
} }
//http curl请求 //http curl����
if(!function_exists('curl_get_contents')) if(!function_exists('curl_get_contents'))
{ {
function curl_get_contents($str,$t_url="") function curl_get_contents($str,$t_url="")
......
<?php <?php
/** /**
* 竞投结束后的处理 * ��Ͷ������Ĵ���
* 1,on表数据移动到history表 * 1��on�������ƶ���history��
* 2,对竞投成功的,扣除积分,且解冻相应积分 * 2���Ծ�Ͷ�ɹ��ģ��۳����֣��ҽⶳ��Ӧ����
* 3, 加成长 * 3, �ӳɳ�ֵ
* 4,对竞投成功的,刷成功表 * 4���Ծ�Ͷ�ɹ��ģ�ˢ�ɹ���
* @param int $periodsId 期次id * @param int $periodsId �ڴ�id
* @param string $type house 或者 blockExpert * @param string $type house ���� blockExpert
*/ */
function bidFinishHandle($periodsId,$type) { function bidFinishHandle($periodsId,$type) {
$growthRecordOn = GrowthBidRecordFactory::getRecordOnClass($type); $growthRecordOn = GrowthBidRecordFactory::getRecordOnClass($type);
...@@ -37,19 +37,19 @@ function bidFinishHandle($periodsId,$type) { ...@@ -37,19 +37,19 @@ function bidFinishHandle($periodsId,$type) {
} }
$inserTemp[] = $temp; $inserTemp[] = $temp;
if ($bidNum == $j) { if ($bidNum == $j) {
GrowthLog::log('始刷'.$growthRecordHistory->getTable(),''); GrowthLog::log('��ʼˢ'.$growthRecordHistory->getTable(),'');
$affectedLineNumber = $growthRecordHistory->insertMutl($inserTemp); $affectedLineNumber = $growthRecordHistory->insertMutl($inserTemp);
GrowthLog::log('结束'.$growthRecordHistory->getTable().'共'.$affectedLineNumber.'条数据', $inserTemp); GrowthLog::log('����'.$growthRecordHistory->getTable().'��'.$affectedLineNumber.'������', $inserTemp);
$inserTemp = array(); $inserTemp = array();
} }
if($temp['status']==1) {//暂时保存成功的数据 if($temp['status']==1) {//��ʱ����ɹ�������
$bidSuccessData[] = $temp; $bidSuccessData[] = $temp;
} }
} }
$runCount += $affectedLineNumber; $runCount += $affectedLineNumber;
//更新前4名的status //����ǰ4����status
/* /*
array_unique($bidIds);//去重复 array_unique($bidIds);//ȥ�ظ�
if($bidIds) { if($bidIds) {
foreach ($bidIds as $bid) { foreach ($bidIds as $bid) {
$tableName = $growthRecordHistory->getTable(); $tableName = $growthRecordHistory->getTable();
...@@ -61,48 +61,48 @@ function bidFinishHandle($periodsId,$type) { ...@@ -61,48 +61,48 @@ function bidFinishHandle($periodsId,$type) {
} }
} }
if ($recordOnCount == $runCount) { if ($recordOnCount == $runCount) {
GrowthLog::log('成功,期次为'.$pid.'的所有竞投记录已刷到history表',array('total'=>$recordOnCount,'runcount'=>$runCount)); GrowthLog::log('�ɹ����ڴ�Ϊ'.$pid.'�����о�Ͷ��¼��ˢ��history��',array('total'=>$recordOnCount,'runcount'=>$runCount));
sendMessage('成功,期次为'.$pid.'的所有竞投记录已刷到history表'); sendMessage('�ɹ����ڴ�Ϊ'.$pid.'�����о�Ͷ��¼��ˢ��history��');
handleBidSuccessData($bidSuccessData,$type,$pid); handleBidSuccessData($bidSuccessData,$type,$pid);
echo 'success'; echo 'success';
return true; return true;
} else { } else {
GrowthLog::log('失败,期次为'.$pid.'的竞投记录未全部刷到history表',array('number'=>$recordOnCount,'runcount'=>$runCount)); GrowthLog::log(�ܣ��ڴ�Ϊ'.$pid.'�ľ�Ͷ��¼δȫ��ˢ��history��',array('number'=>$recordOnCount,'runcount'=>$runCount));
echo 'failture'; echo 'failture';
return false; return false;
} }
} }
/** /**
* 保存竞投成功记录;扣除积分,解冻积分;加成长 * ���澺Ͷ�ɹ���¼���۳����֣��ⶳ���֣��ӳɳ�ֵ
* @param type $bidSuccessData 竞投成功记 * @param type $bidSuccessData ��Ͷ�ɹ���¼
* @param type $type 竞投类型,小区专家或房源竞 * @param type $type ��Ͷ���ͣ�С��ר�һ�Դ��Ͷ
* @param type $pid 竞投期次id * @param type $pid ��Ͷ�ڴ�id
* @return null * @return null
*/ */
function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) { function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) {
//不是数组,或空数组 //�������飬�������
global $conf_cityflag; global $conf_cityflag;
if(!is_array($bidSuccessData)||empty($bidSuccessData)) { if(!is_array($bidSuccessData)||empty($bidSuccessData)) {
return null; return null;
} }
//查找期次的推广时间 //�����ڴε��ƹ�ʱ��
$growthBidPeriods = new GrowthBidPeriods(); $growthBidPeriods = new GrowthBidPeriods();
//$cPeriods //$cPeriods
$cPeriods = $growthBidPeriods->findById($pid); $cPeriods = $growthBidPeriods->findById($pid);
$growthRecordFinish = GrowthBidRecordFactory::getRecordFinishClass($type);//new GrowthBidBlockExpertRecordHistory(); $growthRecordFinish = GrowthBidRecordFactory::getRecordFinishClass($type);//new GrowthBidBlockExpertRecordHistory();
//print_r($recordOn); //print_r($recordOn);
$wayBlock = new WayBlock(); $wayBlock = new WayBlock();
//房源竞投关键词 //��Դ��Ͷ�ؼ���
$growthBidHouse = new GrowthBidHouse(); $growthBidHouse = new GrowthBidHouse();
$block = new Block(); $block = new Block();
GrowthLog::log('开始刷竞投成功表,期次为'.$pid.'',array()); GrowthLog::log('��ʼˢ��Ͷ�ɹ����ڴ�Ϊ'.$pid.'',array());
foreach ($bidSuccessData as $temp) { foreach ($bidSuccessData as $temp) {
if($type=='blockExpert') {//如果是小区专家竞投 if($type=='blockExpert') {//�����С��ר�Ҿ�Ͷ
/*****************扣积分*****************/ /*****************�ۻ���*****************/
$blockId = $temp['block_id']; $blockId = $temp['block_id'];
$creditWay = $wayBlock->getBlockExpertWayAlias($blockId); $creditWay = $wayBlock->getBlockExpertWayAlias($blockId);
//刷成功记录表 //ˢ�ɹ���¼��
$tempBlock = array( $tempBlock = array(
'broker_id' => $temp['broker_id'], 'broker_id' => $temp['broker_id'],
'block_id' => $temp['block_id'], 'block_id' => $temp['block_id'],
...@@ -114,12 +114,12 @@ function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) { ...@@ -114,12 +114,12 @@ function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) {
); );
$insertId = $growthRecordFinish->insert($tempBlock); $insertId = $growthRecordFinish->insert($tempBlock);
if($insertId) { if($insertId) {
GrowthLog::log('成功,刷小区竞投id为'.$temp['bid_id'].'成功记录',$tempBlock); GrowthLog::log('�ɹ���ˢС����ͶidΪ'.$temp['bid_id'].'�ɹ���¼',$tempBlock);
} else { } else {
GrowthLog::log('失败,刷小区竞投id为'.$temp['bid_id'].'成功记录',$tempBlock); GrowthLog::log(�ܣ�ˢС����ͶidΪ'.$temp['bid_id'].'�ɹ���¼',$tempBlock);
} }
} }
if($type=='house') {//房源竞 if($type=='house') {//��Դ��Ͷ
$bidRow = $growthBidHouse->findById($temp['bid_id']); $bidRow = $growthBidHouse->findById($temp['bid_id']);
if ($temp['type'] == 1) { if ($temp['type'] == 1) {
$blockInfo = $block->findOneBy($bidRow['block_id']); $blockInfo = $block->findOneBy($bidRow['block_id']);
...@@ -141,9 +141,9 @@ function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) { ...@@ -141,9 +141,9 @@ function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) {
); );
$insertId = $growthRecordFinish->insert($tempHouse); $insertId = $growthRecordFinish->insert($tempHouse);
if($insertId) { if($insertId) {
GrowthLog::log('成功,刷房源竞投id为'.$temp['bid_id'].'成功记录',$tempHouse); GrowthLog::log('�ɹ���ˢ��Դ��ͶidΪ'.$temp['bid_id'].'�ɹ���¼',$tempHouse);
} else { } else {
GrowthLog::log('失败,刷房源竞投id为'.$temp['bid_id'].'成功记录',$tempHouse); GrowthLog::log(�ܣ�ˢ��Դ��ͶidΪ'.$temp['bid_id'].'�ɹ���¼',$tempHouse);
} }
} }
if(!$debug) { if(!$debug) {
...@@ -153,66 +153,66 @@ function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) { ...@@ -153,66 +153,66 @@ function handleBidSuccessData($bidSuccessData,$type,$pid,$debug=0) {
$broker = array('id'=>$brokerId); $broker = array('id'=>$brokerId);
$brokerGroup = new BrokerGroup(); $brokerGroup = new BrokerGroup();
$brokerRow = $brokerGroup->getBrokerGroupInfo($brokerId); $brokerRow = $brokerGroup->getBrokerGroupInfo($brokerId);
if(!$brokerRow) {GrowthLog::log('经纪人'.$brokerId.'不存在'.$score,array());continue;} if(!$brokerRow) {GrowthLog::log('������'.$brokerId.'������'.$score,array());continue;}
$broker['groupid'] = $brokerRow['package_id']; $broker['groupid'] = $brokerRow['package_id'];
$growthBrokerCredit = new GrowthBrokerCredit($broker); $growthBrokerCredit = new GrowthBrokerCredit($broker);
if($conf_cityflag=='nj') { if($conf_cityflag=='nj') {
$type2=2;$creditName="房豆";$creditUnit="房豆"; $type2=2;$creditName="����";$creditUnit="����";
$descriptionC = $growthBrokerCredit->getWayAliasName($creditWay); $descriptionC = $growthBrokerCredit->getWayAliasName($creditWay);
$descriptionC = $descriptionC . '扣除' . abs($score) . $creditUnit; $descriptionC = $descriptionC . '�۳�' . abs($score) . $creditUnit;
}else { }else {
$type2=1;$creditName="积分";$creditUnit="分"; $type2=1;$creditName="����";$creditUnit="��";
$descriptionC = null; $descriptionC = null;
} }
$growthBrokerCredit->reduce($creditWay, $descriptionC, $score,$type2); $growthBrokerCredit->reduce($creditWay, $descriptionC, $score,$type2);
GrowthLog::log('扣除'.$brokerId.'的'.$creditName.$score,array()); GrowthLog::log('�۳�'.$brokerId.'��'.$creditName.$score,array());
/*************扣完积分,解除冻结*****************/ /*************�������,�������*****************/
$growthBrokerCredit->frozenCredit("-".$score,$brokerId,$alisWay='bidFinish','竞投结束,解除冻结'.$score,$type); $growthBrokerCredit->frozenCredit("-".$score,$brokerId,$alisWay='bidFinish','��Ͷ�������������'.$score,$type);
GrowthLog::log('解除冻结'.$brokerId.'的'.$creditName.$score,array()); GrowthLog::log('�������'.$brokerId.'��'.$creditName.$score,array());
/*************加成长值************************/ /*************�ӳɳ�ֵ************************/
$growthBrokerExp = new GrowthBrokerExp($broker); $growthBrokerExp = new GrowthBrokerExp($broker);
$growthBrokerExp->increase($creditWay, $description); $growthBrokerExp->increase($creditWay, $description);
GrowthLog::log('增加'.$brokerId.'的成长值'.$score,array()); GrowthLog::log('����'.$brokerId.'�ijɳ�ֵ'.$score,array());
} }
} }
sendMessage('结束刷竞投成功表,期次为'.$pid); sendMessage('����ˢ��Ͷ�ɹ����ڴ�Ϊ'.$pid);
GrowthLog::log('结束刷竞投成功表,期次为'.$pid.'',array()); GrowthLog::log('����ˢ��Ͷ�ɹ����ڴ�Ϊ'.$pid.'',array());
} }
/** /**
* 根据时间创建小区专家竞 * ����ʱ�䴴��С��ר�Ҿ�Ͷ
* @param type $startTime 竞投开始时间Y-m-d H:i:s格式的字符串,下 * @param type $startTime ��Ͷ��ʼʱ��Y-m-d H:i:s��ʽ���ַ�������ͬ
* @param type $endTime 竞投结束时间 * @param type $endTime ��Ͷ����ʱ��
* @param type $tgStartTime 推广开始时间 * @param type $tgStartTime �ƹ㿪ʼʱ��
* @param type $tgEndTime 推广结束时间 * @param type $tgEndTime �ƹ����ʱ��
*/ */
function createNextBidBlockExpert($startTime,$endTime,$tgStartTime,$tgEndTime) { function createNextBidBlockExpert($startTime,$endTime,$tgStartTime,$tgEndTime) {
$growthBidPeriods = new GrowthBidPeriods(); $growthBidPeriods = new GrowthBidPeriods();
$growthBid = new GrowthBidBlockExpert(); $growthBid = new GrowthBidBlockExpert();
//竞投小区专家期次 //��ͶС��ר���ڴ�
$fieldData = array( $fieldData = array(
'type' => 1, 'type' => 1,
'name' => '小区专家竞投', 'name' => ��ר�Ҿ�Ͷ',
'start_time'=>$startTime, 'start_time'=>$startTime,
'end_time'=>$endTime, 'end_time'=>$endTime,
'tg_start_time'=>$tgStartTime, 'tg_start_time'=>$tgStartTime,
'tg_end_time'=>$tgEndTime); 'tg_end_time'=>$tgEndTime);
$bidPeriodsId = $growthBidPeriods->insert($fieldData); $bidPeriodsId = $growthBidPeriods->insert($fieldData);
if($bidPeriodsId) { if($bidPeriodsId) {
echo "创建小区专家竞投期次,id=".$bidPeriodsId."。"."时间:".$fieldData['tg_start_time']."到".$fieldData['tg_end_time']; echo "����С��ר�Ҿ�Ͷ�ڴΣ�id=".$bidPeriodsId."��"."ʱ�䣺".$fieldData['tg_start_time']."��".$fieldData['tg_end_time'];
echo "<br/>"; echo "<br/>";
} else { } else {
echo "创建小区专家竞投期次,失败"; echo "����С��ר�Ҿ�Ͷ�ڴΣ�ʧ��";
} }
//小区id和等级 //С��id�͵ȼ�
$blockLevelHeat = new BlockLevelHeat(); $blockLevelHeat = new BlockLevelHeat();
$blocks = $blockLevelHeat->findAll(); $blocks = $blockLevelHeat->findAll();
//起拍积分,参与等级 //���Ļ��֣�����ȼ�
$growthBidStartSetting = new GrowthBidStartSetting(); $growthBidStartSetting = new GrowthBidStartSetting();
$data_info = $growthBidStartSetting->getData(); $data_info = $growthBidStartSetting->getData();
$data_info1 = array(); $data_info1 = array();
...@@ -245,49 +245,49 @@ function createNextBidBlockExpert($startTime,$endTime,$tgStartTime,$tgEndTime) { ...@@ -245,49 +245,49 @@ function createNextBidBlockExpert($startTime,$endTime,$tgStartTime,$tgEndTime) {
$temp['ctime'] = date("Y-m-d H:i:s"); $temp['ctime'] = date("Y-m-d H:i:s");
$inid = $growthBid->insert($temp); $inid = $growthBid->insert($temp);
if($inid) { if($inid) {
echo "创建小区竞投成功,id=".$inid."。小区id为".$value['id']; echo "����С����Ͷ�ɹ���id=".$inid."��С��idΪ".$value['id'];
} else { } else {
echo "失败,小区id为".$value['id']; echo �ܣ�С��idΪ".$value['id'];
} }
echo "<br/>"; echo "<br/>";
} }
} }
sendMessage('创建小区竞投成功'); sendMessage('����С����Ͷ�ɹ�');
//刷指定的小区专家 //ˢָ����С��ר��
refreshSpecBlockExpert($fieldData); refreshSpecBlockExpert($fieldData);
} }
/** /**
* 根据时间创建房源竞 * ����ʱ�䴴����Դ��Ͷ
* @param type $startTime 竞投开始时间Y-m-d H:i:s格式的字符串,下 * @param type $startTime ��Ͷ��ʼʱ��Y-m-d H:i:s��ʽ���ַ�������ͬ
* @param type $endTime 竞投结束时间 * @param type $endTime ��Ͷ����ʱ��
* @param type $tgStartTime 推广开始时间 * @param type $tgStartTime �ƹ㿪ʼʱ��
* @param type $tgEndTime 推广结束时间 * @param type $tgEndTime �ƹ����ʱ��
*/ */
function createNextBidHouse($startTime,$endTime,$tgStartTime,$tgEndTime) { function createNextBidHouse($startTime,$endTime,$tgStartTime,$tgEndTime) {
$growthBidPeriods = new GrowthBidPeriods(); $growthBidPeriods = new GrowthBidPeriods();
$growthBid = new GrowthBidHouse(); $growthBid = new GrowthBidHouse();
//竞投小区词期次 //��ͶС�����ڴ�
$fieldData = array( $fieldData = array(
'type' => 2, 'type' => 2,
'name' => '房源竞投', 'name' => '��Դ��Ͷ',
'start_time'=>$startTime, 'start_time'=>$startTime,
'end_time'=>$endTime, 'end_time'=>$endTime,
'tg_start_time'=>$tgStartTime, 'tg_start_time'=>$tgStartTime,
'tg_end_time'=>$tgEndTime); 'tg_end_time'=>$tgEndTime);
$bidPeriodsId = $growthBidPeriods->insert($fieldData); $bidPeriodsId = $growthBidPeriods->insert($fieldData);
if($bidPeriodsId) { if($bidPeriodsId) {
echo "创建小区词竞投期次,id=".$bidPeriodsId."。"."时间:".$fieldData['tg_start_time']."到".$fieldData['tg_end_time']; echo "����С���ʾ�Ͷ�ڴΣ�id=".$bidPeriodsId."��"."ʱ�䣺".$fieldData['tg_start_time']."��".$fieldData['tg_end_time'];
echo "<br/>"; echo "<br/>";
} else { } else {
echo "创建小区词竞投期次,失败"; echo "����С���ʾ�Ͷ�ڴΣ�ʧ��";
} }
//小区id和等级 //С��id�͵ȼ�
$blockLevelHeat = new BlockLevelHeat(); $blockLevelHeat = new BlockLevelHeat();
$blocks = $blockLevelHeat->findAll(); $blocks = $blockLevelHeat->findAll();
//起拍积分,参与等级 //���Ļ��֣�����ȼ�
$growthBidStartSetting = new GrowthBidStartSetting(); $growthBidStartSetting = new GrowthBidStartSetting();
$data_info = $growthBidStartSetting->getData(); $data_info = $growthBidStartSetting->getData();
$data_info1 = array(); $data_info1 = array();
...@@ -308,15 +308,15 @@ function createNextBidHouse($startTime,$endTime,$tgStartTime,$tgEndTime) { ...@@ -308,15 +308,15 @@ function createNextBidHouse($startTime,$endTime,$tgStartTime,$tgEndTime) {
$temp['ctime'] = date("Y-m-d H:i:s"); $temp['ctime'] = date("Y-m-d H:i:s");
$inid = $growthBid->insert($temp); $inid = $growthBid->insert($temp);
if($inid) { if($inid) {
echo "创建小区词竞投成功,id=".$inid."。小区id为".$value['id']; echo "����С���ʾ�Ͷ�ɹ���id=".$inid."��С��idΪ".$value['id'];
} else { } else {
echo "失败,小区id为".$value['id']; echo �ܣ�С��idΪ".$value['id'];
} }
echo "<br/>"; echo "<br/>";
} }
} }
//热搜词 //���Ѵ�
$growBidHotSearchSet = new GrowthBidHotSearchSet(); $growBidHotSearchSet = new GrowthBidHotSearchSet();
$arrSearchWords = $growBidHotSearchSet->findWords(); $arrSearchWords = $growBidHotSearchSet->findWords();
if($arrSearchWords) { if($arrSearchWords) {
...@@ -332,18 +332,18 @@ function createNextBidHouse($startTime,$endTime,$tgStartTime,$tgEndTime) { ...@@ -332,18 +332,18 @@ function createNextBidHouse($startTime,$endTime,$tgStartTime,$tgEndTime) {
$temp['ctime'] = date("Y-m-d H:i:s"); $temp['ctime'] = date("Y-m-d H:i:s");
$inid = $growthBid->insert($temp); $inid = $growthBid->insert($temp);
if($inid) { if($inid) {
echo "创建热搜词竞投成功,id=".$inid."。热搜词为".$value['words']; echo "�������Ѵʾ�Ͷ�ɹ���id=".$inid."�����Ѵ�Ϊ".$value['words'];
} else { } else {
echo "失败,热搜词为".$value; echo �ܣ����Ѵ�Ϊ".$value;
} }
echo "<br/>"; echo "<br/>";
} }
} }
sendMessage('创建房源竞投成功'); sendMessage('������Դ��Ͷ�ɹ�');
} }
/** /**
* 更新竞投小区专家最低等级 * ���¾�ͶС��ר����͵ȼ�
*/ */
function updateBidBlockExpertLowLevel() { function updateBidBlockExpertLowLevel() {
$growthBidStartSetting = new GrowthBidStartSetting(); $growthBidStartSetting = new GrowthBidStartSetting();
...@@ -352,7 +352,7 @@ function updateBidBlockExpertLowLevel() { ...@@ -352,7 +352,7 @@ function updateBidBlockExpertLowLevel() {
$minBidBlockLevel = ''; $minBidBlockLevel = '';
$bidBlockLevels = ''; $bidBlockLevels = '';
foreach ($data_info as $key => $value) { foreach ($data_info as $key => $value) {
//subclass = 1 小区竞投 subclass 2 房源竞 //subclass = 1 С����Ͷ subclass 2 ��Դ��Ͷ
if ($value['subclass'] == 1) { if ($value['subclass'] == 1) {
$bidBlockLevels .= str_replace('LV', '', $value['levelnames']) . ','; $bidBlockLevels .= str_replace('LV', '', $value['levelnames']) . ',';
} }
...@@ -361,12 +361,12 @@ function updateBidBlockExpertLowLevel() { ...@@ -361,12 +361,12 @@ function updateBidBlockExpertLowLevel() {
$minBidBlockLevel = min(explode(',', $bidBlockLevels)); $minBidBlockLevel = min(explode(',', $bidBlockLevels));
$bolUpdateBlock = $growthBidLowLevel->updateBlockExpertLevel('LV' . $minBidBlockLevel); $bolUpdateBlock = $growthBidLowLevel->updateBlockExpertLevel('LV' . $minBidBlockLevel);
if ($bolUpdateBlock) { if ($bolUpdateBlock) {
echo '更新小区专家最低竞投等级成功'; echo '����С��ר����;�Ͷ�ȼ��ɹ�';
} }
} }
/** /**
* 更新竞投房源最低等级 * ���¾�Ͷ��Դ��͵ȼ�
*/ */
function updateBidHouseLowLevel() { function updateBidHouseLowLevel() {
$growthBidStartSetting = new GrowthBidStartSetting(); $growthBidStartSetting = new GrowthBidStartSetting();
...@@ -383,12 +383,12 @@ function updateBidHouseLowLevel() { ...@@ -383,12 +383,12 @@ function updateBidHouseLowLevel() {
$minBidHouseLevel = min(explode(',', $bidHouseLevels)); $minBidHouseLevel = min(explode(',', $bidHouseLevels));
$bolUpdateHouse = $growthBidLowLevel->updateHouseLevel('LV' . $minBidHouseLevel); $bolUpdateHouse = $growthBidLowLevel->updateHouseLevel('LV' . $minBidHouseLevel);
if ($bolUpdateHouse) { if ($bolUpdateHouse) {
echo '<br>更新房源最低竞投等级成功'; echo '<br>���·�Դ��;�Ͷ�ȼ��ɹ�';
} }
} }
/** /**
* 更新竞投房源中热搜词和小区词的相关等级 * ���¾�Ͷ��Դ�����Ѵʺ�С���ʵ���صȼ�
*/ */
function updateBidHouseLevel() { function updateBidHouseLevel() {
$growthBidStartSetting = new GrowthBidStartSetting(); $growthBidStartSetting = new GrowthBidStartSetting();
...@@ -408,15 +408,15 @@ function updateBidHouseLevel() { ...@@ -408,15 +408,15 @@ function updateBidHouseLevel() {
$updateBlockStatus = $growthBidHouseLevel->updateBlockLevel($bidHouseBlockLevel); $updateBlockStatus = $growthBidHouseLevel->updateBlockLevel($bidHouseBlockLevel);
$updateHotSearchStatus = $growthBidHouseLevel->updateHotSearchLevel($bidHouseHotSearchLevel); $updateHotSearchStatus = $growthBidHouseLevel->updateHotSearchLevel($bidHouseHotSearchLevel);
if($growthBidHouseLevel && $updateHotSearchStatus) { if($growthBidHouseLevel && $updateHotSearchStatus) {
echo '竞投房源所需要的等级成功'; echo '��Ͷ��Դ����Ҫ�ĵȼ��ɹ�';
} }
} }
} }
/** /**
* 返回几天后的日期 * ���ؼ���������
* @param type $date 日期,格式 Y-m-d H:i:s * @param type $date ���ڣ���ʽ Y-m-d H:i:s
* @param int $days 天数 * @param int $days ����
* @return type * @return type
*/ */
function getNextBidDateFromBidDate($date,$days){ function getNextBidDateFromBidDate($date,$days){
...@@ -424,7 +424,7 @@ function getNextBidDateFromBidDate($date,$days){ ...@@ -424,7 +424,7 @@ function getNextBidDateFromBidDate($date,$days){
} }
/** /**
* 保存执行过job的数据 * ����ִ�й�job������
* @global type $db_sys * @global type $db_sys
* @global type $city * @global type $city
* @param type $jobname * @param type $jobname
...@@ -443,7 +443,7 @@ function insertJobData($jobname, $msg) { ...@@ -443,7 +443,7 @@ function insertJobData($jobname, $msg) {
} }
/** /**
* 查找某个job是某已经执行成功 * ����ij��job��ij�Ѿ�ִ�гɹ�
* @global type $db_sys * @global type $db_sys
* @global type $city * @global type $city
* @param type $jobname * @param type $jobname
...@@ -457,16 +457,16 @@ function getJobState($jobname) { ...@@ -457,16 +457,16 @@ function getJobState($jobname) {
} }
//发送短信 //���Ͷ���
function sendMessage($msg) { function sendMessage($msg) {
$telno = array('13851894682', '18260082244'); $telno = array('13851894682', '18260082244');
$telno = array(); $telno = array();
foreach($telno as $v) { foreach($telno as $v) {
curl_get_contents("http://mysms.house365.com:81/index.php/Interface/apiSendMobil/jid/7/depart/3/city/nj/mobileno/".$v."/msg/".urlencode($msg)); curl_get_contents("http://mysms.house365.com/index.php/Interface/apiSendMobil/jid/7/depart/3/city/nj/mobileno/".$v."/msg/".urlencode($msg));
} }
} }
//http curl请求 //http curl����
if(!function_exists('curl_get_contents')) if(!function_exists('curl_get_contents'))
{ {
function curl_get_contents($str,$t_url="") function curl_get_contents($str,$t_url="")
...@@ -483,7 +483,7 @@ if(!function_exists('curl_get_contents')) ...@@ -483,7 +483,7 @@ if(!function_exists('curl_get_contents'))
} }
} }
//自定义 //�Զ���
function getCustomBlockBidNumber() { function getCustomBlockBidNumber() {
global $dbback; global $dbback;
$time = time(); $time = time();
...@@ -494,7 +494,7 @@ function getCustomBlockBidNumber() { ...@@ -494,7 +494,7 @@ function getCustomBlockBidNumber() {
} }
/** /**
* 刷指定的小区专家 * ˢָ����С��ר��
*/ */
function refreshSpecBlockExpert($cPeriods) { function refreshSpecBlockExpert($cPeriods) {
global $dbback; global $dbback;
...@@ -508,8 +508,8 @@ function refreshSpecBlockExpert($cPeriods) { ...@@ -508,8 +508,8 @@ function refreshSpecBlockExpert($cPeriods) {
'broker_id' => $temp['uid'], 'broker_id' => $temp['uid'],
'block_id' => $temp['blockid'], 'block_id' => $temp['blockid'],
'block_name' => $temp['blockname'], 'block_name' => $temp['blockname'],
'score' => -1,//表示是指定的,不是通过竞投的 'score' => -1,//��ʾ��ָ���ģ�����ͨ����Ͷ��
//'utime' => $temp['utime'],//使用默认值,创建竞投时 //'utime' => $temp['utime'],//ʹ��Ĭ��ֵ��������Ͷʱ
'tg_start_time' => $cPeriods['tg_start_time'], 'tg_start_time' => $cPeriods['tg_start_time'],
'tg_end_time' => $cPeriods['tg_end_time'], 'tg_end_time' => $cPeriods['tg_end_time'],
); );
...@@ -517,9 +517,9 @@ function refreshSpecBlockExpert($cPeriods) { ...@@ -517,9 +517,9 @@ function refreshSpecBlockExpert($cPeriods) {
//continue; //continue;
$insertId = $growthRecordFinish->insert($tempBlock); $insertId = $growthRecordFinish->insert($tempBlock);
if($insertId) { if($insertId) {
GrowthLog::log('指定'.$temp['broker_id'].'为小区专家',$tempBlock); GrowthLog::log(��'.$temp['broker_id'].'ΪС��ר��',$tempBlock);
} else { } else {
GrowthLog::log('未能指定'.$temp['broker_id'].'为小区专家',$tempBlock); GrowthLog::log(��ָ��'.$temp['broker_id'].'ΪС��ר��',$tempBlock);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment