@@ -83,7 +83,7 @@ class Distributor extends CI_Controller{
...
@@ -83,7 +83,7 @@ class Distributor extends CI_Controller{
//超出保护期 + 未认购 则删除
//超出保护期 + 未认购 则删除
//$where = 'is_deleted = 0 and building_id = ' . $build['id'] . ' and recommend_status in (0,1,2,3) and create_time<' . (time() - $valid_day*24*3600);
//$where = 'is_deleted = 0 and building_id = ' . $build['id'] . ' and recommend_status in (0,1,2,3) and create_time<' . (time() - $valid_day*24*3600);
$where="is_deleted = 0 and building_id = {$build['id']} and recommend_status in (0,1,2) and ((report_status != 'SUCCESS' and create_time < {$endTime}) OR (report_status = 'SUCCESS' and create_time < {$endTime2}) )";
$where="is_deleted = 0 and distributor_id = {$build['distributor_id']} and recommend_status in (0,1,2) and ((report_status != 'SUCCESS' and create_time < {$endTime}) OR (report_status = 'SUCCESS' and create_time < {$endTime2}) )";