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
Hide 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
...
...
@@ -18,7 +18,7 @@ namespace Mall.Module.Education
/// </summary>
private
readonly
RB_Education_TeacherRepository
educationTeacherRepository
=
new
RB_Education_TeacherRepository
();
private
readonly
RB_Education_CouponRepository
discountCouponRepository
=
new
RB_Education_CouponRepository
();
private
readonly
RB_Education_CouponProductRepository
productRepository
=
new
RB_Education_CouponProductRepository
();
...
...
@@ -35,10 +35,16 @@ namespace Mall.Module.Education
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
/// <summary>
///
会员信息
///
资讯
/// </summary>
private
readonly
RB_Education_ArticleRepository
educationArticleRepository
=
new
RB_Education_ArticleRepository
();
/// <summary>
/// 资讯评论信息
/// </summary>
private
readonly
RB_Education_ArticleCommentRepository
educationArticleCommentRepository
=
new
RB_Education_ArticleCommentRepository
();
#
region
教师管理
/// <summary>
///教师配置列表
...
...
@@ -283,7 +289,7 @@ namespace Mall.Module.Education
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Education_CouponProduct
.
CouponId
),
FiledValue
=
id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
productRepository
.
Update
(
fileds
,
whereHelpers
,
trans
);
if
(
model
.
ProductList
!=
null
&&
model
.
ProductList
.
Any
())
{
model
.
ProductList
.
ForEach
(
x
=>
x
.
DiscountCouponType
=
model
.
UseType
);
...
...
@@ -651,7 +657,7 @@ namespace Mall.Module.Education
{
id
=
model
.
ID
;
flag
=
selfMotionRepository
.
Update
(
model
,
trans
);
IDictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Education_CouponSelfMotionMember
.
Status
),
1
},
...
...
@@ -961,7 +967,7 @@ namespace Mall.Module.Education
/// <param name="gradeId"></param>
/// <param name="uid"></param>
/// <returns></returns>
public
bool
DelArticleInfo
(
List
<
string
>
ids
,
int
uid
,
int
mallBaseId
)
public
bool
DelArticleInfo
(
List
<
string
>
ids
,
int
uid
,
int
mallBaseId
)
{
var
trans
=
educationArticleRepository
.
DbTransaction
;
bool
flag
=
false
;
...
...
@@ -1008,5 +1014,20 @@ namespace Mall.Module.Education
}
#
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.Extend.Education
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Mall.Repository.Education
...
...
@@ -11,5 +13,58 @@ namespace Mall.Repository.Education
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