Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
aad874b8
Commit
aad874b8
authored
Dec 31, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
60863148
3736b9dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
EmployeeModule.cs
Mall.Module.User/EmployeeModule.cs
+3
-2
RB_EmployeeRepository.cs
Mall.Repository/User/RB_EmployeeRepository.cs
+5
-2
EmployeeController.cs
Mall.WebApi/Controllers/User/EmployeeController.cs
+2
-1
No files found.
Mall.Module.User/EmployeeModule.cs
View file @
aad874b8
...
...
@@ -245,12 +245,13 @@ namespace Mall.Module.User
/// 删除员工
/// </summary>
/// <param name="EmpId"></param>
/// <param name="status">1-删除,0-恢复</param>
/// <returns></returns>
public
bool
RemoveEmployeeModule
(
object
EmpId
)
public
bool
RemoveEmployeeModule
(
object
EmpId
,
int
status
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Employee_Extend
.
Status
),
1
},
{
nameof
(
RB_Employee_Extend
.
Status
),
status
},
};
bool
flag
=
employeeRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Employee_Extend
.
EmpId
),
EmpId
));
return
flag
;
...
...
Mall.Repository/User/RB_EmployeeRepository.cs
View file @
aad874b8
...
...
@@ -23,7 +23,7 @@ namespace Mall.Repository.User
public
List
<
RB_Employee_Extend
>
GetEmployeePageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Employee_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Employee WHERE 1=1
AND Status=0
"
);
builder
.
AppendFormat
(
@" SELECT * FROM RB_Employee WHERE 1=1 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Employee_Extend
.
TenantId
),
query
.
TenantId
);
...
...
@@ -40,7 +40,10 @@ namespace Mall.Repository.User
{
builder
.
AppendFormat
(
" AND {0} LIKE '%{1}%' "
,
nameof
(
RB_Employee_Extend
.
EmpName
),
query
.
EmpName
.
Trim
());
}
if
(
query
.
Status
>=
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Employee_Extend
.
Status
),
query
.
Status
);
}
return
GetPage
<
RB_Employee_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
...
...
Mall.WebApi/Controllers/User/EmployeeController.cs
View file @
aad874b8
...
...
@@ -195,7 +195,8 @@ namespace Mall.WebApi.Controllers.User
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
EmpId
=
parms
.
GetInt
(
"EmpId"
,
0
);
var
flag
=
module
.
RemoveEmployeeModule
(
EmpId
);
int
status
=
parms
.
GetInt
(
"status"
,
0
);
var
flag
=
module
.
RemoveEmployeeModule
(
EmpId
,
status
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
...
...
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