From 04c186afe0b91d10d1dac31a61b2b3409d9b7654 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Thu, 6 Jun 2024 14:15:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90=E5=92=8C?= =?UTF-8?q?=E9=99=90=E5=88=B6=E6=A0=B8=E9=94=80=E5=81=A5=E5=A3=AE=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/order/OrderController.php | 6 ++++-- app/api/controller/user/UserVisitController.php | 2 +- app/api/logic/user/UserLogic.php | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/api/controller/order/OrderController.php b/app/api/controller/order/OrderController.php index bbbb8887..a1f004cd 100644 --- a/app/api/controller/order/OrderController.php +++ b/app/api/controller/order/OrderController.php @@ -5,12 +5,10 @@ namespace app\api\controller\order; use app\api\logic\order\OrderLogic; use app\api\controller\BaseApiController; use app\api\lists\order\OrderList; -use app\api\service\WechatUserService; use app\api\validate\OrderValidate; use app\common\enum\PayEnum; use app\common\logic\PaymentLogic; use app\common\logic\PayNotifyLogic; -use app\common\model\retail\Cashierclass; use app\common\model\store_order\StoreOrder; use app\common\model\user\UserAddress; use Webman\RedisQueue\Redis; @@ -436,6 +434,10 @@ class OrderController extends BaseApiController public function writeoff_order() { $params = (new OrderValidate())->post()->goCheck('check'); + $count = StoreOrder::where('verify_code',$params['verify_code'])->count(); + if(empty($count)){ + return $this->fail('无该核销码请检查'); + } $res = OrderLogic::writeOff($params); if ($res) { return $this->success('核销成功'); diff --git a/app/api/controller/user/UserVisitController.php b/app/api/controller/user/UserVisitController.php index 1e97e17d..5570e2ef 100644 --- a/app/api/controller/user/UserVisitController.php +++ b/app/api/controller/user/UserVisitController.php @@ -13,7 +13,7 @@ use support\Response; #[ApiDoc\title('用户访问')] class UserVisitController extends BaseApiController { - + public $notNeedLogin = ['productLog']; #[ ApiDoc\Title('添加访问商品记录'), ApiDoc\url('/api/user/UserVisit/productLog'), diff --git a/app/api/logic/user/UserLogic.php b/app/api/logic/user/UserLogic.php index 57c2cc57..d3dbc1c0 100644 --- a/app/api/logic/user/UserLogic.php +++ b/app/api/logic/user/UserLogic.php @@ -8,6 +8,7 @@ use app\common\{logic\BaseLogic, model\finance\CapitalFlow, model\store_order\StoreOrder, model\system_store\SystemStore, + model\system_store\SystemStoreStaff, model\user\User, model\user\UserRecharge, model\user\UserShip, @@ -80,7 +81,7 @@ class UserLogic extends BaseLogic $data['is_staff'] = 0; $data['store_id'] = 0; if(isset($data['mobile']) && $data['mobile']){ - $check = SystemStore::where('phone',$data['mobile'])->find()??[]; + $check = SystemStoreStaff::where('phone',$data['mobile'])->find()??[]; if ($check){ $data['is_staff'] = 1; $data['store_id'] = $check['store_id'];