shish 2 лет назад
Родитель
Сommit
5127148abd
1 измененных файлов с 9 добавлено и 7 удалено
  1. 9 7
      app-ghs/controllers/TestController.php

+ 9 - 7
app-ghs/controllers/TestController.php

@@ -55,15 +55,17 @@ class TestController extends BaseController
                 $capitalType = $change['capitalType'] ?? 0;
                 $relateId = $change['relateId'] ?? 0;
                 $amount = $change['amount'] ?? 0;
-                if ($capitalType == 40) {
-                    if (strpos($event, '退款') === false) {
-                        $flag['40-' . $relateId] = $amount;
-                    } else {
-                        $flag['33-' . $relateId] = $amount;
-                    }
-                } else {
+
+                if (strpos($event, '购买花材') !== false) {
+                    $flag['40-' . $relateId] = $amount;
+                }
+                if (strpos($event, '退款') !== false) {
+                    $flag['33-' . $relateId] = $amount;
+                }
+                if (strpos($event, '结账') !== false) {
                     $flag['20-' . $relateId] = $amount;
                 }
+
             }
         }
         print_r($flag);