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
2e22fd10
Commit
2e22fd10
authored
Sep 21, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
34dd276f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
5 deletions
+81
-5
EducationModule.cs
Mall.Module.Education/EducationModule.cs
+26
-5
RB_Education_ArticleCommentRepository.cs
...sitory/Education/RB_Education_ArticleCommentRepository.cs
+55
-0
No files found.
Mall.Module.Education/EducationModule.cs
View file @
2e22fd10
...
@@ -35,10 +35,16 @@ namespace Mall.Module.Education
...
@@ -35,10 +35,16 @@ namespace Mall.Module.Education
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
/// <summary>
/// <summary>
///
会员信息
///
资讯
/// </summary>
/// </summary>
private
readonly
RB_Education_ArticleRepository
educationArticleRepository
=
new
RB_Education_ArticleRepository
();
private
readonly
RB_Education_ArticleRepository
educationArticleRepository
=
new
RB_Education_ArticleRepository
();
/// <summary>
/// 资讯评论信息
/// </summary>
private
readonly
RB_Education_ArticleCommentRepository
educationArticleCommentRepository
=
new
RB_Education_ArticleCommentRepository
();
#
region
教师管理
#
region
教师管理
/// <summary>
/// <summary>
///教师配置列表
///教师配置列表
...
@@ -1008,5 +1014,20 @@ namespace Mall.Module.Education
...
@@ -1008,5 +1014,20 @@ namespace Mall.Module.Education
}
}
#
endregion
#
endregion
#
region
教育
-
资讯评论管理
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Education_ArticleComment_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Education_ArticleComment_Extend
dmodel
)
{
return
educationArticleCommentRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
dmodel
);
}
#
endregion
}
}
}
}
Mall.Repository/Education/RB_Education_ArticleCommentRepository.cs
View file @
2e22fd10
using
Mall.Model.Entity.Education
;
using
Mall.Model.Entity.Education
;
using
Mall.Model.Extend.Education
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
namespace
Mall.Repository.Education
namespace
Mall.Repository.Education
...
@@ -11,5 +13,58 @@ namespace Mall.Repository.Education
...
@@ -11,5 +13,58 @@ namespace Mall.Repository.Education
public
class
RB_Education_ArticleCommentRepository
:
BaseRepository
<
RB_Education_ArticleComment
>
public
class
RB_Education_ArticleCommentRepository
:
BaseRepository
<
RB_Education_ArticleComment
>
{
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_Education_ArticleComment
);
}
}
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Education_ArticleComment_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Education_ArticleComment_Extend
dmodel
)
{
string
where
=
$" 1=1 and c.
{
nameof
(
RB_Education_ArticleComment
.
Status
)}
=0 "
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Education_ArticleComment
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Education_ArticleComment
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
ID
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Education_ArticleComment
.
ID
)}
=
{
dmodel
.
ID
}
"
;
}
if
(
dmodel
.
CommentGrade
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Education_ArticleComment
.
CommentGrade
)}
=
{(
int
)
dmodel
.
CommentGrade
}
"
;
}
if
(
dmodel
.
PlatformSource
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Education_ArticleComment
.
PlatformSource
)}
=
{(
int
)
dmodel
.
PlatformSource
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserName
))
{
where
+=
$@" and c.
{
nameof
(
RB_Education_ArticleComment
.
UserName
)}
like '%
{
dmodel
.
UserName
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
ArticleName
))
{
where
+=
$@" and g.
{
nameof
(
RB_Education_Article
.
Name
)}
like '%
{
dmodel
.
ArticleName
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Content
))
{
where
+=
$@" and c.
{
nameof
(
RB_Education_ArticleComment
.
Content
)}
like '%
{
dmodel
.
Content
}
%'"
;
}
string
sql
=
$@"SELECT c.*,g.Name as ArticleName FROM
{
TableName
}
c
left join rb_education_article g on c.ArticleId = g.Id
where
{
where
}
order by c.Id desc"
;
return
GetPage
<
RB_Education_ArticleComment_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
}
}
}
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