Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
9a0ed827
Commit
9a0ed827
authored
Mar 18, 2024
by
ruyun.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
19aa6aa2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
performance/Performance.Services/AllotCompute/EPImportDataService.cs
+1
-1
performance/Performance.Services/UserService.cs
+5
-5
No files found.
performance/Performance.Services/AllotCompute/EPImportDataService.cs
View file @
9a0ed827
...
@@ -301,7 +301,7 @@ public void SheetDataImport(per_allot allot)
...
@@ -301,7 +301,7 @@ public void SheetDataImport(per_allot allot)
var
connectionString
=
_configuration
.
GetValue
(
"AppConnection:PerformanceConnectionString"
,
""
);
var
connectionString
=
_configuration
.
GetValue
(
"AppConnection:PerformanceConnectionString"
,
""
);
using
var
conn
=
new
MySqlConnection
(
connectionString
);
using
var
conn
=
new
MySqlConnection
(
connectionString
);
if
(
conn
.
State
!=
ConnectionState
.
Open
)
conn
.
Open
();
if
(
conn
.
State
!=
ConnectionState
.
Open
)
conn
.
Open
();
conn
.
Execute
(
"call proc_allot_import(@AllotId);"
,
new
{
AllotId
=
allot
.
ID
});
conn
.
Execute
(
"call proc_allot_import(@AllotId);"
,
new
{
AllotId
=
allot
.
ID
}
,
commandTimeout
:
60
*
60
*
5
);
}
}
}
}
public
class
ImportData
public
class
ImportData
...
...
performance/Performance.Services/UserService.cs
View file @
9a0ed827
...
@@ -244,7 +244,7 @@ public bool SetHospital(int userId, int[] hosIDArray)
...
@@ -244,7 +244,7 @@ public bool SetHospital(int userId, int[] hosIDArray)
{
{
var
user
=
_userRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
&&
t
.
IsDelete
==
1
);
var
user
=
_userRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
&&
t
.
IsDelete
==
1
);
if
(
null
==
user
)
if
(
null
==
user
)
throw
new
PerformanceException
(
$"用户不存在 UserId:
{
userId
}
"
);
throw
new
PerformanceException
(
"用户或密码错误
"
);
var
userHospital
=
_userhospitalRepository
.
GetUserHospital
(
userId
);
var
userHospital
=
_userhospitalRepository
.
GetUserHospital
(
userId
);
bool
rmResult
=
true
,
addResult
=
true
;
bool
rmResult
=
true
,
addResult
=
true
;
...
@@ -277,7 +277,7 @@ public UserResponse UpdateSelf(UserRequest request)
...
@@ -277,7 +277,7 @@ public UserResponse UpdateSelf(UserRequest request)
{
{
var
user
=
_userRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
&&
t
.
IsDelete
==
1
);
var
user
=
_userRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
&&
t
.
IsDelete
==
1
);
if
(
null
==
user
)
if
(
null
==
user
)
throw
new
PerformanceException
(
$"用户不存在 UserId:
{
request
.
ID
}
"
);
throw
new
PerformanceException
(
"用户或密码错误
"
);
var
vlist
=
_userRepository
.
GetEntities
(
t
=>
t
.
ID
!=
user
.
ID
&&
t
.
Login
==
request
.
Login
&&
(
t
.
ParentID
==
null
||
t
.
ParentID
==
0
)
&&
t
.
IsDelete
==
1
);
var
vlist
=
_userRepository
.
GetEntities
(
t
=>
t
.
ID
!=
user
.
ID
&&
t
.
Login
==
request
.
Login
&&
(
t
.
ParentID
==
null
||
t
.
ParentID
==
0
)
&&
t
.
IsDelete
==
1
);
if
(
null
!=
vlist
&&
vlist
.
Count
()
>
0
)
if
(
null
!=
vlist
&&
vlist
.
Count
()
>
0
)
...
@@ -306,7 +306,7 @@ public UserResponse UpdatePwd(PasswordRequest request, int userId)
...
@@ -306,7 +306,7 @@ public UserResponse UpdatePwd(PasswordRequest request, int userId)
{
{
var
user
=
_userRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
&&
t
.
IsDelete
==
1
);
var
user
=
_userRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
&&
t
.
IsDelete
==
1
);
if
(
null
==
user
)
if
(
null
==
user
)
throw
new
PerformanceException
(
$"用户不存在 UserId:
{
userId
}
"
);
throw
new
PerformanceException
(
"用户或密码错误
"
);
if
(
string
.
IsNullOrEmpty
(
request
.
NewPwd
))
if
(
string
.
IsNullOrEmpty
(
request
.
NewPwd
))
throw
new
PerformanceException
(
$"新密码错误"
);
throw
new
PerformanceException
(
$"新密码错误"
);
...
@@ -416,7 +416,7 @@ public UserResponse ResetPwd(int userId, int loginUserId, string password)
...
@@ -416,7 +416,7 @@ public UserResponse ResetPwd(int userId, int loginUserId, string password)
{
{
var
user
=
_userRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
&&
t
.
IsDelete
==
1
);
var
user
=
_userRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
&&
t
.
IsDelete
==
1
);
if
(
user
==
null
)
if
(
user
==
null
)
throw
new
PerformanceException
(
$"用户不存在 UserId:
{
userId
}
"
);
throw
new
PerformanceException
(
"用户或密码错误
"
);
var
loginUser
=
_userRepository
.
GetEntity
(
t
=>
t
.
ID
==
loginUserId
);
var
loginUser
=
_userRepository
.
GetEntity
(
t
=>
t
.
ID
==
loginUserId
);
if
(
loginUser
==
null
)
if
(
loginUser
==
null
)
...
@@ -628,7 +628,7 @@ public ApiResponse DeleteUser(int userId)
...
@@ -628,7 +628,7 @@ public ApiResponse DeleteUser(int userId)
//{
//{
// var user = _userRepository.GetEntity(t => t.ID == iD && t.IsDelete == 1);
// var user = _userRepository.GetEntity(t => t.ID == iD && t.IsDelete == 1);
// if (null == user)
// if (null == user)
// throw new PerformanceException(
$"用户不存在 UserId:{iD}
");
// throw new PerformanceException(
"用户或密码错误
");
// user.IsDelete = 2;
// user.IsDelete = 2;
// var result = _userRepository.Remove(user);
// var result = _userRepository.Remove(user);
...
...
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