diff --git a/app/common/dao/user/UserBillDao.php b/app/common/dao/user/UserBillDao.php index 773080fe..1a0c342c 100755 --- a/app/common/dao/user/UserBillDao.php +++ b/app/common/dao/user/UserBillDao.php @@ -191,8 +191,13 @@ 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']); + 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']) + ->where(function ($query) { + $query->where('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) 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,