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
d0fc17a3
Commit
d0fc17a3
authored
May 30, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c0bd0207
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
73 additions
and
14 deletions
+73
-14
ICourseCommentDetailsRepository.cs
EduSpider.IRepository/ICourseCommentDetailsRepository.cs
+5
-2
ICourseCommentRepository.cs
EduSpider.IRepository/ICourseCommentRepository.cs
+3
-1
IStuCommentRepository.cs
EduSpider.IRepository/IStuCommentRepository.cs
+3
-5
ICourseService.cs
EduSpider.IServices/ICourseService.cs
+6
-0
CourseCommentDetailsRepository.cs
EduSpider.Repository/CourseCommentDetailsRepository.cs
+3
-1
CourseCommentRepository.cs
EduSpider.Repository/CourseCommentRepository.cs
+6
-1
Exam_ScoreRepository.cs
EduSpider.Repository/Exam_ScoreRepository.cs
+1
-2
StuCommentRepository.cs
EduSpider.Repository/StuCommentRepository.cs
+1
-1
CourseService.cs
EduSpider.Services/CourseService.cs
+16
-0
TeacherController.cs
EduSpider.WebApi/Controllers/Student/TeacherController.cs
+29
-1
No files found.
EduSpider.IRepository/ICourseCommentDetailsRepository.cs
View file @
d0fc17a3
using
EduSpider.Model.Extend
;
using
EduSpider.Model.Entity
;
using
EduSpider.Model.Extend
;
using
System.Collections.Generic
;
using
VTX.FW.Config
;
using
VTX.FW.DB
;
namespace
EduSpider.IRepository
{
/// <summary>
/// 课程评价配置详情仓储接口
/// </summary>
public
interface
ICourseCommentDetailsRepository
public
interface
ICourseCommentDetailsRepository
:
IDBRepository
<
RB_Course_CommentDetails
>,
IDependency
{
/// <summary>
/// 新增修改课程评价
...
...
EduSpider.IRepository/ICourseCommentRepository.cs
View file @
d0fc17a3
...
...
@@ -6,13 +6,15 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VTX.FW.Config
;
using
VTX.FW.DB
;
namespace
EduSpider.IRepository
{
/// <summary>
/// 课程评价配置仓储接口
/// </summary>
public
interface
ICourseCommentRepository
public
interface
ICourseCommentRepository
:
IDBRepository
<
RB_Course_Comment
>,
IDependency
{
/// <summary>
/// 批量新增修改课程评价
...
...
EduSpider.IRepository/IStuCommentRepository.cs
View file @
d0fc17a3
using
EduSpider.Model.Entity
;
using
EduSpider.Model.Query
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VTX.FW.Config
;
using
VTX.FW.DB
;
namespace
EduSpider.IRepository
{
/// <summary>
/// 学员评语仓储接口
/// </summary>
public
interface
IStuCommentRepository
public
interface
IStuCommentRepository
:
IDBRepository
<
RB_Stu_Comment
>,
IDependency
{
/// <summary>
/// 新增修改学员评语
...
...
EduSpider.IServices/ICourseService.cs
View file @
d0fc17a3
...
...
@@ -80,5 +80,11 @@ namespace EduSpider.IServices
/// <returns></returns>
public
bool
DeleteCourseCommentDetail
(
string
DetailIds
);
/// <summary>
/// 新增修改学员评价
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetStuComment
(
RB_Stu_Comment
model
);
}
}
EduSpider.Repository/CourseCommentDetailsRepository.cs
View file @
d0fc17a3
using
EduSpider.IRepository
;
using
EduSpider.Model.Entity
;
using
EduSpider.Model.Extend
;
using
EduSpider.Repository.Base
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -12,7 +13,7 @@ namespace EduSpider.Repository
/// <summary>
/// 课程评价配置详情仓储接口实现
/// </summary>
public
class
CourseCommentDetailsRepository
:
Base
.
Base
Repository
<
RB_Course_CommentDetails
>,
ICourseCommentDetailsRepository
public
class
CourseCommentDetailsRepository
:
BaseRepository
<
RB_Course_CommentDetails
>,
ICourseCommentDetailsRepository
{
/// <summary>
/// 新增修改课程评价
...
...
@@ -63,6 +64,7 @@ SELECT A.*
FROM RB_Course_CommentDetails AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}=0 "
,
nameof
(
RB_Course_CommentDetails_Extend
.
Status
));
if
(
query
!=
null
)
{
if
(!
string
.
IsNullOrEmpty
(
query
.
QCourseCommentIds
))
...
...
EduSpider.Repository/CourseCommentRepository.cs
View file @
d0fc17a3
...
...
@@ -2,6 +2,7 @@
using
EduSpider.Model.Entity
;
using
EduSpider.Model.Extend
;
using
EduSpider.Model.Query
;
using
EduSpider.Repository.Base
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
...
...
@@ -11,7 +12,7 @@ namespace EduSpider.Repository
/// <summary>
/// 课程评价配置仓储接口实现
/// </summary>
public
class
CourseCommentRepository
:
Base
.
Base
Repository
<
RB_Course_Comment
>,
ICourseCommentRepository
public
class
CourseCommentRepository
:
BaseRepository
<
RB_Course_Comment
>,
ICourseCommentRepository
{
/// <summary>
/// 课程评价配置详情仓储对象
...
...
@@ -65,6 +66,7 @@ SELECT A.*
FROM RB_Course_Comment AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}=0 "
,
nameof
(
RB_Course_Comment_Extend
.
Status
));
if
(
query
!=
null
)
{
if
(
query
.
CourseId
>
0
)
...
...
@@ -93,7 +95,10 @@ WHERE 1=1
public
bool
DeleteCourseCommentRepository
(
string
Ids
)
{
string
sql
=
string
.
Format
(
"UPDATE RB_Course_Comment SET Status=1 WHERE Id IN({0}) "
,
Ids
);
string
sql2
=
string
.
Format
(
"UPDATE RB_Course_CommentDetails SET Status=1 WHERE CourseCommentId IN({0}) "
,
Ids
);
base
.
Execute
(
sql2
);
return
base
.
Execute
(
sql
)
>
0
;
}
}
}
EduSpider.Repository/Exam_ScoreRepository.cs
View file @
d0fc17a3
...
...
@@ -36,10 +36,9 @@ WHERE 1=1
}
if
(!
string
.
IsNullOrEmpty
(
query
.
StuIds
))
{
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Exam_Score_Extend
.
Stu
U
Id
),
query
.
StuIds
);
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Exam_Score_Extend
.
StuId
),
query
.
StuIds
);
}
}
return
Get
<
RB_Exam_Score_Extend
>(
builder
.
ToString
()).
ToList
();
}
...
...
EduSpider.Repository/StuCommentRepository.cs
View file @
d0fc17a3
...
...
@@ -59,7 +59,7 @@ WHERE 1=1
{
Dictionary
<
string
,
object
>
fileds
=
new
()
{
{
nameof
(
RB_Stu_Comment
.
Info
),
model
.
Info
}
{
nameof
(
RB_Stu_Comment
.
Info
),
model
.
Info
}
,
};
flag
=
base
.
UpdateOne
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Stu_Comment
.
Id
),
model
.
Id
));
}
...
...
EduSpider.Services/CourseService.cs
View file @
d0fc17a3
...
...
@@ -67,6 +67,12 @@ namespace EduSpider.Services
[
Autowired
]
public
ICourseCommentDetailsRepository
CourseCommentDetailsRepository
{
get
;
set
;
}
/// <summary>
/// 学员评价仓储层接口
/// </summary>
[
Autowired
]
public
IStuCommentRepository
StuCommentRepository
{
get
;
set
;
}
/// <summary>
...
...
@@ -314,5 +320,15 @@ namespace EduSpider.Services
{
return
CourseCommentDetailsRepository
.
DeleteCourseCommentDetailsRepository
(
DetailIds
);
}
/// <summary>
/// 新增修改学员评价
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetStuComment
(
RB_Stu_Comment
model
)
{
return
StuCommentRepository
.
SetStuCommentRepository
(
model
);
}
}
}
EduSpider.WebApi/Controllers/Student/TeacherController.cs
View file @
d0fc17a3
using
EduSpider.IServices
;
using
EduSpider.Model.Entity
;
using
EduSpider.Model.Extend
;
using
EduSpider.WebApi.Controllers.Base
;
using
Microsoft.AspNetCore.Mvc
;
...
...
@@ -16,7 +17,6 @@ namespace EduSpider.WebApi.Controllers
public
class
TeacherController
:
BaseController
{
/// <summary>
/// 课程仓储接口
/// </summary>
...
...
@@ -223,5 +223,33 @@ namespace EduSpider.WebApi.Controllers
var
flag
=
CourseService
.
DeleteCourseCommentDetail
(
DetailIds
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
[
HttpPost
]
[
HttpGet
]
/// <summary>
/// 新增修改学员评价
/// </summary>
/// <returns></returns>
public
ApiResult
SetStuComment
()
{
var
model
=
new
RB_Stu_Comment
()
{
Id
=
base
.
ReqParameters
.
GetInt
(
"Id"
),
HomeWorkId
=
base
.
ReqParameters
.
GetInt
(
"HomeWorkId"
),
StuUid
=
base
.
ReqParameters
.
GetInt
(
"StuUid"
),
CourseId
=
base
.
ReqParameters
.
GetInt
(
"CourseId"
),
Times
=
base
.
ReqParameters
.
GetInt
(
"Times"
),
Info
=
base
.
ReqParameters
.
GetString
(
"Info"
),
CreateType
=
base
.
ReqParameters
.
GetInt
(
"CreateType"
),
};
model
.
CreateTime
=
System
.
DateTime
.
Now
;
model
.
CreateBy
=
base
.
BaseUserId
;
model
.
CreateByName
=
base
.
UserInfo
.
AccountName
;
var
flag
=
CourseService
.
SetStuComment
(
model
);
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