|
@@ -241,13 +241,17 @@ class Cash
|
|
|
$cash = Dever::param('cash', $data);
|
|
|
$merchant = Dever::db('pay/yspay_merchant')->one($merchant_id);
|
|
|
if ($merchant) {
|
|
|
- $this->tixian_act($merchant, $cash);
|
|
|
+ $admin = Dever::load('manage/auth.info');
|
|
|
+ $this->tixian_act($merchant, $cash, $admin['username']);
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- public function tixian_act($merchant, $cash)
|
|
|
+ public function tixian_act($merchant, $cash, $name = '')
|
|
|
{
|
|
|
+ if ($cash <= 0) {
|
|
|
+ Dever::alert('提现金额应大于0');
|
|
|
+ }
|
|
|
$cash = $cash*$this->num;
|
|
|
$yue = $merchant['hf_cash'] - $merchant['hf_tx_cash'] - $this->num*$this->bfj;
|
|
|
if ($yue < $cash) {
|
|
@@ -260,7 +264,7 @@ class Cash
|
|
|
$status = $this->huafu_act($info);
|
|
|
if ($status == 1) {
|
|
|
Dever::db('pay/yspay_merchant')->updateTxCash(array('where_id' => $merchant['id'], 'hf_tx_cash' => $cash));
|
|
|
- Dever::load('pay/yspay/merchant')->log($merchant['id'], $merchant['account_id'], 3, $cash);
|
|
|
+ Dever::load('pay/yspay/merchant')->log($merchant['id'], $merchant['account_id'], 3, $cash, $name);
|
|
|
}
|
|
|
}
|
|
|
}
|