|
@@ -995,7 +995,7 @@ class User extends BaseController
|
|
|
$data = ['nickname', 'gender', 'mobile', 'education', 'birthday', 'workexperience', 'jobintention',
|
|
|
'com_cate', 'emp_time', 'address', 'eduexperience'];
|
|
|
$list = importExecl('2.xls', $data, 1);
|
|
|
-
|
|
|
+
|
|
|
$data = [];
|
|
|
$gender = ['男' => 1, '女' => 2];
|
|
|
$education = ['初中' => 1, '高中' => 2, '中技' => 3, '中专' => 4, '大专' => 5, '本科' => 6, '硕士' => 7, '博士' => 8];
|
|
@@ -1012,6 +1012,9 @@ class User extends BaseController
|
|
|
$item['mobile'] = $v['mobile'];
|
|
|
$item['education'] = $education[$v['education']];
|
|
|
$item['birthday'] = date('Y-m-d', strtotime($v['birthday']));
|
|
|
+ if (empty($workexperience[$v['workexperience']])) {
|
|
|
+ halt($v['workexperience']);
|
|
|
+ }
|
|
|
$item['workexperience'] = $workexperience[$v['workexperience']];
|
|
|
$item['jobintention'] = $jobintention[$v['jobintention']];
|
|
|
$item['com_cate'] = [];
|
|
@@ -1033,8 +1036,8 @@ class User extends BaseController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $item['address'] = $v['address'];
|
|
|
- $item['eduexperience'] = $v['eduexperience'];
|
|
|
+ $item['address'] = $v['address'] ?: '';
|
|
|
+ $item['eduexperience'] = $v['eduexperience'] ?: '';
|
|
|
|
|
|
$item['groupsid'] = 2;
|
|
|
$item['status'] = 2;
|