Explorar o código

分期商品增bugfix

kevin_zhangl %!s(int64=2) %!d(string=hai) anos
pai
achega
0ceb40d2f6
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      common/models/DeclarationLevel.php

+ 3 - 2
common/models/DeclarationLevel.php

@@ -163,9 +163,10 @@ class DeclarationLevel extends \common\components\ActiveRecord
     {
         $result = [];
         $decLv = static::find()->where('1=1')->indexBy('ID')->orderBy('SORT ASC')->asArray()->all();
+        $current = $decLv[$decLvID]['SORT'] ?? '';
         foreach ($decLv as $id => $item) {
-            if ($decLvID == $id) {
-                $result = next($decLv);
+            if ($item['SORT'] == $current + 1) {
+                $result = $item;
                 break;
             }
         }