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
c313440f
Commit
c313440f
authored
Jun 01, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
73ab8b46
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
17 deletions
+68
-17
IStuCommentRepository.cs
EduSpider.IRepository/IStuCommentRepository.cs
+7
-0
ICourseService.cs
EduSpider.IServices/ICourseService.cs
+6
-0
StuCommentRepository.cs
EduSpider.Repository/StuCommentRepository.cs
+12
-0
CourseService.cs
EduSpider.Services/CourseService.cs
+10
-0
TeacherController.cs
EduSpider.WebApi/Controllers/Student/TeacherController.cs
+33
-17
No files found.
EduSpider.IRepository/IStuCommentRepository.cs
View file @
c313440f
...
@@ -19,6 +19,13 @@ namespace EduSpider.IRepository
...
@@ -19,6 +19,13 @@ namespace EduSpider.IRepository
/// <returns></returns>
/// <returns></returns>
public
bool
SetStuCommentRepository
(
RB_Stu_Comment
model
);
public
bool
SetStuCommentRepository
(
RB_Stu_Comment
model
);
/// <summary>
/// 批量新增学员评价
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
public
bool
BatchSetStuCommentRepository
(
List
<
RB_Stu_Comment
>
list
);
/// <summary>
/// <summary>
/// 查询学员评语列表
/// 查询学员评语列表
...
...
EduSpider.IServices/ICourseService.cs
View file @
c313440f
...
@@ -87,6 +87,12 @@ namespace EduSpider.IServices
...
@@ -87,6 +87,12 @@ namespace EduSpider.IServices
/// <returns></returns>
/// <returns></returns>
public
bool
SetStuComment
(
RB_Stu_Comment
model
);
public
bool
SetStuComment
(
RB_Stu_Comment
model
);
/// <summary>
/// 批量新增学员评价
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
public
bool
BatchSetStuComment
(
List
<
RB_Stu_Comment
>
list
);
/// <summary>
/// <summary>
/// 获取学员评价列表
/// 获取学员评价列表
...
...
EduSpider.Repository/StuCommentRepository.cs
View file @
c313440f
...
@@ -78,6 +78,18 @@ WHERE 1=1
...
@@ -78,6 +78,18 @@ WHERE 1=1
return
flag
;
return
flag
;
}
}
/// <summary>
/// 批量新增学员评价
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
public
bool
BatchSetStuCommentRepository
(
List
<
RB_Stu_Comment
>
list
)
{
bool
flag
=
false
;
flag
=
base
.
BatchInsert
(
list
);
return
flag
;
}
/// <summary>
/// <summary>
/// 修改学员评论状态
/// 修改学员评论状态
/// </summary>
/// </summary>
...
...
EduSpider.Services/CourseService.cs
View file @
c313440f
...
@@ -364,6 +364,16 @@ namespace EduSpider.Services
...
@@ -364,6 +364,16 @@ namespace EduSpider.Services
}
}
/// <summary>
/// 批量新增学员评价
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
public
bool
BatchSetStuComment
(
List
<
RB_Stu_Comment
>
list
)
{
return
StuCommentRepository
.
BatchSetStuCommentRepository
(
list
);
}
/// <summary>
/// <summary>
/// 获取学员评价列表
/// 获取学员评价列表
/// </summary>
/// </summary>
...
...
EduSpider.WebApi/Controllers/Student/TeacherController.cs
View file @
c313440f
...
@@ -254,27 +254,43 @@ namespace EduSpider.WebApi.Controllers
...
@@ -254,27 +254,43 @@ namespace EduSpider.WebApi.Controllers
[
HttpPost
]
[
HttpPost
]
[
HttpGet
]
[
HttpGet
]
/// <summary>
/// <summary>
///
新增修改
学员评价
///
批量新增
学员评价
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
ApiResult
SetStuComment
()
public
ApiResult
Batch
SetStuComment
()
{
{
var
model
=
new
RB_Stu_Comment
()
var
stuListStr
=
base
.
ReqParameters
.
GetString
(
"ChooseStuList"
);
List
<
RB_Stu_Comment
>
list
=
new
List
<
RB_Stu_Comment
>();
if
(!
string
.
IsNullOrWhiteSpace
(
stuListStr
))
{
{
Id
=
base
.
ReqParameters
.
GetInt
(
"Id"
),
JArray
jArray
=
JArray
.
Parse
(
stuListStr
);
HomeWorkId
=
base
.
ReqParameters
.
GetInt
(
"HomeWorkId"
),
if
(
jArray
!=
null
&&
jArray
.
Count
>
0
)
StuUid
=
base
.
ReqParameters
.
GetInt
(
"StuUid"
),
{
CourseId
=
base
.
ReqParameters
.
GetInt
(
"CourseId"
),
foreach
(
var
jItem
in
jArray
)
Times
=
base
.
ReqParameters
.
GetInt
(
"Times"
),
{
Info
=
base
.
ReqParameters
.
GetString
(
"Info"
),
JObject
stuObj
=
JObject
.
Parse
(
jItem
.
ToString
());
CreateType
=
base
.
ReqParameters
.
GetInt
(
"CreateType"
),
var
model
=
new
RB_Stu_Comment
()
};
{
model
.
ShowType
=
3
;
Id
=
base
.
ReqParameters
.
GetInt
(
"Id"
),
model
.
Status
=
0
;
HomeWorkId
=
base
.
ReqParameters
.
GetInt
(
"HomeWorkId"
),
model
.
CreateTime
=
System
.
DateTime
.
Now
;
StuUid
=
stuObj
.
GetInt
(
"StuId"
),
model
.
CreateBy
=
base
.
BaseUserId
;
CourseId
=
base
.
ReqParameters
.
GetInt
(
"CourseId"
),
model
.
CreateByName
=
base
.
UserInfo
.
AccountName
;
Times
=
base
.
ReqParameters
.
GetInt
(
"Times"
),
var
flag
=
CourseService
.
SetStuComment
(
model
);
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
;
list
.
Add
(
model
);
}
}
}
var
flag
=
CourseService
.
BatchSetStuComment
(
list
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
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