|
|
@@ -25,7 +25,16 @@ class ProfitShareReceiverController
|
|
|
public function index(Request $request, ProfitShareReceiverEntity $entity): Response
|
|
|
{
|
|
|
$params = ['user_id' => $request->userID];
|
|
|
- return page_response(page: $entity->getReceiverList($params, $request->pageAndLimit()));
|
|
|
+ $effective = $entity->where([
|
|
|
+ 'user_id' => $request->userID,
|
|
|
+ 'status' => ReceiverStatusEnum::BOUND,
|
|
|
+ ])->order('effective_time', 'desc')->find();
|
|
|
+ return page_response(
|
|
|
+ page: $entity->getReceiverList($params, $request->pageAndLimit()),
|
|
|
+ data: [
|
|
|
+ 'effective' => $effective
|
|
|
+ ]
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
public function read(int $id, Request $request, ProfitShareReceiverEntity $entity):Response
|