From 618f9c3831c9d3c0285c9569b356edf1ad503346 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Fri, 22 Mar 2024 11:09:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BD=A3=E9=87=91?= 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, 6 insertions(+), 1 deletion(-) diff --git a/app/common/dao/user/UserBillDao.php b/app/common/dao/user/UserBillDao.php index fa25fbdf..329998e0 100644 --- a/app/common/dao/user/UserBillDao.php +++ b/app/common/dao/user/UserBillDao.php @@ -200,7 +200,12 @@ 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->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']); else if ($where['now_money'] == 2) From 19087229e42eeb8f3842ed316eed26569d4480f3 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Fri, 22 Mar 2024 11:59:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/order/StoreOrderRepository.php | 18 +++++++++++------- app/controller/api/store/order/StoreOrder.php | 2 -- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index 7b5be66d..9f9484c8 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -2681,16 +2681,20 @@ class StoreOrderRepository extends BaseRepository $deal = $this->dealArr($list); //平均2个左右 0 1 2 阶梯往上查寻找 [$products, $minNum] = $this->getRange($deal, $range); - $result = []; + $list = []; if (!empty($products)) { - $result = $this->findNearestPriceProduct($products, $money, $minNum); + $list = $this->findNearestPriceProduct($products, $money, $minNum); } - $count = count($result);//计算数量的 - return compact('count', 'result','merInfo'); - - } else { - return compact('count', 'list','merInfo'); + $count = count($list);//计算数量的 } + + return [ + 'count'=>$count, + 'list'=>$list, + 'merInfo'=>$merInfo, + ]; + + } public function getRange($array, $range) diff --git a/app/controller/api/store/order/StoreOrder.php b/app/controller/api/store/order/StoreOrder.php index 45c92e16..8ba6efc3 100644 --- a/app/controller/api/store/order/StoreOrder.php +++ b/app/controller/api/store/order/StoreOrder.php @@ -332,8 +332,6 @@ class StoreOrder extends BaseController return app('json')->success($this->repository->beginMerchant($merId)); } - - $where = [ "a.mer_id" => $merId, "p.is_show" => 1,