From 713f8c70f8b65bb64e84395f0609352c967cb251 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Sat, 28 Oct 2023 09:38:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD=E9=80=81?= =?UTF-8?q?=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/user/UserBillDao.php | 6 +++--- app/controller/api/user/Zhibo.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/common/dao/user/UserBillDao.php b/app/common/dao/user/UserBillDao.php index 088cd0fe..edbd691e 100644 --- a/app/common/dao/user/UserBillDao.php +++ b/app/common/dao/user/UserBillDao.php @@ -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); diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index 338cc7e5..82b7e8a7 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -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' => '直播送礼收入',