Merge branch 'master' into dev
This commit is contained in:
commit
232bc8c06f
6
.env
6
.env
|
|
@ -6,9 +6,9 @@ DEFAULT_TIMEZONE = Asia/Shanghai
|
||||||
[DATABASE]
|
[DATABASE]
|
||||||
TYPE = mysql
|
TYPE = mysql
|
||||||
HOSTNAME = 127.0.0.1
|
HOSTNAME = 127.0.0.1
|
||||||
DATABASE = youda_test
|
DATABASE = youda
|
||||||
USERNAME = youda_test
|
USERNAME = youda
|
||||||
PASSWORD = youda_test
|
PASSWORD = youda
|
||||||
HOSTPORT = 3306
|
HOSTPORT = 3306
|
||||||
CHARSET = utf8
|
CHARSET = utf8
|
||||||
DEBUG = false
|
DEBUG = false
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -685,6 +686,10 @@ class Infinite extends Base
|
||||||
'res' => $payRes['data']['res'],
|
'res' => $payRes['data']['res'],
|
||||||
];
|
];
|
||||||
} 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();
|
||||||
|
|
@ -709,6 +714,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("购买失败,请刷新重试");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -839,6 +846,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("购买失败,请刷新重试");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1137,6 +1146,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("购买失败,请刷新重试");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1253,6 +1264,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