소스 검색

feat(profit-share): 添加分账订单列表查询接口

runphp 4 달 전
부모
커밋
1edc36ea4f
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      src/Controller/Api/ProfitShareOrderController.php

+ 9 - 0
src/Controller/Api/ProfitShareOrderController.php

@@ -10,11 +10,20 @@ use SixShop\Core\Request;
 use SixShop\Lakala\Config;
 use SixShop\Lakala\Entity\ProfitShareOrderEntity;
 use think\Response;
+use function SixShop\Core\page_response;
 use function SixShop\Core\success_response;
 use function SixShop\Core\throw_logic_exception;
 
 class ProfitShareOrderController
 {
+    public function index(Request $request, ProfitShareOrderEntity $profitShareOrderEntity): Response
+    {
+        $params = [
+            'user_id' => $request->userID,
+        ];
+        return page_response($profitShareOrderEntity->getOrderList($params, $request->pageAndLimit()));
+    }
+
     public function save(
         Request $request,
         ProfitShareOrderEntity $profitShareOrderEntity,