From 2627df98eba37d7722b2b33d34d1fa6b6e77b224 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Thu, 6 Jun 2024 17:04:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=BC=80=E5=90=AF=E4=B8=8B?= =?UTF-8?q?=E5=8D=95=E5=90=8E=E6=9B=B4=E6=96=B0=E7=94=A8=E6=88=B7=E7=9A=84?= =?UTF-8?q?=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/enum/user/UserShipEnum.php | 41 +++++++++++++++++++++++++++ app/common/logic/PayNotifyLogic.php | 15 ++++++++++ 2 files changed, 56 insertions(+) create mode 100644 app/common/enum/user/UserShipEnum.php diff --git a/app/common/enum/user/UserShipEnum.php b/app/common/enum/user/UserShipEnum.php new file mode 100644 index 000000000..d8f268056 --- /dev/null +++ b/app/common/enum/user/UserShipEnum.php @@ -0,0 +1,41 @@ +userExpense('user_order_pay', 'order', $order['id'], $order->pay_price,'',1); self::afterPay($order,$extra['transaction_id']); + //活动期间消费 + $check = DictType::where('type','activities')->find(); + if(isset($check) && $check['status'] == 1 && $user['user_ship'] == 0){ + self::dealChange($order['uid']); + } + if ($order->pay_type == 9) { $extra['create_time'] = $order['create_time']; PushService::push('store_merchant_' . $order['id'], $order['id'], ['type' => 'cash_register', 'msg' => '您有一笔订单已支付', 'data' => $extra]); @@ -235,6 +243,13 @@ class PayNotifyLogic extends BaseLogic } + //处理活动期间直接改用户的等级 + public static function dealChange($uid) + { + User::where('id',$uid)->update(['user_ship'=>UserShipEnum::LEVEL_ONE]); + return true; + } + /** * 回调日志