query->from('core_paylog')->where('uniacid', $_W['uniacid'])->where('tid', $tid)->where('module', $module_name)->get(); $refund = array ( 'uniacid' => $_W['uniacid'], 'uniontid' => $paylog['uniontid'], 'fee' => empty($fee) ? $paylog['card_fee'] : $fee, 'status' => 0, 'refund_uniontid' => $refund_uniontid, 'reason' => $reason, ); pdo_insert('core_refundlog', $refund); return pdo_insertid(); } }