修复导入用户bug

This commit is contained in:
lcc
2025-07-31 17:56:48 +08:00
parent becd02dbb1
commit 36ba122e00
2 changed files with 9 additions and 3 deletions
+3
View File
@@ -126,7 +126,10 @@ class Login extends BaseController
}
$this->return_response('短信验证码发送成功, 请注意查收!');
}
public function index_get()
{
}
/**
* Notes:忘记密码
* Created on: 2022/10/13 15:34
@@ -91,7 +91,7 @@ class User extends BaseController
public function groupType_get()
{
$res = Pingan_users_model::TYPE_CN;
unset($res[Pingan_users_model::GROUP_TYPE_TEAM_CONTACT],$res[Pingan_users_model::GROUP_TYPE_SUPER_ADMIN]);
unset($res[Pingan_users_model::GROUP_TYPE_TEAM_CONTACT], $res[Pingan_users_model::GROUP_TYPE_SUPER_ADMIN]);
$this->return_response($res);
}
@@ -258,6 +258,9 @@ class User extends BaseController
$cityId = $objWorksheet->getCell('J' . $i)->getValue();
$cityName = $objWorksheet->getCell('K' . $i)->getValue();
$groupType = $objWorksheet->getCell('L' . $i)->getValue();
if (!$userCode) {
continue;
}
$importData = [
$name, $userCode, $teamName, $teamCode, $depName, $depCode,
$areaName, $areaCode, $number, $cityId, $cityName, $groupType
@@ -291,7 +294,7 @@ class User extends BaseController
if ($depCode) { //获取部门用户uid
$depRow = $this->pinganUsers->get(['userCode' => $depCode]);
if ($depRow) {
$depUserId = $areaRow['id'];
$depUserId = $depRow['id'];
} else {
$depAddData = [
'username' => $depName,
@@ -313,7 +316,7 @@ class User extends BaseController
if ($teamCode) { //获取团队用户id
$teamRow = $this->pinganUsers->get(['userCode' => $teamCode]);
if ($teamRow) {
$teamUserId = $areaRow['id'];
$teamUserId = $teamRow['id'];
} else {
$teamAddData = [
'username' => $teamName,