Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
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
黄奎
Education
Commits
ea33105e
Commit
ea33105e
authored
3 years ago
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
79809223
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
RB_Order_GuestRepository.cs
Edu.Repository/Course/RB_Order_GuestRepository.cs
+14
-11
No files found.
Edu.Repository/Course/RB_Order_GuestRepository.cs
View file @
ea33105e
...
...
@@ -73,45 +73,48 @@ namespace Edu.Repository.Course
/// <returns></returns>
public
List
<
RB_Order_Guest_ViewModel
>
GetList_V2
(
RB_Order_Guest_ViewModel
demodel
)
{
string
where
=
$@"
1=1 and Status=0
"
;
string
where
=
$@" "
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Order_Guest_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
where
+=
$@" and
a.
{
nameof
(
RB_Order_Guest_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
School_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Order_Guest_ViewModel
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
;
where
+=
$@" and
a.
{
nameof
(
RB_Order_Guest_ViewModel
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
;
}
if
(
demodel
.
Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Order_Guest_ViewModel
.
Id
)}
=
{
demodel
.
Id
}
"
;
where
+=
$@" and
a.
{
nameof
(
RB_Order_Guest_ViewModel
.
Id
)}
=
{
demodel
.
Id
}
"
;
}
if
(
demodel
.
OrderId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Order_Guest_ViewModel
.
OrderId
)}
=
{
demodel
.
OrderId
}
"
;
where
+=
$@" and
a.
{
nameof
(
RB_Order_Guest_ViewModel
.
OrderId
)}
=
{
demodel
.
OrderId
}
"
;
}
if
(
demodel
.
ClassId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Order_Guest_ViewModel
.
ClassId
)}
=
{
demodel
.
ClassId
}
"
;
where
+=
$@" and
a.
{
nameof
(
RB_Order_Guest_ViewModel
.
ClassId
)}
=
{
demodel
.
ClassId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
OrderIds
))
{
where
+=
$@" and
{
nameof
(
RB_Order_Guest_ViewModel
.
OrderId
)}
in(
{
demodel
.
OrderIds
}
)"
;
where
+=
$@" and
a.
{
nameof
(
RB_Order_Guest_ViewModel
.
OrderId
)}
in(
{
demodel
.
OrderIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ClassIds
))
{
where
+=
$@" and
{
nameof
(
RB_Order_Guest_ViewModel
.
ClassId
)}
in(
{
demodel
.
ClassIds
}
)"
;
where
+=
$@" and
a.
{
nameof
(
RB_Order_Guest_ViewModel
.
ClassId
)}
in(
{
demodel
.
ClassIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
GuestName
))
{
where
+=
$@" and
{
nameof
(
RB_Order_Guest_ViewModel
.
GuestName
)}
like '%
{
demodel
.
GuestName
}
%'"
;
where
+=
$@" and
a.
{
nameof
(
RB_Order_Guest_ViewModel
.
GuestName
)}
like '%
{
demodel
.
GuestName
}
%'"
;
}
if
(
demodel
.
GuestState
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Order_Guest_ViewModel
.
GuestState
)}
=
{
demodel
.
GuestState
}
"
;
where
+=
$@" and
a.
{
nameof
(
RB_Order_Guest_ViewModel
.
GuestState
)}
=
{
demodel
.
GuestState
}
"
;
}
string
sql
=
$@" select * from RB_Order_Guest where
{
where
}
"
;
string
sql
=
$@" SELECT A.* ,IFNULL(course.CourseName,'') AS CourseName,tOrder.CourseId,tOrder.OrderType,tOrder.StartClassHours,tOrder.IsChaBan
FROM RB_Order_Guest AS A LEFT JOIN RB_Order as tOrder ON A.OrderId=tOrder.OrderId
LEFT JOIN rb_course AS course ON (tOrder.CourseId=course.CourseId AND tOrder.CourseId>0 AND tOrder.OrderType=1)
WHERE 1=1 AND A.Status=0
{
where
}
"
;
return
Get
<
RB_Order_Guest_ViewModel
>(
sql
).
ToList
();
}
...
...
This diff is collapsed.
Click to expand it.
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