Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EduSpider
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
viitto
EduSpider
Commits
ff8a44f4
Commit
ff8a44f4
authored
Jun 07, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
2916f392
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
13 deletions
+19
-13
IStuCommentDetailsRepository.cs
EduSpider.IRepository/IStuCommentDetailsRepository.cs
+2
-2
ICourseService.cs
EduSpider.IServices/ICourseService.cs
+2
-2
StuCommentDetailsRepository.cs
EduSpider.Repository/StuCommentDetailsRepository.cs
+3
-3
CourseService.cs
EduSpider.Services/CourseService.cs
+10
-4
TeacherController.cs
EduSpider.WebApi/Controllers/Student/TeacherController.cs
+2
-2
No files found.
EduSpider.IRepository/IStuCommentDetailsRepository.cs
View file @
ff8a44f4
...
...
@@ -47,10 +47,10 @@ namespace EduSpider.IRepository
/// 根据课程评论次数修改可见等级
/// </summary>
/// <param name="CourseId">课程编号</param>
/// <param name="
Times">次数
</param>
/// <param name="
CommentMainId">评价主表编号
</param>
/// <param name="ShowType">可见性</param>
/// <returns></returns>
public
bool
SetStuCommentShowTypeByTimesRepository
(
int
CourseId
,
int
Times
,
int
ShowType
);
public
bool
SetStuCommentShowTypeByTimesRepository
(
int
CourseId
,
int
CommentMainId
,
int
ShowType
);
/// <summary>
/// 根据编号删除学员评论
...
...
EduSpider.IServices/ICourseService.cs
View file @
ff8a44f4
...
...
@@ -114,10 +114,10 @@ namespace EduSpider.IServices
/// 根据课程评论次数修改可见等级
/// </summary>
/// <param name="CourseId">课程编号</param>
/// <param name="
Times">次数
</param>
/// <param name="
CommentMainId">评价主表编号
</param>
/// <param name="ShowType">可见性</param>
/// <returns></returns>
public
bool
SetStuCommentShowTypeByTimes
(
int
CourseId
,
int
Times
,
int
ShouType
);
public
bool
SetStuCommentShowTypeByTimes
(
int
CourseId
,
int
CommentMainId
,
int
ShouType
);
/// <summary>
/// 根据编号删除学员评论
...
...
EduSpider.Repository/StuCommentDetailsRepository.cs
View file @
ff8a44f4
...
...
@@ -125,12 +125,12 @@ WHERE 1=1
/// 根据课程编号和次数修改评价可见状态
/// </summary>
/// <param name="CourseId"></param>
/// <param name="
Times">
</param>
/// <param name="
CommentMainId">评价主表编号
</param>
/// <param name="ShowType"></param>
/// <returns></returns>
public
bool
SetStuCommentShowTypeByTimesRepository
(
int
CourseId
,
int
Times
,
int
ShowType
)
public
bool
SetStuCommentShowTypeByTimesRepository
(
int
CourseId
,
int
CommentMainId
,
int
ShowType
)
{
string
sql
=
string
.
Format
(
"UPDATE RB_Stu_CommentDetails SET ShowType={0} WHERE CourseId={1} AND
Times={2}"
,
ShowType
,
CourseId
,
Times
);
string
sql
=
string
.
Format
(
"UPDATE RB_Stu_CommentDetails SET ShowType={0} WHERE CourseId={1} AND
CommentMainId={2}"
,
ShowType
,
CourseId
,
CommentMainId
);
return
base
.
Execute
(
sql
)
>
0
;
}
...
...
EduSpider.Services/CourseService.cs
View file @
ff8a44f4
...
...
@@ -403,12 +403,12 @@ namespace EduSpider.Services
/// 根据课程评论次数修改可见等级
/// </summary>
/// <param name="CourseId">课程编号</param>
/// <param name="
Times">次数
</param>
/// <param name="
CommentMainId">评价主表编号
</param>
/// <param name="ShowType">可见性</param>
/// <returns></returns>
public
bool
SetStuCommentShowTypeByTimes
(
int
CourseId
,
int
Times
,
int
ShowType
)
public
bool
SetStuCommentShowTypeByTimes
(
int
CourseId
,
int
CommentMainId
,
int
ShowType
)
{
return
StuCommentDetailsRepository
.
SetStuCommentShowTypeByTimesRepository
(
CourseId
,
Times
,
ShowType
);
return
StuCommentDetailsRepository
.
SetStuCommentShowTypeByTimesRepository
(
CourseId
,
CommentMainId
,
ShowType
);
}
...
...
@@ -432,10 +432,16 @@ namespace EduSpider.Services
var
list
=
StuCommentRepository
.
GetCourseCommentTimesListRepository
(
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
string
qIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
Id
));
List
<
RB_Stu_CommentDetails_Extend
>
detailsList
=
new
List
<
RB_Stu_CommentDetails_Extend
>();
if
(!
string
.
IsNullOrEmpty
(
qIds
))
{
detailsList
=
StuCommentDetailsRepository
.
GetStuCommentDetailsListRepository
(
new
RB_Stu_CommentDetails_Extend
()
{
QCommentMainIds
=
qIds
});
}
foreach
(
var
item
in
list
)
{
int
ShowType
=
3
;
var
subList
=
StuCommentDetailsRepository
.
GetStuCommentDetailsListRepository
(
new
RB_Stu_CommentDetails_Extend
()
{
CourseId
=
item
.
CourseId
,
Times
=
item
.
Times
}
);
var
subList
=
detailsList
?.
Where
(
qitem
=>
qitem
.
CommentMainId
==
item
.
Id
)?.
ToList
(
);
if
(
subList
!=
null
&&
subList
.
Count
>
0
)
{
var
totalCount
=
subList
.
Count
;
...
...
EduSpider.WebApi/Controllers/Student/TeacherController.cs
View file @
ff8a44f4
...
...
@@ -441,9 +441,9 @@ namespace EduSpider.WebApi.Controllers
public
ApiResult
SetStuCommentShowTypeByTimes
()
{
int
CourseId
=
base
.
ReqParameters
.
GetInt
(
"CourseId"
);
int
Times
=
base
.
ReqParameters
.
GetInt
(
"Times
"
);
int
CommentMainId
=
base
.
ReqParameters
.
GetInt
(
"CommentMainId
"
);
int
ShowType
=
base
.
ReqParameters
.
GetInt
(
"ShowType"
);
var
flag
=
CourseService
.
SetStuCommentShowTypeByTimes
(
CourseId
,
Times
,
ShowType
);
;
var
flag
=
CourseService
.
SetStuCommentShowTypeByTimes
(
CourseId
,
CommentMainId
,
ShowType
);
;
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
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