From 6cee6d51db66224d275f7cc703fcb9e6c90422fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=90=8C?= <494089941@qq.com> Date: Sat, 6 May 2023 17:29:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E6=B5=B7=E5=9B=9E=E6=94=B6bug=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/command/PoolCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/common/command/PoolCommand.php b/application/common/command/PoolCommand.php index abf22bc..c036d87 100644 --- a/application/common/command/PoolCommand.php +++ b/application/common/command/PoolCommand.php @@ -285,7 +285,7 @@ class PoolCommand extends Command $minLimit = PoolCommand::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`))) )"; + $where .= " OR ((ISNULL(`customer`.`level`) AND `customer`.`last_time` < " . $minTime . " AND `customer`.`last_time` > `customer`.`obtain_time`) OR (ISNULL(`customer`.`level`) AND `customer`.`obtain_time` < " . $minTime . " AND `customer`.`obtain_time` > `customer`.`last_time`) OR (ISNULL(`customer`.`level`) AND `customer`.`obtain_time` < " . $minTime . " AND ISNULL(`customer`.`last_time`))) )"; } # 选择不进入公海的客户(已成交客户) @@ -348,7 +348,7 @@ class PoolCommand extends Command $minLimit = PoolCommand::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`)) )"; + $where .= " OR ((ISNULL(`business`.`customer_id`) AND `customer`.`obtain_time` < " . $minTime . " AND ISNULL(`customer`.`level`)) OR (`customer`.`obtain_time` < " . $minTime . " AND `customer`.`obtain_time` > `business`.`create_time` AND ISNULL(`customer`.`level`)) OR (`business`.`create_time` < " . $minTime . " AND `business`.`create_time` > `customer`.`obtain_time` AND ISNULL(`customer`.`level`))) )"; } # 选择不进入公海的客户(已成交客户) @@ -408,7 +408,7 @@ class PoolCommand extends Command $minLimit = PoolCommand::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`)) )"; + $where .= " OR ((ISNULL(`contract`.`customer_id`) AND `customer`.`obtain_time` < " . $minTime . " AND ISNULL(`customer`.`level`)) OR (`customer`.`obtain_time` < " . $minTime . " AND `customer`.`obtain_time` > `contract`.`create_time` AND ISNULL(`customer`.`level`)) OR (`contract`.`create_time` < " . $minTime . " AND `contract`.`create_time` > `customer`.`obtain_time` AND ISNULL(`customer`.`level`))) )"; } # 选择不进入公海的客户(有商机客户) -- 2.36.3