Quellcode durchsuchen

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

runphp vor 4 Monaten
Ursprung
Commit
1edc36ea4f
1 geänderte Dateien mit 9 neuen und 0 gelöschten Zeilen
  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,