Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chatGLM
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘坚-丰林-DEV
chatGLM
Commits
40c38579
Commit
40c38579
authored
May 09, 2023
by
文旺-丰林-DEV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix import create user issues
parent
c8affe6c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
excelTemplate.xlsx
...e/host/BBM.ChatGLM.HttpApi.Host/Excels/excelTemplate.xlsx
+0
-0
UsersAppService.cs
...-core/src/BBM.ChatGLM.Application/User/UsersAppService.cs
+9
-2
No files found.
aspnet-core/host/BBM.ChatGLM.HttpApi.Host/Excels/excelTemplate.xlsx
View file @
40c38579
No preview for this file type
aspnet-core/src/BBM.ChatGLM.Application/User/UsersAppService.cs
View file @
40c38579
...
...
@@ -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
++;
...
...
@@ -211,7 +218,7 @@ namespace BBM.ChatGLM.User
failNum
++;
xiangying
=
FailReason
(
userName
,
phoneNumber
,
userRole
,
"失败"
,
"手机号码不正确"
);
}
else
if
(!
Regex
.
IsMatch
(
phoneNumber
,
@"^(133|153|189|180|181|177|173|199|174|141
|139|138|137|136|135|134|159|158|157|150|151|152|147|188|187|182|183|184|178|198
|130|131|132|146|156|155|166|186|185|145|175|176
...
...
@@ -266,7 +273,7 @@ namespace BBM.ChatGLM.User
{
Results
=
results
,
FailNum
=
failNum
,
SuccessNum
=
(
totalRows
-
1
)
-
failNum
SuccessNum
=
noData
?
0
:
(
totalRows
-
1
)
-
failNum
};
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment