Просмотр исходного кода

fix bug: 货拉拉因券id而导致的核价失败

shizhongqi 2 месяцев назад
Родитель
Сommit
ef4140f384
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      common/components/delivery/services/DispatchService.php

+ 1 - 1
common/components/delivery/services/DispatchService.php

@@ -1099,7 +1099,7 @@ class DispatchService
         foreach ($priceConditions as $condition) {
             $couponId = $condition['coupon_info']['coupon_id'] ?? null;
             if (!empty($couponId)) {
-                return $couponId;
+                return (string)$couponId; //转换为字符串,以免在传递过程中丢失精度(包括传递给前端时)
             }
         }