From abe8268e13e1fce6c1c66afe4b2fc32f5e1ea61a Mon Sep 17 00:00:00 2001 From: zpc Date: Tue, 29 Apr 2025 20:20:04 +0800 Subject: [PATCH 1/2] 111 --- .env | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index d30629e..a15c551 100644 --- a/.env +++ b/.env @@ -6,9 +6,9 @@ DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = mysql HOSTNAME = 127.0.0.1 -DATABASE = youda_test -USERNAME = youda_test -PASSWORD = youda_test +DATABASE = youda +USERNAME = youda +PASSWORD = youda HOSTPORT = 3306 CHARSET = utf8 DEBUG = false From d2dc3e3af0bb10cf1202175226adf4bb87e4f3be Mon Sep 17 00:00:00 2001 From: youda Date: Tue, 29 Apr 2025 20:28:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=8B=E5=8D=95=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Infinite.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/api/controller/Infinite.php b/app/api/controller/Infinite.php index dc932f6..af36edb 100755 --- a/app/api/controller/Infinite.php +++ b/app/api/controller/Infinite.php @@ -16,6 +16,7 @@ use app\common\model\OrderList; use app\common\model\UserVip; use app\common\model\UserCoupon; use think\facade\Db; +use think\facade\Log; use app\common\model\CouponReceive as CouponReceiveModel; use app\common\model\GoodsExtend; use \think\Request; @@ -712,6 +713,10 @@ class Infinite extends Base 'res' => $payRes['data'], ]; } else { + + #记录下单失败日志 + Log::error('下单失败: 用户ID=' . $user['id'] . ', 订单号=' . $order_num . ', 商品ID=' . $goods_id . ', 返回信息=' . json_encode($payRes, JSON_UNESCAPED_UNICODE)); + #删除redis $redis->del($redis_key); Db::rollback(); @@ -736,6 +741,8 @@ class Infinite extends Base Db::rollback(); #删除redis $redis->del($redis_key); + #记录下单失败日志 + Log::error('购买失败: 用户ID=' . $user['id'] . ', 订单号=' . $order_num . ', 商品ID=' . $goods_id . ', 提交结果=' . json_encode($res, JSON_UNESCAPED_UNICODE)); return $this->renderError("购买失败,请刷新重试"); } } @@ -865,6 +872,8 @@ class Infinite extends Base Db::rollback(); #删除redis $redis->del($redis_key); + #记录下单失败日志 + Log::error('秘宝池购买失败: 用户ID=' . $user['id'] . ', 订单号=' . $order_num . ', 商品ID=' . $goods_id . ', 提交结果=' . json_encode($res, JSON_UNESCAPED_UNICODE)); return $this->renderError("购买失败,请刷新重试"); } } @@ -1161,6 +1170,8 @@ class Infinite extends Base Db::rollback(); #删除redis $redis->del($redis_key); + #记录下单失败日志 + Log::error('抽奖券抽奖失败: 用户ID=' . $user['id'] . ', 订单号=' . $order_num . ', 商品ID=' . $goods_id . ', 提交结果=' . json_encode($res, JSON_UNESCAPED_UNICODE)); return $this->renderError("购买失败,请刷新重试"); } } @@ -1277,6 +1288,8 @@ class Infinite extends Base Db::rollback(); #删除redis $redis->del($redis_key); + #记录重抽失败日志 + Log::error('重抽卡重抽失败: 用户ID=' . $user['id'] . ', 订单号=' . $order_num . ', 商品ID=' . $goods_id . ', 订单列表ID=' . $order_list_ids . ', 提交结果=' . json_encode($res, JSON_UNESCAPED_UNICODE)); return $this->renderError("重抽失败,请刷新重试"); }