|
@@ -576,6 +576,29 @@ class Import
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public function invite_code_api()
|
|
|
+ {
|
|
|
+ $data = Dever::db('agent/order')->select();
|
|
|
+ if ($data) {
|
|
|
+ foreach ($data as $k => $v) {
|
|
|
+
|
|
|
+ if ($v['parent_mid'] && $v['parent_mid'] > 0) {
|
|
|
+ $parent_code = Dever::load("invite/api.code", $v['parent_mid']);
|
|
|
+
|
|
|
+ if ($parent_code) {
|
|
|
+ $update = array();
|
|
|
+ $update['parent_code'] = $parent_code;
|
|
|
+ $update['where_id'] = $v['id'];
|
|
|
+ Dever::db('agent/order')->update($update);
|
|
|
+ echo $v['id'];
|
|
|
+ echo "\r\n";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public function log($mid, $type, $before, $after, $update = false)
|
|
|
{
|