Commit 40c38579 authored by 文旺-丰林-DEV's avatar 文旺-丰林-DEV

fix import create user issues

parent c8affe6c
......@@ -177,6 +177,7 @@ namespace BBM.ChatGLM.User
var userName = "";
var phoneNumber = "";
var userRole = "";
var noData = false;
while (row <= totalRows)
{
......@@ -190,6 +191,12 @@ namespace BBM.ChatGLM.User
phoneNumber = Regex.Replace(phoneNumber, @"\s", "");
userRole = Regex.Replace(userRole, @"\s", "");
if (totalRows == 2 && string.IsNullOrEmpty(userName) && string.IsNullOrEmpty(phoneNumber) && string.IsNullOrEmpty(userRole))
{
noData = true;
continue;
}
if (string.IsNullOrEmpty(userName))
{
failNum++;
......@@ -266,7 +273,7 @@ namespace BBM.ChatGLM.User
{
Results = results,
FailNum = failNum,
SuccessNum = (totalRows - 1) - failNum
SuccessNum = noData ? 0 : (totalRows - 1) - failNum
};
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment