用户返补充值记录添加到AccountLog表中
This commit is contained in:
parent
039e85a293
commit
ad5e02e05e
@ -432,6 +432,21 @@ class BillionsLogic extends Logic
|
||||
'give_growth' => 0,
|
||||
'create_time' => time()
|
||||
]);
|
||||
|
||||
$user = Db::name('user')->where('id', $user_id)->field('user_money')->find();
|
||||
$sn = createSn('account_log', 'log_sn', '', 4);
|
||||
AccountLog::create([
|
||||
'log_sn' => $sn,
|
||||
'user_id' => $user_id,
|
||||
'source_type' => AccountLog::recharge_billions_inc_balance, //todo 改为充值类型
|
||||
'source_id' => $id, //todo 改为充值订单主键
|
||||
'source_sn' => $order_sn, // todo 改为充值订单编号
|
||||
'change_amount' => $money,
|
||||
'left_amount' => $money + $user['user_money'],
|
||||
'change_type' => 1,
|
||||
'remark' => '消费返补余额充值本地余额'
|
||||
]);
|
||||
|
||||
$user_subsidy = 2;
|
||||
$data['order_price'] = $money; // 改为充值金额
|
||||
$data['user_id'] = $user_id;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user