@ -282,7 +277,7 @@ class PoolCommand extends Command
}
# 获取最小天数,对于没有设置级别的客户数据使用
$minLimit = PoolCommand::getMinDay($levels);
$minLimit = $this->getMinDay($levels);
$minTime = (time() - 24 * 60 * 60 * $minLimit);
$where .= " OR ((!`customer`.`level` AND `customer`.`last_time` < " . $minTime . " AND `customer`.`last_time` > `customer`.`obtain_time`) OR (!`customer`.`level` AND `customer`.`obtain_time` < " . $minTime . " AND `customer`.`obtain_time` > `customer`.`last_time`) OR (!`customer`.`level` AND `customer`.`obtain_time` < " . $minTime . " AND ISNULL(`customer`.`last_time`))) )";
@ -297,10 +292,16 @@ class PoolCommand extends Command
# 锁定的客户不提醒
$where .= " AND `customer`.`is_lock` = 0";
# 过滤客户类型
if (!empty($customerType)) {
$where .= "And `customer`.`customer_type` in " . $customerType;
@ -345,7 +346,7 @@ class PoolCommand extends Command
}
# 获取最小天数,对于没有设置级别的客户数据使用
$minLimit = PoolCommand::getMinDay($levels);
$minLimit = $this->getMinDay($levels);
$minTime = (time() - 24 * 60 * 60 * $minLimit);
$where .= " OR ((ISNULL(`business`.`customer_id`) AND `customer`.`obtain_time` < " . $minTime . " AND !`customer`.`level`) OR (`customer`.`obtain_time` < " . $minTime . " AND `customer`.`obtain_time` > `business`.`create_time` AND !`customer`.`level`) OR (`business`.`create_time` < " . $minTime . " AND `business`.`create_time` > `customer`.`obtain_time` AND !`customer`.`level`)) )";
@ -357,10 +358,14 @@ class PoolCommand extends Command
# 锁定的客户不提醒
$where .= " AND `customer`.`is_lock` = 0";
# 过滤客户类型
if (!empty($customerType)) {
$where .= "And `customer`.`customer_type` in " . $customerType;
@ -405,7 +410,7 @@ class PoolCommand extends Command
}
# 获取最小天数,对于没有设置级别的客户数据使用
$minLimit = PoolCommand::getMinDay($levels);
$minLimit = $this->getMinDay($levels);
$minTime = (time() - 24 * 60 * 60 * $minLimit);
$where .= " OR ((ISNULL(`contract`.`customer_id`) AND `customer`.`obtain_time` < " . $minTime . " AND !`customer`.`level`) OR (`customer`.`obtain_time` < " . $minTime . " AND `customer`.`obtain_time` > `contract`.`create_time` AND !`customer`.`level`) OR (`contract`.`create_time` < " . $minTime . " AND `contract`.`create_time` > `customer`.`obtain_time` AND !`customer`.`level`)) )";
@ -417,11 +422,15 @@ class PoolCommand extends Command
# 锁定的客户不提醒
$where .= " AND `customer`.`is_lock` = 0";
# 过滤客户类型
if (!empty($customerType)) {
$where .= "And `customer`.`customer_type` in " . $customerType;