wesmiler 2 недель назад
Родитель
Сommit
79ca80a685
1 измененных файлов с 11 добавлено и 0 удалено
  1. 11 0
      app/Services/Common/AccountService.php

+ 11 - 0
app/Services/Common/AccountService.php

@@ -58,7 +58,9 @@ class AccountService extends BaseService
     public function getDataList($params, $pageSize = 15)
     {
         $status = $params['status'] ?? '';
+        $accountType = $params['account_type'] ?? '';
         $type = $params['type'] ?? '';
+        $userType = $params['user_type'] ?? 0;
         $keyword = $params['keyword'] ?? '';
         $orderNo = $params['order_no'] ?? '';
         $userId = $params['user_id'] ?? '';
@@ -79,6 +81,15 @@ class AccountService extends BaseService
             $query->where('a.type', $type);
         }
 
+        // 类型筛选
+        if ($accountType !== '' && $accountType != 0) {
+            $query->where('a.account_type', $accountType);
+        }
+
+        if ($userType !== '' && $userType != 0) {
+            $query->where('a.user_type', $userType);
+        }
+
         // 用户ID筛选
         if ($userId) {
             $query->where('a.user_id', $userId);