|
@@ -78,7 +78,7 @@ class TreeRecommend extends BaseModel
|
|
|
for ($i = 0; ; $i++) {
|
|
|
if ($i == self::$layers - 1) {
|
|
|
$spreads = User::where('spread_uid', $parent_last_point['uid'])->column('uid');
|
|
|
- if (count(self::where('uid', 'in', $spreads)->group('uid')->field('uid,COUNT(uid)')->select()) >= $way) {
|
|
|
+ if (count(self::where('uid', 'in', $spreads)->group('uid')->field('uid,COUNT(uid)')->select()) + count(self::where('uid', $parent_last_point['uid'])->select()) >= $way) {
|
|
|
break;
|
|
|
}
|
|
|
}
|