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

创建订单-修复下单问题

sunxbiao месяцев назад: 5
Родитель
Сommit
ba6398ce04
1 измененных файлов с 9 добавлено и 2 удалено
  1. 9 2
      app/entity/data/store/StoreOrderEntity.php

+ 9 - 2
app/entity/data/store/StoreOrderEntity.php

@@ -1751,9 +1751,16 @@ class StoreOrderEntity extends DataEntity
1751 1751
 
1752 1752
     public function deconstructionFzonePaytype()
1753 1753
     {
1754
-        if (!empty($this->getFzonePayType()) && is_array(json_decode($this->getFzonePayType(), true))) {
1754
+        if (!empty($this->getFzonePaytype())) {
1755
+            $fzonePaytypeArr = [];
1756
+            if (is_array($this->getFzonePaytype())) {
1757
+                $fzonePaytypeArr = $this->getFzonePaytype();
1758
+            } else if (is_string($this->getFzonePaytype())) {
1759
+                $fzonePaytypeArr = json_decode($this->getFzonePaytype(), true);
1760
+            }
1761
+
1755 1762
             /** @var FzonePayTypeEntity $fzonePayTypeEntity */
1756
-            $fzonePayTypeEntity = FzonePayTypeEntity::newInstance(json_decode($this->getFzonePayType(), true));
1763
+            $fzonePayTypeEntity = FzonePayTypeEntity::newInstance($fzonePaytypeArr);
1757 1764
             $this->setFzonePayNote($fzonePayTypeEntity->getNote());
1758 1765
             $this->setFzonePayTypeBySplit($fzonePayTypeEntity->getType());
1759 1766
             // 验证支付方式