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
b0b669f9
Commit
b0b669f9
authored
Sep 02, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评论调整
parent
575b41e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
RB_Goods_Comment.cs
Mall.Model/Entity/Product/RB_Goods_Comment.cs
+4
-0
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+11
-4
No files found.
Mall.Model/Entity/Product/RB_Goods_Comment.cs
View file @
b0b669f9
...
...
@@ -64,6 +64,10 @@ namespace Mall.Model.Entity.Product
set
;
}
/// <summary>
/// 评分 1-5分
/// </summary>
public
int
?
CommentScore
{
get
;
set
;
}
/// <summary>
/// 评论内容
/// </summary>
public
string
Content
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
b0b669f9
...
...
@@ -901,6 +901,7 @@ namespace Mall.WebApi.Controllers.MallBase
UserPhotoPath
=
x
.
UserPhotoPath
??
""
,
x
.
CommentGrade
,
CommentGradeName
=
x
.
CommentGrade
.
GetEnumName
(),
x
.
CommentScore
,
x
.
CommentImgList
,
x
.
Content
,
x
.
Reply
,
...
...
@@ -948,15 +949,21 @@ namespace Mall.WebApi.Controllers.MallBase
{
return
ApiResult
.
ParamIsNull
(
"请输入评价内容"
);
}
if
(!
demodel
.
CommentGrade
.
HasValue
)
{
return
ApiResult
.
ParamIsNull
(
"请选择评分"
);
}
demodel
.
CommentImage
=
""
;
if
(
demodel
.
CommentImgList
!=
null
&&
demodel
.
CommentImgList
.
Any
())
{
demodel
.
CommentImage
=
JsonConvert
.
SerializeObject
(
demodel
.
CommentImgList
);
}
demodel
.
CommentGrade
??=
Common
.
Enum
.
Goods
.
GoodsCommentTypeEnum
.
Praise
;
demodel
.
CommentScore
??=
5
;
if
(
demodel
.
CommentScore
==
3
||
demodel
.
CommentScore
==
2
)
{
demodel
.
CommentGrade
=
Common
.
Enum
.
Goods
.
GoodsCommentTypeEnum
.
Medium
;
}
else
if
(
demodel
.
CommentScore
==
1
)
{
demodel
.
CommentGrade
=
Common
.
Enum
.
Goods
.
GoodsCommentTypeEnum
.
Negative
;
}
demodel
.
UserPhoto
??=
0
;
demodel
.
Is_Top
??=
2
;
demodel
.
Is_Show
??=
1
;
...
...
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