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
14ded93f
Commit
14ded93f
authored
May 31, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口修改
parent
4bb317ba
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
0 deletions
+62
-0
IStuCommentRepository.cs
EduSpider.IRepository/IStuCommentRepository.cs
+7
-0
ICourseService.cs
EduSpider.IServices/ICourseService.cs
+7
-0
RB_Stu_Comment.cs
EduSpider.Model/Entity/RB_Stu_Comment.cs
+5
-0
StuCommentRepository.cs
EduSpider.Repository/StuCommentRepository.cs
+12
-0
CourseService.cs
EduSpider.Services/CourseService.cs
+11
-0
TeacherController.cs
EduSpider.WebApi/Controllers/Student/TeacherController.cs
+20
-0
No files found.
EduSpider.IRepository/IStuCommentRepository.cs
View file @
14ded93f
...
...
@@ -32,5 +32,12 @@ namespace EduSpider.IRepository
/// <param name="Ids"></param>
/// <returns></returns>
public
bool
SetStuCommentShowTypeRepository
(
int
ShowType
,
string
Ids
);
/// <summary>
/// 根据编号删除学员评论
/// </summary>
/// <param name="Ids"></param>
/// <returns></returns>
public
bool
DeleteStuCommentRepository
(
string
Ids
)
}
}
EduSpider.IServices/ICourseService.cs
View file @
14ded93f
...
...
@@ -101,5 +101,12 @@ namespace EduSpider.IServices
/// <param name="Ids"></param>
/// <returns></returns>
public
bool
SetStuCommentShowType
(
int
ShowType
,
string
Ids
);
/// <summary>
/// 根据编号删除学员评论
/// </summary>
/// <param name="Ids"></param>
/// <returns></returns>
public
bool
RemoveStuComment
(
string
Ids
);
}
}
EduSpider.Model/Entity/RB_Stu_Comment.cs
View file @
14ded93f
...
...
@@ -64,5 +64,10 @@ namespace EduSpider.Model.Entity
/// 显示类型(1-全部可见,2-部分可见,3-不可见)
/// </summary>
public
int
ShowType
{
get
;
set
;
}
/// <summary>
/// 删除状态(0-正常,1-删除)
/// </summary>
public
int
Status
{
get
;
set
;
}
}
}
EduSpider.Repository/StuCommentRepository.cs
View file @
14ded93f
...
...
@@ -29,6 +29,7 @@ SELECT A.*
FROM RB_Stu_Comment AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}=0 "
,
nameof
(
RB_Stu_Comment
.
Status
));
if
(
query
!=
null
)
{
if
(
query
.
CourseId
>
0
)
...
...
@@ -83,5 +84,16 @@ WHERE 1=1
string
sql
=
string
.
Format
(
"UPDATE RB_Stu_Comment SET ShowType={0} WHERE Id IN({1}) "
,
ShowType
,
Ids
);
return
base
.
Execute
(
sql
)
>
0
;
}
/// <summary>
/// 根据编号删除学员评论
/// </summary>
/// <param name="Ids"></param>
/// <returns></returns>
public
bool
DeleteStuCommentRepository
(
string
Ids
)
{
string
sql
=
string
.
Format
(
"UPDATE RB_Stu_Comment SET Status=1 WHERE Id IN({0}) "
,
Ids
);
return
base
.
Execute
(
sql
)
>
0
;
}
}
}
EduSpider.Services/CourseService.cs
View file @
14ded93f
...
...
@@ -367,5 +367,16 @@ namespace EduSpider.Services
{
return
StuCommentRepository
.
SetStuCommentShowTypeRepository
(
ShowType
,
Ids
);
}
/// <summary>
/// 根据编号删除学员评论
/// </summary>
/// <param name="Ids"></param>
/// <returns></returns>
public
bool
RemoveStuComment
(
string
Ids
)
{
return
StuCommentRepository
.
DeleteStuCommentRepository
(
Ids
);
}
}
}
\ No newline at end of file
EduSpider.WebApi/Controllers/Student/TeacherController.cs
View file @
14ded93f
...
...
@@ -247,6 +247,8 @@ namespace EduSpider.WebApi.Controllers
Info
=
base
.
ReqParameters
.
GetString
(
"Info"
),
CreateType
=
base
.
ReqParameters
.
GetInt
(
"CreateType"
),
};
model
.
ShowType
=
3
;
model
.
Status
=
0
;
model
.
CreateTime
=
System
.
DateTime
.
Now
;
model
.
CreateBy
=
base
.
BaseUserId
;
model
.
CreateByName
=
base
.
UserInfo
.
AccountName
;
...
...
@@ -285,5 +287,23 @@ namespace EduSpider.WebApi.Controllers
var
list
=
CourseService
.
GetStuCommentList
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
[
HttpPost
]
[
HttpGet
]
/// <summary>
/// 删除学生评论
/// </summary>
/// <returns></returns>
public
ApiResult
RemoveStuComment
()
{
string
Ids
=
base
.
ReqParameters
.
GetString
(
"Ids"
);
if
(
string
.
IsNullOrEmpty
(
Ids
))
{
return
ApiResult
.
ParamIsNull
(
message
:
"请选择要删除的评论!"
);
}
var
list
=
CourseService
.
RemoveStuComment
(
Ids
);
return
ApiResult
.
Success
(
data
:
list
);
}
}
}
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