From 22dbe366df75facf45ca0599c427156b938598ac Mon Sep 17 00:00:00 2001 From: monanxiao Date: Wed, 8 Mar 2023 15:47:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=8E=E5=8F=B0=E4=BD=A3?= =?UTF-8?q?=E9=87=91=E4=BD=99=E9=A2=9D=E3=80=81=E6=8F=90=E7=8E=B0=E4=BD=A3?= =?UTF-8?q?=E9=87=91=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/user/UserExtractRepository.php | 3 ++- app/controller/admin/store/StoreBrandCategory.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/common/repositories/user/UserExtractRepository.php b/app/common/repositories/user/UserExtractRepository.php index 24fafc93..a23e307d 100644 --- a/app/common/repositories/user/UserExtractRepository.php +++ b/app/common/repositories/user/UserExtractRepository.php @@ -67,7 +67,7 @@ class UserExtractRepository extends BaseRepository public function getList(array $where, $page, $limit) { $query = $this->dao->search($where)->with(['user' => function ($query) { - $query->field('uid,avatar,nickname'); + $query->field('uid,avatar,nickname,brokerage_price,now_money'); }]); $count = $query->count(); $list = $query->page($page, $limit)->select(); @@ -101,6 +101,7 @@ class UserExtractRepository extends BaseRepository { event('user.extract.before',compact('user','data')); $userExtract = Db::transaction(function()use($user,$data){ + if($user['brokerage_price'] < (systemConfig('user_extract_min'))) throw new ValidateException('可提现金额不足'); if($data['extract_price'] < (systemConfig('user_extract_min'))) diff --git a/app/controller/admin/store/StoreBrandCategory.php b/app/controller/admin/store/StoreBrandCategory.php index 0897e2e3..644620d9 100644 --- a/app/controller/admin/store/StoreBrandCategory.php +++ b/app/controller/admin/store/StoreBrandCategory.php @@ -59,6 +59,7 @@ class StoreBrandCategory extends BaseController public function create(validate $validate) { $data = $this->checkParams($validate); + if ($data['pid'] && !$this->repository->merExists($this->request->merId(), $data['pid'])) return app('json')->fail('上级分类不存在'); if ($data['pid'] && !$this->repository->checkLevel($data['pid']))