From cbeda6f33f84e51b19353aa5a40df3f111886bc9 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 19 Apr 2023 18:40:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9F=BA=E7=A1=80=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E7=9A=84=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=94=AF=E4=BB=98=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20=E5=A4=84=E7=90=86=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E4=BF=AE=E6=94=B9=E6=95=B0=E9=87=8F=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=8F=90=E7=A4=BA=E9=97=AE=E9=A2=98=20=E5=A4=84?= =?UTF-8?q?=E7=90=86=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=8B=BC=E5=9B=A2=E4=B8=8B=E5=8D=95=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20=E5=A4=84=E7=90=86=E5=8F=91=E7=A5=A8=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20=E5=A4=84=E7=90=86=E5=88=A0=E9=99=A4=E4=BA=86=E7=A0=8D?= =?UTF-8?q?=E4=BB=B7=E5=95=86=E5=93=81=EF=BC=8C=E7=A0=8D=E4=BB=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=BF=98=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20=E5=A4=84=E7=90=86=E6=94=AF=E4=BB=98=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E4=B8=BA0=E7=A7=AF=E5=88=86=E6=8A=B5=E6=89=A3=E4=B9=9F?= =?UTF-8?q?=E4=B8=BA0=E7=9A=84=E6=97=B6=E5=80=99=E7=9A=84=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/api/controller/v1/PublicController.php | 2 +- crmeb/app/api/controller/v1/store/StoreCartController.php | 3 ++- crmeb/app/dao/activity/combination/StoreCombinationDao.php | 2 ++ crmeb/app/dao/order/StoreOrderInvoiceDao.php | 2 +- .../services/activity/bargain/StoreBargainUserServices.php | 2 +- crmeb/app/services/order/StoreOrderComputedServices.php | 4 ++-- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/crmeb/app/api/controller/v1/PublicController.php b/crmeb/app/api/controller/v1/PublicController.php index 42982af31..377c6c25e 100644 --- a/crmeb/app/api/controller/v1/PublicController.php +++ b/crmeb/app/api/controller/v1/PublicController.php @@ -681,7 +681,7 @@ class PublicController $data['member_card_status'] = sys_config('member_card_status');//是否开启付费会员 $data['member_price_status'] = sys_config('member_price_status');//商品会员折扣价展示启用 $data['ali_pay_status'] = sys_config('ali_pay_status') != '0';//支付宝是否启用 - $data['wechat_pay_status'] = sys_config('pay_weixin_open') != '0';//微信是否启用 + $data['pay_weixin_open'] = sys_config('pay_weixin_open') != '0';//微信是否启用 $data['yue_pay_status'] = sys_config('yue_pay_status') == 1 && sys_config('balance_func_status') != 0;//余额是否启用 $data['offline_pay_status'] = sys_config('offline_pay_status') == 1;//线下是否启用 $data['friend_pay_status'] = sys_config('friend_pay_status') == 1;//好友是否启用 diff --git a/crmeb/app/api/controller/v1/store/StoreCartController.php b/crmeb/app/api/controller/v1/store/StoreCartController.php index 7185f886c..28ef489d9 100644 --- a/crmeb/app/api/controller/v1/store/StoreCartController.php +++ b/crmeb/app/api/controller/v1/store/StoreCartController.php @@ -124,7 +124,8 @@ class StoreCartController ['id', 0],//购物车编号 ['number', 0],//购物车编号 ]); - if (!$where['id'] || !$where['number'] || !is_numeric($where['id']) || !is_numeric($where['number'])) return app('json')->fail(100100); + if (!$where['id'] || !is_numeric($where['id'])) return app('json')->fail(100100); + if (!$where['number'] || !is_numeric($where['number'])) return app('json')->fail(100007); $res = $this->services->changeUserCartNum($where['id'], $where['number'], $request->uid()); if ($res) return app('json')->success(100001); else return app('json')->fail(100007); diff --git a/crmeb/app/dao/activity/combination/StoreCombinationDao.php b/crmeb/app/dao/activity/combination/StoreCombinationDao.php index f8f14349a..143f9f725 100644 --- a/crmeb/app/dao/activity/combination/StoreCombinationDao.php +++ b/crmeb/app/dao/activity/combination/StoreCombinationDao.php @@ -59,6 +59,8 @@ class StoreCombinationDao extends BaseDao $query->name('store_category')->where('pid', $where['cid'])->field('id')->select(); })->field('product_id')->select(); }); + })->when(isset($where['id']) && $where['id'], function ($query) use ($where) { + $query->where('id', $where['id']); }); } diff --git a/crmeb/app/dao/order/StoreOrderInvoiceDao.php b/crmeb/app/dao/order/StoreOrderInvoiceDao.php index 21c80f97b..1b98b75fb 100644 --- a/crmeb/app/dao/order/StoreOrderInvoiceDao.php +++ b/crmeb/app/dao/order/StoreOrderInvoiceDao.php @@ -53,7 +53,7 @@ class StoreOrderInvoiceDao extends BaseDao return parent::search($where, $search)->when($type, function ($query) use ($type) { switch ($type) { case 1://待开 - $query->where('is_invoice', 0)->where('invoice_time', 0)->where('is_refund', 0); + $query->where('is_invoice', 0)->where('is_refund', 0); break; case 2://已开 $query->where('is_invoice', 1); diff --git a/crmeb/app/services/activity/bargain/StoreBargainUserServices.php b/crmeb/app/services/activity/bargain/StoreBargainUserServices.php index 570e6167a..acd472493 100644 --- a/crmeb/app/services/activity/bargain/StoreBargainUserServices.php +++ b/crmeb/app/services/activity/bargain/StoreBargainUserServices.php @@ -220,7 +220,7 @@ class StoreBargainUserServices extends BaseServices public function userBargainStatusFail($bargain_id, $is_true) { if ($is_true) { - $this->dao->delete(['bargain_id' => $bargain_id, 'status' => 1]); + $this->dao->delete(['bargain_id' => $bargain_id]); /** @var StoreBargainUserHelpServices $service */ $service = app()->make(StoreBargainUserHelpServices::class); $service->delete(['bargain_id' => $bargain_id]); diff --git a/crmeb/app/services/order/StoreOrderComputedServices.php b/crmeb/app/services/order/StoreOrderComputedServices.php index a9aad3db2..408ac791a 100644 --- a/crmeb/app/services/order/StoreOrderComputedServices.php +++ b/crmeb/app/services/order/StoreOrderComputedServices.php @@ -226,8 +226,8 @@ class StoreOrderComputedServices extends BaseServices // 可用积分 $usable = bcsub((string)$userInfo['integral'], (string)$userBillServices->getBillSum(['uid' => $userInfo['uid'], 'is_frozen' => 1]), 0); - $SurplusIntegral = 0; - if ($useIntegral && $userInfo['integral'] > 0) { + $SurplusIntegral = $usable; + if ($useIntegral && $userInfo['integral'] > 0 && $other['integralRatio'] > 0) { //积分抵扣上限 $integralMaxNum = sys_config('integral_max_num', 200); if ($integralMaxNum > 0 && $usable > $integralMaxNum) {