feat: 添加阿里云短信服务支持并优化验证码逻辑
- 引入 alibabacloud/dysmsapi-20170525 依赖,集成阿里云短信服务 - 将短信验证码从6位改为4位,优化用户体验 - 添加聚水潭商品按时间范围同步功能,支持分页拉取 - 增强Cron任务异常处理,添加错误日志记录 - 修复系统附件服务中图片路径处理逻辑 - 更新阿里云SDK相关组件至最新版本 - 添加think-trace调试扩展,便于问题排查 - 优化跨域中间件,使用str_contains替代strpos
This commit is contained in:
@@ -2027,6 +2027,19 @@ HTML;
|
||||
throw new ValidateException('订单号' . $order['order_id'] . ',取消订单失败');
|
||||
}
|
||||
});
|
||||
if ($order['private_bind_id'] && (int)$order['private_phone_status'] === 1 && $order['user_phone']) {
|
||||
try {
|
||||
$privacyPhoneServices = app()->make(\app\services\other\PrivacyPhoneServices::class);
|
||||
if ($privacyPhoneServices->unbindForOrder((string)$order['user_phone'], (string)$order['private_bind_id'])) {
|
||||
$this->dao->update($order['id'], ['private_phone_status' => 0]);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
\think\facade\Log::error('取消订单解绑隐私小号失败 order_id={order_id} error={error}', [
|
||||
'order_id' => $order['id'],
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
//订单取消事件
|
||||
event('order.cancel', [$order]);
|
||||
return true;
|
||||
@@ -2139,7 +2152,12 @@ HTML;
|
||||
public function getExportList(array $where, array $with = [], int $limit = 0)
|
||||
{
|
||||
if ($limit) {
|
||||
[$page] = $this->getPageValue();
|
||||
$page = 1;
|
||||
if (!empty($where['id'])) {
|
||||
$page = 1;
|
||||
} else {
|
||||
[$page] = $this->getPageValue();
|
||||
}
|
||||
} else {
|
||||
[$page, $limit] = $this->getPageValue();
|
||||
}
|
||||
@@ -2151,10 +2169,17 @@ HTML;
|
||||
foreach ($list as &$item) {
|
||||
/** @var StoreOrderCartInfoServices $orderCart */
|
||||
$orderCart = app()->make(StoreOrderCartInfoServices::class);
|
||||
$_info = $orderCart->getCartColunm(['oid' => $item['id']], 'cart_info', 'unique');
|
||||
$_info = $orderCart->getCartColunm(['oid' => $item['id']], 'cart_id,type,relation_id,is_gift,cart_num,refund_num,cart_info', 'unique');
|
||||
foreach ($_info as $k => $v) {
|
||||
$cart_info = is_string($v) ? json_decode($v, true) : $v;
|
||||
$cart_info = is_string($v['cart_info']) ? json_decode($v['cart_info'], true) : $v['cart_info'];
|
||||
if (!isset($cart_info['productInfo'])) $cart_info['productInfo'] = [];
|
||||
$cart_info['cart_num'] = $v['cart_num'] ?? ($cart_info['cart_num'] ?? 0);
|
||||
$cart_info['refund_num'] = $v['refund_num'] ?? 0;
|
||||
$cart_info['cart_id'] = $v['cart_id'] ?? ($cart_info['id'] ?? 0);
|
||||
$cart_info['_relation_type'] = $v['type'] ?? 0;
|
||||
$cart_info['_relation_id'] = $v['relation_id'] ?? 0;
|
||||
$cart_info['is_gift'] = $v['is_gift'] ?? ($cart_info['is_gift'] ?? 0);
|
||||
$cart_info['unique'] = $k;
|
||||
$_info[$k] = $cart_info;
|
||||
unset($cart_info);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user