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
b7da5b1b
Commit
b7da5b1b
authored
Feb 25, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增活动评论
parent
8ef51466
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
402 additions
and
93 deletions
+402
-93
RB_Commerce_Comment.cs
Mall.Model/Entity/TradePavilion/RB_Commerce_Comment.cs
+111
-0
RB_Commerce_Comment_Extend.cs
....Model/Extend/TradePavilion/RB_Commerce_Comment_Extend.cs
+15
-0
CommerceCommentModule.cs
Mall.Module.TradePavilion/CommerceCommentModule.cs
+62
-0
RB_Commerce_CommentRepository.cs
...Repository/TradePavilion/RB_Commerce_CommentRepository.cs
+64
-0
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+150
-93
No files found.
Mall.Model/Entity/TradePavilion/RB_Commerce_Comment.cs
0 → 100644
View file @
b7da5b1b
using
Mall.Common.Enum
;
using
Mall.Common.Enum.Goods
;
using
Mall.Common.Enum.User
;
using
System
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.TradePavilion
{
/// <summary>
/// 商会活动评论表实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Commerce_Comment
{
/// <summary>
/// 主键编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 活动编号
/// </summary>
public
int
ActivityId
{
get
;
set
;
}
/// <summary>
/// 用户编号
/// </summary>
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// 客人名称
/// </summary>
public
string
UserName
{
get
;
set
;
}
/// <summary>
/// 用户头像
/// </summary>
public
string
UserPhoto
{
get
;
set
;
}
/// <summary>
/// 评分 1-5分
/// </summary>
public
int
CommentScore
{
get
;
set
;
}
/// <summary>
/// 评论类型 1 好评 2中评 3差评
/// </summary>
public
GoodsCommentTypeEnum
CommentGrade
{
get
;
set
;
}
/// <summary>
/// 评论内容
/// </summary>
public
string
Content
{
get
;
set
;
}
/// <summary>
/// 评论图片
/// </summary>
public
string
CommentImage
{
get
;
set
;
}
/// <summary>
/// 回复
/// </summary>
public
string
Reply
{
get
;
set
;
}
/// <summary>
/// 来源
/// </summary>
public
UserSourceEnum
PlatformSource
{
get
;
set
;
}
/// <summary>
/// 是否置顶 1是 2否
/// </summary>
public
int
Is_Top
{
get
;
set
;
}
/// <summary>
/// 是否显示 1是 2否
/// </summary>
public
int
Is_Show
{
get
;
set
;
}
/// <summary>
/// 是否匿名 1是 2否
/// </summary>
public
int
Is_Anonymity
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
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/TradePavilion/RB_Commerce_Comment_Extend.cs
0 → 100644
View file @
b7da5b1b
using
Mall.Model.Entity.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Extend.TradePavilion
{
/// <summary>
/// 商会活动评论表扩展实体类
/// </summary>
public
class
RB_Commerce_Comment_Extend
:
RB_Commerce_Comment
{
}
}
Mall.Module.TradePavilion/CommerceCommentModule.cs
0 → 100644
View file @
b7da5b1b
using
Mall.Common.Enum
;
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Repository.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Module.TradePavilion
{
/// <summary>
/// 活动评论处理类
/// </summary>
public
class
CommerceCommentModule
{
/// <summary>
/// 商会活动评论表仓储层对象
/// </summary>
private
readonly
RB_Commerce_CommentRepository
commerce_CommentRepository
=
new
RB_Commerce_CommentRepository
();
/// <summary>
/// 获取活动评论分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Commerce_Comment_Extend
>
GetCommerceCommentPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Commerce_Comment_Extend
query
)
{
return
commerce_CommentRepository
.
GetCommerceCommentPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
).
ToList
();
}
/// <summary>
/// 新增活动评论
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetCommerceCommentModule
(
RB_Commerce_Comment_Extend
model
)
{
var
newId
=
commerce_CommentRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
bool
flag
=
newId
>
0
;
return
flag
;
}
/// <summary>
/// 删除活动评论
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
bool
RemoveCommerceCommentModule
(
int
Id
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Commerce_Comment_Extend
.
Id
),(
int
)
DateStateEnum
.
Delete
}
};
return
commerce_CommentRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Commerce_Comment_Extend
.
Id
),
Id
));
}
}
}
Mall.Repository/TradePavilion/RB_Commerce_CommentRepository.cs
0 → 100644
View file @
b7da5b1b
using
Mall.Common.Enum
;
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Mall.Repository.TradePavilion
{
/// <summary>
/// 商会活动评论表仓储层
/// </summary>
public
class
RB_Commerce_CommentRepository
:
BaseRepository
<
RB_Commerce_Comment
>
{
/// <summary>
/// 获取活动评论分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Commerce_Comment_Extend
>
GetCommerceCommentPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Commerce_Comment_Extend
query
)
{
rowsCount
=
0
;
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM rb_commerce_comment
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Comment_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
==
null
)
{
return
new
List
<
RB_Commerce_Comment_Extend
>();
}
else
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Comment_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Comment_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Content
))
{
builder
.
AppendFormat
(
" AND {0} LIKE @Name "
,
nameof
(
RB_Commerce_Comment_Extend
.
Content
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
Content
.
Trim
()
+
"%"
);
}
if
(
query
.
ActivityId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Comment_Extend
.
ActivityId
),
query
.
ActivityId
);
}
}
return
GetPage
<
RB_Commerce_Comment_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
\ No newline at end of file
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
b7da5b1b
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