rabin 1 year ago
parent
commit
3f4882da1b
2 changed files with 11 additions and 2 deletions
  1. 1 1
      database/yspay_cash.php
  2. 10 1
      yspay/Cash.php

+ 1 - 1
database/yspay_cash.php

@@ -208,7 +208,7 @@ return array
         'delete' => false,
         'button' => array
         (
-            '资金划付' => array('oper', 'pay/yspay/cash.huafu_commit'),
+            '资金划付' => array('oper', 'pay/yspay/cash.huafu_commit?account_id=' . Dever::input('search_option_account_id') . '&merchant_id=' . Dever::input('search_option_merchant_id')),
         ),
     ),
 

+ 10 - 1
yspay/Cash.php

@@ -171,7 +171,16 @@ class Cash
     # 资金划付
     public function huafu_commit_api()
     {
-    	$data = Dever::db('pay/yspay_cash')->select(array('status' => 2));
+    	$where = array('status' => 2);
+    	$account_id = Dever::input('account_id');
+    	if ($account_id) {
+    		$where['account_id'] = $account_id;
+    	}
+    	$merchant_id = Dever::input('merchant_id');
+    	if ($merchant_id) {
+    		$where['merchant_id'] = $merchant_id;
+    	}
+    	$data = Dever::db('pay/yspay_cash')->select($where);
     	if ($data) {
     		foreach ($data as $k => $v) {
     			$this->up($v['id'], 3);