公海回收bug fix

pull/46/head
张萌 1 year ago
parent c1d7d65f03
commit 6cee6d51db

@ -285,7 +285,7 @@ class PoolCommand extends Command
$minLimit = PoolCommand::getMinDay($levels); $minLimit = PoolCommand::getMinDay($levels);
$minTime = (time() - 24 * 60 * 60 * $minLimit); $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); $minLimit = PoolCommand::getMinDay($levels);
$minTime = (time() - 24 * 60 * 60 * $minLimit); $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); $minLimit = PoolCommand::getMinDay($levels);
$minTime = (time() - 24 * 60 * 60 * $minLimit); $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`))) )";
} }
# 选择不进入公海的客户(有商机客户) # 选择不进入公海的客户(有商机客户)

Loading…
Cancel
Save