Browse Source

报错修复

xialei 1 year ago
parent
commit
b01a5d5288
1 changed files with 4 additions and 1 deletions
  1. 4 1
      app/common/repositories/finance/FinanceRepository.php

+ 4 - 1
app/common/repositories/finance/FinanceRepository.php

@@ -214,7 +214,10 @@ class FinanceRepository extends BaseRepository
214
         $data['tow'][] = ['className' => 'el-icon-s-goods', 'count' => (int)($dataQuery[8] ?? 0), 'name' => '董事'];
214
         $data['tow'][] = ['className' => 'el-icon-s-goods', 'count' => (int)($dataQuery[8] ?? 0), 'name' => '董事'];
215
         $maker = Db::query("SELECT count(uid) as count FROM `rrx_user` where {$where} and originator_id_old > 0");
215
         $maker = Db::query("SELECT count(uid) as count FROM `rrx_user` where {$where} and originator_id_old > 0");
216
         $data['tow'][] = ['className' => 'el-icon-s-goods', 'count' => set_price_rtrim($maker[0]['count'] ?? 0), 'name' => '联创'];
216
         $data['tow'][] = ['className' => 'el-icon-s-goods', 'count' => set_price_rtrim($maker[0]['count'] ?? 0), 'name' => '联创'];
217
-        $maker = Db::query("SELECT count(user_id) as count FROM `rrx_old_user_stock` where {$where}");
217
+        
218
+        $whereTow = str_replace("uid", "user_id", $where);
219
+        $maker = Db::query("SELECT count(user_id) as count FROM `rrx_old_user_stock` where {$whereTow}");
220
+        
218
         $data['tow'][] = ['className' => 'el-icon-s-goods', 'count' => set_price_rtrim($maker[0]['count'] ?? 0), 'name' => '股权'];
221
         $data['tow'][] = ['className' => 'el-icon-s-goods', 'count' => set_price_rtrim($maker[0]['count'] ?? 0), 'name' => '股权'];
219
         $maker = Db::query("SELECT count(uid) as count FROM `rrx_merchant` where {$where}");
222
         $maker = Db::query("SELECT count(uid) as count FROM `rrx_merchant` where {$where}");
220
         $data['tow'][] = ['className' => 'el-icon-s-goods', 'count' => set_price_rtrim($maker[0]['count'] ?? 0), 'name' => '商户'];
223
         $data['tow'][] = ['className' => 'el-icon-s-goods', 'count' => set_price_rtrim($maker[0]['count'] ?? 0), 'name' => '商户'];