Explorar o código

创建订单-修复下单问题

sunxbiao hai 5 meses
pai
achega
ba6398ce04
Modificáronse 1 ficheiros con 9 adicións e 2 borrados
  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
     public function deconstructionFzonePaytype()
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
             /** @var FzonePayTypeEntity $fzonePayTypeEntity */
1762
             /** @var FzonePayTypeEntity $fzonePayTypeEntity */
1756
-            $fzonePayTypeEntity = FzonePayTypeEntity::newInstance(json_decode($this->getFzonePayType(), true));
1763
+            $fzonePayTypeEntity = FzonePayTypeEntity::newInstance($fzonePaytypeArr);
1757
             $this->setFzonePayNote($fzonePayTypeEntity->getNote());
1764
             $this->setFzonePayNote($fzonePayTypeEntity->getNote());
1758
             $this->setFzonePayTypeBySplit($fzonePayTypeEntity->getType());
1765
             $this->setFzonePayTypeBySplit($fzonePayTypeEntity->getType());
1759
             // 验证支付方式
1766
             // 验证支付方式