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
4bb317ba
Commit
4bb317ba
authored
May 31, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增字段
parent
d64363f0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
87 additions
and
11 deletions
+87
-11
IStuCommentRepository.cs
EduSpider.IRepository/IStuCommentRepository.cs
+8
-0
ICourseService.cs
EduSpider.IServices/ICourseService.cs
+8
-0
RB_Stu_Comment.cs
EduSpider.Model/Entity/RB_Stu_Comment.cs
+4
-0
StuCommentRepository.cs
EduSpider.Repository/StuCommentRepository.cs
+12
-0
CourseService.cs
EduSpider.Services/CourseService.cs
+12
-1
TeacherController.cs
EduSpider.WebApi/Controllers/Student/TeacherController.cs
+43
-10
No files found.
EduSpider.IRepository/IStuCommentRepository.cs
View file @
4bb317ba
...
@@ -24,5 +24,13 @@ namespace EduSpider.IRepository
...
@@ -24,5 +24,13 @@ namespace EduSpider.IRepository
/// <param name="query"></param>
/// <param name="query"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Stu_Comment
>
GetStuCommentListRepository
(
CourseQuery
query
);
public
List
<
RB_Stu_Comment
>
GetStuCommentListRepository
(
CourseQuery
query
);
/// <summary>
/// 修改学员评论状态
/// </summary>
/// <param name="ShowType"></param>
/// <param name="Ids"></param>
/// <returns></returns>
public
bool
SetStuCommentShowTypeRepository
(
int
ShowType
,
string
Ids
);
}
}
}
}
EduSpider.IServices/ICourseService.cs
View file @
4bb317ba
...
@@ -93,5 +93,13 @@ namespace EduSpider.IServices
...
@@ -93,5 +93,13 @@ namespace EduSpider.IServices
/// <param name="query"></param>
/// <param name="query"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Stu_Comment
>
GetStuCommentList
(
CourseQuery
query
);
public
List
<
RB_Stu_Comment
>
GetStuCommentList
(
CourseQuery
query
);
/// <summary>
/// 修改学员评论状态
/// </summary>
/// <param name="ShowType"></param>
/// <param name="Ids"></param>
/// <returns></returns>
public
bool
SetStuCommentShowType
(
int
ShowType
,
string
Ids
);
}
}
}
}
EduSpider.Model/Entity/RB_Stu_Comment.cs
View file @
4bb317ba
...
@@ -60,5 +60,9 @@ namespace EduSpider.Model.Entity
...
@@ -60,5 +60,9 @@ namespace EduSpider.Model.Entity
/// </summary>
/// </summary>
public
string
CreateByName
{
get
;
set
;
}
public
string
CreateByName
{
get
;
set
;
}
/// <summary>
/// 显示类型(1-全部可见,2-部分可见,3-不可见)
/// </summary>
public
int
ShowType
{
get
;
set
;
}
}
}
}
}
EduSpider.Repository/StuCommentRepository.cs
View file @
4bb317ba
...
@@ -71,5 +71,17 @@ WHERE 1=1
...
@@ -71,5 +71,17 @@ WHERE 1=1
}
}
return
flag
;
return
flag
;
}
}
/// <summary>
/// 修改学员评论状态
/// </summary>
/// <param name="ShowType"></param>
/// <param name="Ids"></param>
/// <returns></returns>
public
bool
SetStuCommentShowTypeRepository
(
int
ShowType
,
string
Ids
)
{
string
sql
=
string
.
Format
(
"UPDATE RB_Stu_Comment SET ShowType={0} WHERE Id IN({1}) "
,
ShowType
,
Ids
);
return
base
.
Execute
(
sql
)
>
0
;
}
}
}
}
}
EduSpider.Services/CourseService.cs
View file @
4bb317ba
...
@@ -277,7 +277,7 @@ namespace EduSpider.Services
...
@@ -277,7 +277,7 @@ namespace EduSpider.Services
item
.
student_name
,
item
.
student_name
,
item
.
student_uid
,
item
.
student_uid
,
item
.
score
,
item
.
score
,
item
.
score_p
,
score_p
=
item
.
score_p
*
100
,
add_time
=
VTX
.
FW
.
Helper
.
ConvertHelper
.
FormatDate
(
item
.
add_time
)
add_time
=
VTX
.
FW
.
Helper
.
ConvertHelper
.
FormatDate
(
item
.
add_time
)
});
});
}
}
...
@@ -356,5 +356,16 @@ namespace EduSpider.Services
...
@@ -356,5 +356,16 @@ namespace EduSpider.Services
var
list
=
StuCommentRepository
.
GetStuCommentListRepository
(
query
);
var
list
=
StuCommentRepository
.
GetStuCommentListRepository
(
query
);
return
list
;
return
list
;
}
}
/// <summary>
/// 修改学员评论状态
/// </summary>
/// <param name="ShowType"></param>
/// <param name="Ids"></param>
/// <returns></returns>
public
bool
SetStuCommentShowType
(
int
ShowType
,
string
Ids
)
{
return
StuCommentRepository
.
SetStuCommentShowTypeRepository
(
ShowType
,
Ids
);
}
}
}
}
}
EduSpider.WebApi/Controllers/Student/TeacherController.cs
View file @
4bb317ba
...
@@ -9,6 +9,7 @@ using VTX.FW.Api;
...
@@ -9,6 +9,7 @@ using VTX.FW.Api;
using
VTX.FW.Attr
;
using
VTX.FW.Attr
;
using
VTX.FW.Helper
;
using
VTX.FW.Helper
;
using
System.Linq
;
using
System.Linq
;
using
EduSpider.Model.Query
;
namespace
EduSpider.WebApi.Controllers
namespace
EduSpider.WebApi.Controllers
{
{
...
@@ -38,14 +39,14 @@ namespace EduSpider.WebApi.Controllers
...
@@ -38,14 +39,14 @@ namespace EduSpider.WebApi.Controllers
TeacherIds
=
userInfo
.
AccountId
.
ToString
(),
TeacherIds
=
userInfo
.
AccountId
.
ToString
(),
KeyWords
=
base
.
ReqParameters
.
GetString
(
"KeyWords"
),
KeyWords
=
base
.
ReqParameters
.
GetString
(
"KeyWords"
),
};
};
//全部课程
//全部课程
List
<
object
>
AllCourseList
=
new
();
List
<
object
>
AllCourseList
=
new
();
//已结课
//已结课
List
<
object
>
FinishList
=
new
();
List
<
object
>
FinishList
=
new
();
//进行中
//进行中
List
<
object
>
NotFinishList
=
new
();
List
<
object
>
NotFinishList
=
new
();
var
list
=
CourseService
.
GetTeacherCourseList
(
query
).
Where
(
qitem
=>
qitem
.
CourseStatus
==
1
||
qitem
.
CompleteNum
==
qitem
.
TotalClassNum
).
ToList
();
var
list
=
CourseService
.
GetTeacherCourseList
(
query
).
Where
(
qitem
=>
qitem
.
CourseStatus
==
1
||
qitem
.
CompleteNum
==
qitem
.
TotalClassNum
).
ToList
();
if
(
list
!=
null
&&
list
.
Count
>
0
)
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
{
...
@@ -61,7 +62,7 @@ namespace EduSpider.WebApi.Controllers
...
@@ -61,7 +62,7 @@ namespace EduSpider.WebApi.Controllers
item
.
TeacherName
,
item
.
TeacherName
,
};
};
AllCourseList
.
Add
(
obj
);
AllCourseList
.
Add
(
obj
);
if
(
item
.
CompleteNum
==
item
.
TotalClassNum
)
if
(
item
.
CompleteNum
==
item
.
TotalClassNum
)
{
{
FinishList
.
Add
(
obj
);
FinishList
.
Add
(
obj
);
}
}
...
@@ -238,13 +239,13 @@ namespace EduSpider.WebApi.Controllers
...
@@ -238,13 +239,13 @@ namespace EduSpider.WebApi.Controllers
{
{
var
model
=
new
RB_Stu_Comment
()
var
model
=
new
RB_Stu_Comment
()
{
{
Id
=
base
.
ReqParameters
.
GetInt
(
"Id"
),
Id
=
base
.
ReqParameters
.
GetInt
(
"Id"
),
HomeWorkId
=
base
.
ReqParameters
.
GetInt
(
"HomeWorkId"
),
HomeWorkId
=
base
.
ReqParameters
.
GetInt
(
"HomeWorkId"
),
StuUid
=
base
.
ReqParameters
.
GetInt
(
"StuUid"
),
StuUid
=
base
.
ReqParameters
.
GetInt
(
"StuUid"
),
CourseId
=
base
.
ReqParameters
.
GetInt
(
"CourseId"
),
CourseId
=
base
.
ReqParameters
.
GetInt
(
"CourseId"
),
Times
=
base
.
ReqParameters
.
GetInt
(
"Times"
),
Times
=
base
.
ReqParameters
.
GetInt
(
"Times"
),
Info
=
base
.
ReqParameters
.
GetString
(
"Info"
),
Info
=
base
.
ReqParameters
.
GetString
(
"Info"
),
CreateType
=
base
.
ReqParameters
.
GetInt
(
"CreateType"
),
CreateType
=
base
.
ReqParameters
.
GetInt
(
"CreateType"
),
};
};
model
.
CreateTime
=
System
.
DateTime
.
Now
;
model
.
CreateTime
=
System
.
DateTime
.
Now
;
model
.
CreateBy
=
base
.
BaseUserId
;
model
.
CreateBy
=
base
.
BaseUserId
;
...
@@ -252,5 +253,37 @@ namespace EduSpider.WebApi.Controllers
...
@@ -252,5 +253,37 @@ namespace EduSpider.WebApi.Controllers
var
flag
=
CourseService
.
SetStuComment
(
model
);
var
flag
=
CourseService
.
SetStuComment
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
[
HttpPost
]
[
HttpGet
]
/// <summary>
/// 修改学员评论状态
/// </summary>
/// <returns></returns>
public
ApiResult
SetStuCommentShowType
()
{
string
Ids
=
base
.
ReqParameters
.
GetString
(
"Ids"
);
int
ShowType
=
base
.
ReqParameters
.
GetInt
(
"ShowType"
);
var
flag
=
CourseService
.
SetStuCommentShowType
(
ShowType
,
Ids
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
[
HttpPost
]
[
HttpGet
]
/// <summary>
/// 获取学员评论列表
/// </summary>
/// <returns></returns>
public
ApiResult
GetStuCommentList
()
{
var
query
=
new
CourseQuery
()
{
};
var
list
=
CourseService
.
GetStuCommentList
(
query
);
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