diff --git a/app/controller/cashier/User.php b/app/controller/cashier/User.php index 9108f137f..80162a0c1 100644 --- a/app/controller/cashier/User.php +++ b/app/controller/cashier/User.php @@ -13,7 +13,6 @@ namespace app\controller\cashier; use app\Request; use app\services\cashier\UserServices; use app\services\store\StoreUserServices; -use app\controller\api\v2\activity\UserCode; use app\services\order\{OtherOrderServices, StoreCartServices, StoreDeliveryOrderServices, @@ -35,7 +34,6 @@ use app\services\user\level\SystemUserLevelServices; use app\services\user\member\MemberCardServices; use app\services\activity\discounts\StoreDiscountsServices; -use app\services\activity\collage\UserCollageCodeServices; use app\webscoket\SocketPush; use crmeb\services\CacheService; use think\exception\ValidateException; @@ -45,7 +43,6 @@ use think\facade\Log; */ class User extends AuthController { - private $userCode; protected $getChennel = [ 'weixin' => 0, 'routine' => 1, @@ -71,14 +68,6 @@ class User extends AuthController * @param SystemStoreStaffServices $services * @return mixed */ - - - public function __construct(UserCollageCodeServices $services) - { - // 创建UserCode的实例 - $this->userCode = new UserCode($services); - } - public function updatePwd(Request $request, SystemStoreStaffServices $services) { $data = $request->postMore([ @@ -297,16 +286,6 @@ class User extends AuthController */ public function swithUser(Request $request) { - $table_number = $request->post('table_number', 0); - if(!empty($table_number)){ - //wmc换桌 - // 创建UserCode的实例 - - $h = $this->userCode->userChangingTables2(89,87); - var_dump($h);die; - - } - $uid = $request->post('uid', 0); $touristUid = $request->post('tourist_uid', 0); $cashierId = $request->post('cashier_id', 0); @@ -476,7 +455,7 @@ class User extends AuthController $storeMinRecharge = sys_config('store_user_min_recharge'); if ($price < $storeMinRecharge) return $this->fail('充值金额不能低于' . $storeMinRecharge); - + // 创建会员礼包订单 if ($libao_id) { $discountId = $libao_id; @@ -508,10 +487,10 @@ class User extends AuthController $cartIds[] = $cartId; } $cartId = implode(',', $cartIds); - + $user = $services->getUserInfo($uid); $querendingdan = $StoreOrderServices->getOrderConfirmData($user->toArray(), $cartId, 1, 0, 2, 0, 0); - + $orderarray = array( 'addressId'=> 0, 'bargainId'=> 0, @@ -538,7 +517,7 @@ class User extends AuthController ); $order = $this->create($orderarray,$querendingdan['orderKey']); } - + /** @var OtherOrderServices $OtherOrderServices */ $OtherOrderServices = app()->make(OtherOrderServices::class); $re = $OtherOrderServices->payMember($uid, (int)$memberId, (float)$price, (int)$payType, 'store', $this->cashierInfo, $authCode,$order); @@ -565,10 +544,10 @@ class User extends AuthController $StoreOrderServices = app()->make(StoreOrderServices::class); /** @var StoreOrderCreateServices $createServices */ $createServices = app()->make(StoreOrderCreateServices::class); - + if (!$key) return app('json')->fail('参数错误!'); $uid = $orderinfo['uid']; - + if ($checkOrder = $StoreOrderServices->getOne(['unique' => $key, 'uid' => $orderinfo['uid'], 'is_del' => 0], 'id,order_id')) return app('json')->status('extend_order', '订单已创建,请点击查看完成支付', ['orderId' => $checkOrder['order_id'], 'key' => $key]); $addressId = $orderinfo['addressId']; @@ -594,9 +573,9 @@ class User extends AuthController $storeId = $orderinfo['store_id']; $useIntegral = $orderinfo['useIntegral']; $user = $orderinfo['user']; - + $cartGroup = $StoreOrderServices->getCacheOrderInfo($uid, $key); - + if (!$cartGroup) { return app('json')->fail('请勿重复提交或订单已过期 请刷新当前页面!'); } @@ -692,7 +671,7 @@ class User extends AuthController $msg = $e->getMessage(); \think\facade\Log::error('订单生成失败,原因:' . $msg . $e->getFile() . $e->getLine()); } - + if ($order === false) { if ($seckill_id || $combinationId || $discountId || $bargainId) { //回退套餐限量库