rabin 2 years ago
parent
commit
f3e193a677
1 changed files with 26 additions and 0 deletions
  1. 26 0
      service/agent/lib/Import.php

+ 26 - 0
service/agent/lib/Import.php

@@ -522,6 +522,32 @@ class Import
         }
     }
 
+    # 同步团队业绩
+    public function group_api()
+    {
+        $data = Dever::db('agent/member')->select();
+        if ($data) {
+            foreach ($data as $k => $v) {
+
+                $info = $this->db->fetch('select * from ims_ewei_shop_member where id =' . $v['id']);
+                if (!$info) {
+                    continue;
+                }
+                if (!$info['allcommission']) {
+                    continue;
+                }
+                $update = array();
+                $update['old_group_sell'] = $info['allcommission'];
+                $update['group_sell'] = $info['allcommission'];
+
+                $update['where_id'] = $v['id'];
+                Dever::db('agent/member')->update($update);
+                echo $v['id'];
+                echo "\r\n";
+            }
+        }
+    }
+
     # 导入创客名额
     public function chuangke_api()
     {