Kirin 3 年 前
コミット
eb874e0bd9

+ 12 - 3
app/api/controller/user/UserBillController.php

@@ -342,10 +342,19 @@ class UserBillController
      */
     public function integral_list(Request $request)
     {
-        list($page, $limit) = UtilService::getMore([
-            ['page', 0], ['limit', 0]
+        list($page, $limit, $pm) = UtilService::getMore([
+            ['page', 0], ['limit', 0], ['pm', '']
+        ], $request, true);
+        return app('json')->successful(UserBill::userBillList($request->uid(), $page, $limit, 'integral', $pm));
+
+    }
+
+    public function cash_list(Request $request)
+    {
+        list($page, $limit, $pm) = UtilService::getMore([
+            ['page', 0], ['limit', 0], ['pm', '']
         ], $request, true);
-        return app('json')->successful(UserBill::userBillList($request->uid(), $page, $limit));
+        return app('json')->successful(UserBill::userBillList($request->uid(), $page, $limit, 'cash', $pm));
 
     }
 }

+ 3 - 1
app/models/user/UserBill.php

@@ -59,11 +59,12 @@ class UserBill extends BaseModel
      * @throws \think\db\exception\ModelNotFoundException
      * @throws \think\exception\DbException
      */
-    public static function userBillList($uid, $page, $limit, $category = 'integral')
+    public static function userBillList($uid, $page, $limit, $category = 'integral', $pm = '')
     {
         if ($page) {
             $list = self::where('uid', $uid)
                 ->where('category', $category)
+                ->where('pm', $pm)
                 ->field('mark,pm,number,add_time')
                 ->where('status', 1)
                 ->order('add_time DESC')
@@ -72,6 +73,7 @@ class UserBill extends BaseModel
         } else {
             $list = self::where('uid', $uid)
                 ->where('category', $category)
+                ->where('pm', $pm)
                 ->field('mark,pm,number,add_time')
                 ->where('status', 1)
                 ->order('add_time DESC')

+ 1 - 0
route/api/route.php

@@ -159,6 +159,7 @@ Route::group(function () {
     Route::get('spread/count/:type', 'user.UserBillController/spread_count')->name('spreadCount');//推广 佣金 3/提现 4 总和
     Route::get('spread/banner', 'user.UserBillController/spread_banner')->name('spreadBanner');//推广分销二维码海报生成
     Route::get('integral/list', 'user.UserBillController/integral_list')->name('integralList');//积分记录
+    Route::get('cash/list', 'user.UserBillController/cash_list')->name('cashList');//积分记录
     //提现类
     Route::get('extract/bank', 'user.UserExtractController/bank')->name('extractBank');//提现银行/提现最低金额
     Route::post('extract/cash', 'user.UserExtractController/cash')->name('extractCash');//提现申请