更新直播送礼
This commit is contained in:
parent
bf8e02e5f8
commit
713f8c70f8
@ -192,11 +192,11 @@ class UserBillDao extends BaseDao
|
||||
return UserBill::getDB()
|
||||
->when(isset($where['now_money']) && in_array($where['now_money'], [0, 1, 2]), function ($query) use ($where) {
|
||||
if ($where['now_money'] == 0)
|
||||
$query->where('category', 'now_money')->whereIn('type', ['pay_product', 'recharge', 'sys_inc_money', 'sys_dec_money', 'brokerage', 'presell', 'refund']);
|
||||
$query->where('category', 'now_money')->whereIn('type', ['pay_product', 'recharge', 'sys_inc_money', 'sys_dec_money', 'brokerage', 'presell', 'refund', 'zhibo_reward_inc', 'zhibo_reward_dec']);
|
||||
else if ($where['now_money'] == 1)
|
||||
$query->where('category', 'now_money')->whereIn('type', ['pay_product', 'sys_dec_money', 'presell']);
|
||||
$query->where('category', 'now_money')->whereIn('type', ['pay_product', 'sys_dec_money', 'presell', 'zhibo_reward_inc']);
|
||||
else if ($where['now_money'] == 2)
|
||||
$query->where('category', 'now_money')->whereIn('type', ['recharge', 'sys_inc_money', 'brokerage', 'refund']);
|
||||
$query->where('category', 'now_money')->whereIn('type', ['recharge', 'sys_inc_money', 'brokerage', 'refund', 'zhibo_reward_dec']);
|
||||
})
|
||||
->when(isset($where['uid']) && $where['uid'] !== '', function ($query) use ($where) {
|
||||
$query->where('uid', $where['uid'])->where('mer_id', 0);
|
||||
|
@ -64,7 +64,7 @@ class Zhibo extends BaseController
|
||||
$user->save();
|
||||
$userBillRepository = app()->make(UserBillRepository::class);
|
||||
//打赏人账单
|
||||
$userBillRepository->decBill($user['uid'], 'now_money', 'zhibo_reward', [
|
||||
$userBillRepository->decBill($user['uid'], 'now_money', 'zhibo_reward_dec', [
|
||||
'link_id' => $orderId,
|
||||
'status' => 1,
|
||||
'title' => '直播送礼支出',
|
||||
@ -76,7 +76,7 @@ class Zhibo extends BaseController
|
||||
Db::name('user')->where('uid', $params['master_id'])->inc('now_money', $params['amount'])->update();
|
||||
$master = Db::name('user')->where('uid', $params['master_id'])->find();
|
||||
//主播账单
|
||||
$userBillRepository->incBill($master['uid'], 'now_money', 'zhibo_reward', [
|
||||
$userBillRepository->incBill($master['uid'], 'now_money', 'zhibo_reward_inc', [
|
||||
'link_id' => $orderId,
|
||||
'status' => 1,
|
||||
'title' => '直播送礼收入',
|
||||
|
Loading…
x
Reference in New Issue
Block a user