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'];