下单失败
This commit is contained in:
parent
abe8268e13
commit
d2dc3e3af0
|
|
@ -16,6 +16,7 @@ use app\common\model\OrderList;
|
||||||
use app\common\model\UserVip;
|
use app\common\model\UserVip;
|
||||||
use app\common\model\UserCoupon;
|
use app\common\model\UserCoupon;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
use think\facade\Log;
|
||||||
use app\common\model\CouponReceive as CouponReceiveModel;
|
use app\common\model\CouponReceive as CouponReceiveModel;
|
||||||
use app\common\model\GoodsExtend;
|
use app\common\model\GoodsExtend;
|
||||||
use \think\Request;
|
use \think\Request;
|
||||||
|
|
@ -712,6 +713,10 @@ class Infinite extends Base
|
||||||
'res' => $payRes['data'],
|
'res' => $payRes['data'],
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
#记录下单失败日志
|
||||||
|
Log::error('下单失败: 用户ID=' . $user['id'] . ', 订单号=' . $order_num . ', 商品ID=' . $goods_id . ', 返回信息=' . json_encode($payRes, JSON_UNESCAPED_UNICODE));
|
||||||
|
|
||||||
#删除redis
|
#删除redis
|
||||||
$redis->del($redis_key);
|
$redis->del($redis_key);
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
|
|
@ -736,6 +741,8 @@ class Infinite extends Base
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
#删除redis
|
#删除redis
|
||||||
$redis->del($redis_key);
|
$redis->del($redis_key);
|
||||||
|
#记录下单失败日志
|
||||||
|
Log::error('购买失败: 用户ID=' . $user['id'] . ', 订单号=' . $order_num . ', 商品ID=' . $goods_id . ', 提交结果=' . json_encode($res, JSON_UNESCAPED_UNICODE));
|
||||||
return $this->renderError("购买失败,请刷新重试");
|
return $this->renderError("购买失败,请刷新重试");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -865,6 +872,8 @@ class Infinite extends Base
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
#删除redis
|
#删除redis
|
||||||
$redis->del($redis_key);
|
$redis->del($redis_key);
|
||||||
|
#记录下单失败日志
|
||||||
|
Log::error('秘宝池购买失败: 用户ID=' . $user['id'] . ', 订单号=' . $order_num . ', 商品ID=' . $goods_id . ', 提交结果=' . json_encode($res, JSON_UNESCAPED_UNICODE));
|
||||||
return $this->renderError("购买失败,请刷新重试");
|
return $this->renderError("购买失败,请刷新重试");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1161,6 +1170,8 @@ class Infinite extends Base
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
#删除redis
|
#删除redis
|
||||||
$redis->del($redis_key);
|
$redis->del($redis_key);
|
||||||
|
#记录下单失败日志
|
||||||
|
Log::error('抽奖券抽奖失败: 用户ID=' . $user['id'] . ', 订单号=' . $order_num . ', 商品ID=' . $goods_id . ', 提交结果=' . json_encode($res, JSON_UNESCAPED_UNICODE));
|
||||||
return $this->renderError("购买失败,请刷新重试");
|
return $this->renderError("购买失败,请刷新重试");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1277,6 +1288,8 @@ class Infinite extends Base
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
#删除redis
|
#删除redis
|
||||||
$redis->del($redis_key);
|
$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("重抽失败,请刷新重试");
|
return $this->renderError("重抽失败,请刷新重试");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user