rabin 3 years ago
parent
commit
816e4284b5
2 changed files with 8 additions and 2 deletions
  1. 1 1
      service/agent/database/import_log.php
  2. 7 1
      service/agent/lib/Import.php

+ 1 - 1
service/agent/database/import_log.php

@@ -125,7 +125,7 @@ return array
             'desc'      => '导入后数据',
             'match'     => 'is_numeric',
             'update'  	=> 'text',
-            'list'      => true,
+            'list'      => '{type} == 5 ? "无对应关系,无法导入" : "{after}"',
         ),
 
         'status'        => array

+ 7 - 1
service/agent/lib/Import.php

@@ -87,7 +87,13 @@ class Import
                 $data = array();
                 $data['id'] = $v['id'];
                 $data['mobile'] = $v['mobile'];
+                if (!$v['mobile']) {
+                    $v['mobile'] = '12345';
+                }
                 $data['name'] = $v['realname'];
+                if (!$data['name']) {
+                    $data['name'] = 'boss';
+                }
                 $data['avatar'] = $v['avatar'];
                 $data['username'] = $v['nickname'];
                 $data['mid'] = $v['id'];
@@ -386,7 +392,7 @@ class Import
         $data['type'] = $type;
         $data['before'] = $before;
         $data['after'] = $after;
-        if ($type == 5) {
+        if ($type == 4) {
             $data['status'] = 2;
         }
         Dever::db('agent/import_log')->insert($data);