|
@@ -178,10 +178,15 @@ class Merchant
|
|
|
public function updateLog($id, $name, $data)
|
|
|
{
|
|
|
$tixian_status = Dever::param('tixian_status', $data);
|
|
|
- if ($tixian_status == 2) {
|
|
|
+ if ($tixian_status) {
|
|
|
$info = Dever::db('pay/yspay_merchant_log')->one($id);
|
|
|
if ($info) {
|
|
|
- $cash = $info['cash'] * -1;
|
|
|
+ if ($tixian_status == 1) {
|
|
|
+ $cash = $info['cash'];
|
|
|
+ } else {
|
|
|
+ $cash = $info['cash'] * -1;
|
|
|
+ }
|
|
|
+
|
|
|
Dever::db('pay/yspay_merchant')->updateTxCash(array('where_id' => $info['merchant_id'], 'hf_tx_cash' => $cash));
|
|
|
}
|
|
|
}
|