dever 3 tahun lalu
induk
melakukan
4a272919e1
1 mengubah file dengan 24 tambahan dan 1 penghapusan
  1. 24 1
      service/agent/lib/Tool.php

+ 24 - 1
service/agent/lib/Tool.php

@@ -939,7 +939,7 @@ class Tool
         }
 
         $mobile = '15057512880,4800|15735531682,600|18968883810,1800|13850081581,6000|13858020928,1200|13859945213,4200|15258625772,3600|15359256259,8000|15359256306,6000|15578911668,600|15711544119,1200|15735531682,600|15805915398,3000|15860770901,1800|17750102683,4000|18304637959,1200|18315870187,600|18367725635,4000|18535747148,2000|18805051279,27600|18834354598,1200|19859261149,600';
-$mobile = '13581829319,8400';
+        $mobile = '13581829319,8400';
         $temp = explode('|', $mobile);
 
         foreach ($temp as $k => $v) {
@@ -1053,4 +1053,27 @@ $mobile = '13581829319,8400';
 
         return 'ok';
     }
+
+    # 处理代理费
+    public function daili_cash_api()
+    {
+        $mobile = '18457786355,13958963067,13860416916,15359256306,18285154033,18065926687,15158552052,15811582673,13348394613,18960059736,18435709683';
+
+        $cash = '480000,60000,40000,40000,60000,40000,40000,40000,400000,40000,40000';
+
+        $mobile = explode(',', $mobile);
+        $cash = explode(',', $cash);
+
+        foreach ($mobile as $k => $v) {
+            if (isset($cash[$k])) {
+                $c = $cash[$k];
+                $info = Dever::db('agent/order')->find(array('mobile' => $v, 'order_type' => 1));
+                if ($info) {
+                    Dever::db('agent/order')->update(array('where_id' => $info['id'], 'agent_cash' => $c, 'price' => $c));
+                }
+            }
+        }
+
+        return 'ok';
+    }
 }