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
98414202
Commit
98414202
authored
Feb 28, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
f483b225
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
24 deletions
+42
-24
OrderModule_Part.cs
Mall.Module.Product/OrderModule_Part.cs
+38
-21
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+4
-3
No files found.
Mall.Module.Product/OrderModule_Part.cs
View file @
98414202
...
...
@@ -8468,46 +8468,52 @@ namespace Mall.Module.Product
}
/// <summary>
/// 批量操作
/// </summary>
/// <param name="commentIds"></param>
/// <param name="Id">评论Id</param>
/// <param name="orderDetailIds"></param>
/// <param name="type"></param>
/// <param name="content"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
SetCommentBatchByOrderDetailId
(
string
orderDetailIds
,
int
type
,
string
content
,
int
tenantId
,
int
mallBaseId
)
public
bool
SetCommentBatchByOrderDetailId
Module
(
int
Id
,
string
orderDetailIds
,
int
type
,
string
content
,
int
tenantId
,
int
mallBaseId
)
{
bool
flag
=
false
;
//1批量回复 2批量隐藏 3批量显示 4批量置顶 5取消置顶 6批量删除
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
};
//回复
if
(
type
==
1
)
{
//回复
{
keyValues
.
Add
(
nameof
(
RB_Goods_Comment
.
Reply
),
content
);
keyValues
.
Add
(
nameof
(
RB_Goods_Comment
.
UpdateDate
),
DateTime
.
Now
);
}
//隐藏
else
if
(
type
==
2
)
{
//影藏
{
keyValues
.
Add
(
nameof
(
RB_Goods_Comment
.
Is_Show
),
2
);
keyValues
.
Add
(
nameof
(
RB_Goods_Comment
.
UpdateDate
),
DateTime
.
Now
);
}
//显示
else
if
(
type
==
3
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_Comment
.
Is_Show
),
1
);
keyValues
.
Add
(
nameof
(
RB_Goods_Comment
.
UpdateDate
),
DateTime
.
Now
);
}
//置顶
else
if
(
type
==
4
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_Comment
.
Is_Top
),
1
);
keyValues
.
Add
(
nameof
(
RB_Goods_Comment
.
UpdateDate
),
DateTime
.
Now
);
}
//取消置顶
else
if
(
type
==
5
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_Comment
.
Is_Top
),
2
);
keyValues
.
Add
(
nameof
(
RB_Goods_Comment
.
UpdateDate
),
DateTime
.
Now
);
}
//批量删除
else
if
(
type
==
6
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_Comment
.
Status
),
1
);
...
...
@@ -8518,24 +8524,35 @@ namespace Mall.Module.Product
return
false
;
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Comment
.
OrderDetailId
),
FiledValue
=
orderDetailIds
,
OperatorEnum
=
OperatorEnum
.
IN
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Comment
.
TenantId
),
FiledValue
=
tenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Goods_Comment
.
TenantId
),
FiledValue
=
tenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Comment
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Goods_Comment
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
goods_CommentRepository
.
Update
(
keyValues
,
wheres
);
if
(
Id
>
0
||
!
string
.
IsNullOrEmpty
(
orderDetailIds
))
{
if
(
Id
>
0
)
{
wheres
.
Add
(
new
WhereHelper
(
nameof
(
RB_Goods_Comment
.
Id
),
Id
));
}
if
(!
string
.
IsNullOrEmpty
(
orderDetailIds
))
{
wheres
.
Add
(
new
WhereHelper
(
nameof
(
RB_Goods_Comment
.
OrderDetailId
),
orderDetailIds
,
OperatorEnum
.
IN
));
}
flag
=
goods_CommentRepository
.
Update
(
keyValues
,
wheres
);
}
return
flag
;
}
/// <summary>
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
98414202
...
...
@@ -4899,10 +4899,11 @@ namespace Mall.WebApi.Controllers.MallBase
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
Id
=
parms
.
GetInt
(
"Id"
);
string
orderDetailIds
=
parms
.
GetStringValue
(
"OrderDetailIds"
);
int
Type
=
parms
.
GetInt
(
"Type"
,
1
);
//1批量回复 2批量隐藏 3批量显示 4批量置顶 5取消置顶 6批量删除
string
Content
=
parms
.
GetStringValue
(
"Content"
);
if
(
string
.
IsNullOrEmpty
(
orderDetailIds
))
if
(
string
.
IsNullOrEmpty
(
orderDetailIds
)
&&
Id
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
...
...
@@ -4914,8 +4915,8 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
bool
flag
=
orderModule
.
SetCommentBatchByOrderDetailId
(
orderDetailIds
,
Type
,
Content
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
bool
flag
=
orderModule
.
SetCommentBatchByOrderDetailId
Module
(
Id
,
orderDetailIds
,
Type
,
Content
,
req
.
TenantId
,
req
.
MallBaseId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
...
...
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