|
@@ -918,7 +918,7 @@ class StoreOrder extends BaseModel
|
|
|
@file_put_contents('quanju.txt', json_encode($groupIds) . "-新数组\r\n", 8);
|
|
@file_put_contents('quanju.txt', json_encode($groupIds) . "-新数组\r\n", 8);
|
|
|
// 统计每个level出现的次数
|
|
// 统计每个level出现的次数
|
|
|
$levelCounts = array_count_values($groupIds);
|
|
$levelCounts = array_count_values($groupIds);
|
|
|
- @file_put_contents('quanju.txt', json_encode($levelCounts) . "-所有等级的人数\r\n", 8);
|
|
|
|
|
|
|
+
|
|
|
if ($type == 1) {
|
|
if ($type == 1) {
|
|
|
$field = 'first_ratio';
|
|
$field = 'first_ratio';
|
|
|
$title = '首单奖励';
|
|
$title = '首单奖励';
|
|
@@ -927,6 +927,7 @@ class StoreOrder extends BaseModel
|
|
|
$title = '复购奖励';
|
|
$title = '复购奖励';
|
|
|
}
|
|
}
|
|
|
ksort($levelCounts);
|
|
ksort($levelCounts);
|
|
|
|
|
+ @file_put_contents('quanju.txt', json_encode($levelCounts) . "-所有等级的人数\r\n", 8);
|
|
|
$last_num = 0;
|
|
$last_num = 0;
|
|
|
$last_level = 0;
|
|
$last_level = 0;
|
|
|
foreach ($levelCounts as $k => $v) { //遍历所有等级
|
|
foreach ($levelCounts as $k => $v) { //遍历所有等级
|