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
b6e20129
Commit
b6e20129
authored
Feb 25, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增查询条件
parent
601527c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
RB_Education_Activity_Extend.cs
Mall.Model/Extend/Education/RB_Education_Activity_Extend.cs
+5
-0
RB_Education_ActivityRepository.cs
Mall.Repository/Education/RB_Education_ActivityRepository.cs
+7
-2
AppletEducationController.cs
...WebApi/Controllers/Education/AppletEducationController.cs
+1
-0
No files found.
Mall.Model/Extend/Education/RB_Education_Activity_Extend.cs
View file @
b6e20129
...
...
@@ -196,5 +196,10 @@ namespace Mall.Model.Extend.Education
/// 教育erp学生id
/// </summary>
public
int
EduStudentId
{
get
;
set
;
}
/// <summary>
/// 是否查询有封面图的活动
/// </summary>
public
string
IsQueryCoverImage
{
get
;
set
;
}
}
}
Mall.Repository/Education/RB_Education_ActivityRepository.cs
View file @
b6e20129
...
...
@@ -55,7 +55,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Education_Activity_Extend
.
ActivityType
),
query
.
ActivityType
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
IsQueryCoverImage
)
&&
query
.
IsQueryCoverImage
==
"1"
)
{
builder
.
AppendFormat
(
" AND IFNULL(A.{0},'')<>'' "
,
nameof
(
RB_Education_Activity_Extend
.
CoverImg
));
}
if
(
query
.
SelectIsEnd
==
1
)
{
builder
.
AppendFormat
(
$" and DATE_FORMAT(a.
{
nameof
(
RB_Education_Activity_Extend
.
EndTime
)}
,'%Y-%m-%d' )< DATE_FORMAT(NOW(),'%Y-%m-%d' ) "
);
...
...
@@ -75,7 +78,8 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Education_Activity_Extend
.
StartTime
));
}
else
{
else
{
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
OrderByStr
))
{
builder
.
AppendFormat
(
$" ORDER BY A.
{
query
.
OrderByStr
}
asc"
);
...
...
@@ -85,6 +89,7 @@ WHERE 1=1
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Education_Activity_Extend
.
Id
));
}
}
}
return
GetPage
<
RB_Education_Activity_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
Mall.WebApi/Controllers/Education/AppletEducationController.cs
View file @
b6e20129
...
...
@@ -2474,6 +2474,7 @@ namespace Mall.WebApi.Controllers.Education
ActivityName
=
jObj
.
GetStringValue
(
"ActivityName"
),
ActivityType
=
jObj
.
GetInt
(
"ActivityType"
,
0
),
};
query
.
IsQueryCoverImage
=
"1"
;
query
.
SelectStartTimeStr
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
query
.
SelectEndTimeStr
=
System
.
DateTime
.
Now
.
AddDays
(
60
).
ToString
(
"yyyy-MM-dd"
);
query
.
OrderByStr
=
"StartTime"
;
...
...
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