修改邀请记录

This commit is contained in:
luofei 2024-03-12 18:04:59 +08:00 committed by mkm
parent cbea0aa270
commit 67e0e7b455

View File

@ -563,7 +563,9 @@ class User extends BaseController
public function merchantRecord()
{
[$page, $limit] = $this->getPage();
$userIds = UserModel::where('spread_uid', $this->user->uid)->page($page, $limit)->column('uid');
$userQuery = UserModel::where('spread_uid', $this->user->uid);
$count = $userQuery->count();
$userIds = $userQuery->page($page, $limit)->column('uid');
$query = Merchant::whereIn('uid', $userIds)->where('is_del', 0);
$merchants = $query->page($page, $limit)
->field('mer_id,mer_name,uid,real_name,sale_amount,purchase_amount as buy_amount')
@ -579,7 +581,7 @@ class User extends BaseController
$result[] = ['mer_id' => '', 'mer_name' => '', 'uid' => $userId, 'real_name' => '', 'sale_amount' => '0.00', 'buy_amount' => '0.00', 'status' => 0];
}
}
return app('json')->success(['count' => count($userIds), 'list' => $result]);
return app('json')->success(['count' => $count, 'list' => $result]);
}
}