Explorar el Código

fix(order): 修复次卡兑换码交付类型的名称映射问题

- 添加 delivery_type 为 3 时的名称映射逻辑
- 将 delivery_name 数字值转换为对应的中文描述
- 确保次卡兑换码类型的订单数据正确更新
shichen hace 4 meses
padre
commit
40fca81a8c
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      app/common/repositories/store/order/StoreOrderRepository.php

+ 6 - 0
app/common/repositories/store/order/StoreOrderRepository.php

@@ -5009,6 +5009,12 @@ class StoreOrderRepository extends BaseRepository
5009 5009
         }
5010 5010
         if ($data['delivery_type'] == 2 && !preg_match("/^1[3456789]{1}\d{9}$/", $data['delivery_id']))
5011 5011
             throw new ValidateException('手机号格式错误');
5012
+        if ($data['delivery_type'] == 3) {
5013
+            $map = [
5014
+                1=>'次卡兑换码',
5015
+            ];
5016
+            $data['delivery_name'] = $map[$data['delivery_name']];
5017
+        }
5012 5018
         $this->dao->update($id, $data);
5013 5019
 
5014 5020
         if ($data['delivery_type'] == 1) {