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
649b18d4
Commit
649b18d4
authored
Feb 18, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增实体类
parent
b75cd44b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
0 deletions
+137
-0
RB_Comment_Label.cs
Mall.Model/Entity/Product/RB_Comment_Label.cs
+49
-0
RB_Comment_Label_Extend.cs
Mall.Model/Extend/Product/RB_Comment_Label_Extend.cs
+11
-0
RB_Comment_LabelRepository.cs
Mall.Repository/Product/RB_Comment_LabelRepository.cs
+77
-0
No files found.
Mall.Model/Entity/Product/RB_Comment_Label.cs
0 → 100644
View file @
649b18d4
using
System
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 商品评论标签实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Comment_Label
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 标签名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 商户号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// UpdateDate
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Comment_Label_Extend.cs
0 → 100644
View file @
649b18d4
using
Mall.Model.Entity.Product
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 商品评论标签扩展实体类
/// </summary>
public
class
RB_Comment_Label_Extend
:
RB_Comment_Label
{
}
}
Mall.Repository/Product/RB_Comment_LabelRepository.cs
0 → 100644
View file @
649b18d4
using
Mall.Model.Entity.Product
;
using
Mall.Model.Extend.Product
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Mall.Repository.Product
{
/// <summary>
/// 商品评论标签仓储层
/// </summary>
public
class
RB_Comment_LabelRepository
:
BaseRepository
<
RB_Comment_Label
>
{
/// <summary>
/// 获取评论标签分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="totalCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Comment_Label_Extend
>
GetCommentLabelPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
totalCount
,
RB_Comment_Label_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Comment_Label AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Comment_Label_Extend
.
Status
),
0
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Comment_Label_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Comment_Label_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Comment_Label_Extend
.
Id
));
return
GetPage
<
RB_Comment_Label_Extend
>(
pageIndex
,
pageSize
,
out
totalCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取评论标签列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Comment_Label_Extend
>
GetCommentLabelListRepository
(
RB_Comment_Label_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Comment_Label AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Comment_Label_Extend
.
Status
),
0
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Comment_Label_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Comment_Label_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Comment_Label_Extend
.
Id
));
return
Get
<
RB_Comment_Label_Extend
>(
builder
.
ToString
()).
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