Commit 9221b663 authored by chenlei's avatar chenlei

今日使用情况-激活房源剩余修复

parent c0d04fe1
......@@ -4492,7 +4492,10 @@ class Sell extends MY_Controller {
$this->load->model('statistics_model' ,'stat');
$this->load->model('broker_package_model','broker_package');
//套餐房源个数
$post_limit = intval($this->user_arr['postlimit']);
$package_id = $this->user_arr['package_id'];
$this->load->model('package_model');
$package = $this->package_model->find_by_id($package_id);
$post_limit = $package['package_valid_num'];
//激活出售
$statistic_data['sell_count'] = $this->stat->sellCount($uid);
//激活出租
......
......@@ -688,7 +688,11 @@ class Welcome extends MY_Controller
//房源剩余量
private function remain_house_num($today_stat)
{
$house_remain = intval($this->uid_arr['postlimit'] - intval($today_stat['sellCount'] + $today_stat['rentCount']));
$package_id = $this->user_arr['package_id'];
$this->load->model('package_model');
$package = $this->package_model->find_by_id($package_id);
$post_limit = $package['package_valid_num'];
$house_remain = intval($post_limit - intval($today_stat['sellCount'] + $today_stat['rentCount']));
$house_remain = $house_remain < 0 ? 0 : $house_remain;
return $house_remain;
}
......
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