From f8a4f0f71e125fb90dc57cc8f320cd4abac7bfc0 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Sat, 9 Mar 2024 18:21:27 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/user/UserBillDao.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/dao/user/UserBillDao.php b/app/common/dao/user/UserBillDao.php index 773080fe..c4f588ca 100755 --- a/app/common/dao/user/UserBillDao.php +++ b/app/common/dao/user/UserBillDao.php @@ -192,7 +192,7 @@ 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', 'zhibo_reward_inc', 'zhibo_reward_dec']); + $query->whereIn('category', ['now_money','brokerage'])->whereIn('type', ['pay_product', 'recharge', 'sys_inc_money', 'sys_dec_money', 'brokerage', 'presell', 'refund', 'zhibo_reward_inc', 'zhibo_reward_dec','order_one']); else if ($where['now_money'] == 1) $query->where('category', 'now_money')->whereIn('type', ['pay_product', 'sys_dec_money', 'presell', 'zhibo_reward_dec']); else if ($where['now_money'] == 2) From a007894fa6c01bd90948a2edf3d5c15019e6c02d Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Sat, 9 Mar 2024 18:28:50 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/user/UserBillDao.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/common/dao/user/UserBillDao.php b/app/common/dao/user/UserBillDao.php index c4f588ca..6a721722 100755 --- a/app/common/dao/user/UserBillDao.php +++ b/app/common/dao/user/UserBillDao.php @@ -191,8 +191,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->whereIn('category', ['now_money','brokerage'])->whereIn('type', ['pay_product', 'recharge', 'sys_inc_money', 'sys_dec_money', 'brokerage', 'presell', 'refund', 'zhibo_reward_inc', 'zhibo_reward_dec','order_one']); + if ($where['now_money'] == 0) //->whereIn('category', ['now_money','brokerage']) + $query->whereIn('type', ['pay_product', 'recharge', 'sys_inc_money', 'sys_dec_money', 'brokerage', 'presell', 'refund', 'zhibo_reward_inc', 'zhibo_reward_dec','order_one']) + ->whereor('category','now_money') + ->whereor('category','brokerage') + ; else if ($where['now_money'] == 1) $query->where('category', 'now_money')->whereIn('type', ['pay_product', 'sys_dec_money', 'presell', 'zhibo_reward_dec']); else if ($where['now_money'] == 2) From d614cfc42ac287405ac537f725e02792e24da4ba Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Sat, 9 Mar 2024 18:31:13 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/user/UserBillDao.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/common/dao/user/UserBillDao.php b/app/common/dao/user/UserBillDao.php index 6a721722..6fc324f0 100755 --- a/app/common/dao/user/UserBillDao.php +++ b/app/common/dao/user/UserBillDao.php @@ -193,8 +193,10 @@ class UserBillDao extends BaseDao ->when(isset($where['now_money']) && in_array($where['now_money'], [0, 1, 2]), function ($query) use ($where) { if ($where['now_money'] == 0) //->whereIn('category', ['now_money','brokerage']) $query->whereIn('type', ['pay_product', 'recharge', 'sys_inc_money', 'sys_dec_money', 'brokerage', 'presell', 'refund', 'zhibo_reward_inc', 'zhibo_reward_dec','order_one']) - ->whereor('category','now_money') - ->whereor('category','brokerage') + ->where(function ($query) { + $query->where('category', 'now_money') + ->orWhere('category', 'brokerage'); + }) ; else if ($where['now_money'] == 1) $query->where('category', 'now_money')->whereIn('type', ['pay_product', 'sys_dec_money', 'presell', 'zhibo_reward_dec']); From 16fead435b7c22e105cc50f1bb2771459396bd5d Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Mon, 11 Mar 2024 09:19:39 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/user/UserBillDao.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/dao/user/UserBillDao.php b/app/common/dao/user/UserBillDao.php index 6fc324f0..1a0c342c 100755 --- a/app/common/dao/user/UserBillDao.php +++ b/app/common/dao/user/UserBillDao.php @@ -195,7 +195,7 @@ class UserBillDao extends BaseDao $query->whereIn('type', ['pay_product', 'recharge', 'sys_inc_money', 'sys_dec_money', 'brokerage', 'presell', 'refund', 'zhibo_reward_inc', 'zhibo_reward_dec','order_one']) ->where(function ($query) { $query->where('category', 'now_money') - ->orWhere('category', 'brokerage'); + ->whereOr('category', 'brokerage'); }) ; else if ($where['now_money'] == 1) From 528635aeb70c25b77c0768a519872f2f3a84f2b2 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Mon, 11 Mar 2024 10:09:36 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=95=86=E6=88=B7=E4=BD=99=E9=A2=9D?= =?UTF-8?q?=E6=94=AF=E4=BB=98=EF=BC=8C=E5=86=BB=E7=BB=93=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/model/store/order/StoreGroupOrder.php | 1 + app/common/repositories/system/merchant/MerchantRepository.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/common/model/store/order/StoreGroupOrder.php b/app/common/model/store/order/StoreGroupOrder.php index 337a3c89..38bf61a3 100755 --- a/app/common/model/store/order/StoreGroupOrder.php +++ b/app/common/model/store/order/StoreGroupOrder.php @@ -26,6 +26,7 @@ class StoreGroupOrder extends BaseModel const PAY_TYPE_ROUTINE = 2; //小程序支付 const PAY_TYPE_H5 = 3; //H5支付 const PAY_TYPE_CREDIT_BUY = 8; //信用购 先货后款 + const PAY_TYPE_MER_BALANCE = 9; //商户余额支付 const ON_LINE_PRODUCT = 9; //线上铺货 const ENTITY_PRODUCT = 10; //实体铺货 const ON_CREDIT_PRODUCT = 11; //赊账进货 diff --git a/app/common/repositories/system/merchant/MerchantRepository.php b/app/common/repositories/system/merchant/MerchantRepository.php index 52f1b8ae..db28a4cf 100755 --- a/app/common/repositories/system/merchant/MerchantRepository.php +++ b/app/common/repositories/system/merchant/MerchantRepository.php @@ -509,7 +509,7 @@ class MerchantRepository extends BaseRepository { if ($money <= 0) return; $payType = StoreOrder::getInstance()->where('order_id', $orderId)->value('pay_type'); - if (systemConfig('mer_lock_time') ||in_array($payType,[StoreGroupOrder::PAY_TYPE_BALANCE,StoreGroupOrder::PAY_TYPE_WECHAT,StoreGroupOrder::PAY_TYPE_CREDIT_BUY])) { + if (systemConfig('mer_lock_time') ||in_array($payType,[StoreGroupOrder::PAY_TYPE_BALANCE, StoreGroupOrder::PAY_TYPE_MER_BALANCE, StoreGroupOrder::PAY_TYPE_WECHAT,StoreGroupOrder::PAY_TYPE_CREDIT_BUY])) { app()->make(UserBillRepository::class)->incBill($merId, 'mer_lock_money', $orderType, [ 'link_id' => ($orderType === 'order' ? 1 : 2) . $orderId, 'mer_id' => $merId,