Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
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
黄奎
Education
Commits
fe834d1c
Commit
fe834d1c
authored
Sep 25, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增实体类
parent
054b764c
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
632 additions
and
5 deletions
+632
-5
RB_Course.cs
Edu.Model/Entity/Course/RB_Course.cs
+0
-2
RB_Course_Chapter.cs
Edu.Model/Entity/Course/RB_Course_Chapter.cs
+21
-3
RB_Course_Discuss.cs
Edu.Model/Entity/Course/RB_Course_Discuss.cs
+74
-0
RB_Course_Notice.cs
Edu.Model/Entity/Course/RB_Course_Notice.cs
+12
-0
RB_Course_Setting.cs
Edu.Model/Entity/Course/RB_Course_Setting.cs
+58
-0
RB_Course_Source.cs
Edu.Model/Entity/Course/RB_Course_Source.cs
+94
-0
RB_Course_TeachPlan.cs
Edu.Model/Entity/Course/RB_Course_TeachPlan.cs
+108
-0
FileModel.cs
Edu.Model/Public/FileModel.cs
+32
-0
RB_Course_Discuss_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Course_Discuss_ViewModel.cs
+14
-0
RB_Course_Setting_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Course_Setting_ViewModel.cs
+14
-0
RB_Course_Source_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Course_Source_ViewModel.cs
+13
-0
RB_Course_TeachPlan_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Course_TeachPlan_ViewModel.cs
+14
-0
RB_CourseRepository.cs
Edu.Repository/Course/RB_CourseRepository.cs
+4
-0
RB_Course_DiscussRepository.cs
Edu.Repository/Course/RB_Course_DiscussRepository.cs
+49
-0
RB_Course_SettingRepository.cs
Edu.Repository/Course/RB_Course_SettingRepository.cs
+34
-0
RB_Course_SourceRepository.cs
Edu.Repository/Course/RB_Course_SourceRepository.cs
+45
-0
RB_Course_TeachPlanRepository.cs
Edu.Repository/Course/RB_Course_TeachPlanRepository.cs
+46
-0
No files found.
Edu.Model/Entity/Course/RB_Course.cs
View file @
fe834d1c
using
Edu.Common.Enum
;
using
Edu.Common.Enum
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
namespace
Edu.Model.Entity.Course
...
...
Edu.Model/Entity/Course/RB_Course_Chapter.cs
View file @
fe834d1c
using
Edu.Common.Enum
;
using
Edu.Common.Enum
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
namespace
Edu.Model.Entity.Course
...
@@ -44,7 +42,7 @@ namespace Edu.Model.Entity.Course
...
@@ -44,7 +42,7 @@ namespace Edu.Model.Entity.Course
public
int
ParentId
{
get
;
set
;
}
public
int
ParentId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 开发状态
/// 开发状态
(1-开放,2-定时开放)
/// </summary>
/// </summary>
public
int
OpenStatus
{
get
;
set
;
}
public
int
OpenStatus
{
get
;
set
;
}
...
@@ -77,5 +75,25 @@ namespace Edu.Model.Entity.Course
...
@@ -77,5 +75,25 @@ namespace Edu.Model.Entity.Course
/// 删除状态
/// 删除状态
/// </summary>
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 开放开始时间
/// </summary>
public
DateTime
?
OpenStart
{
get
;
set
;
}
/// <summary>
/// 开放结束时间
/// </summary>
public
DateTime
?
OpenEnd
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
}
}
}
}
Edu.Model/Entity/Course/RB_Course_Discuss.cs
0 → 100644
View file @
fe834d1c
using
Edu.Common.Enum
;
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 课程讨论实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Course_Discuss
{
/// <summary>
/// 主键(话题Id)
/// </summary>
public
int
DiscussId
{
get
;
set
;
}
/// <summary>
/// 课程编号
/// </summary>
public
int
CourseId
{
get
;
set
;
}
/// <summary>
/// 话题标题
/// </summary>
public
string
DiscussTitle
{
get
;
set
;
}
/// <summary>
/// 话题内容
/// </summary>
public
string
DiscussContent
{
get
;
set
;
}
/// <summary>
/// 话题附件
/// </summary>
public
string
DiscussUrl
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/Entity/Course/RB_Course_Notice.cs
View file @
fe834d1c
...
@@ -65,5 +65,17 @@ namespace Edu.Model.Entity.Course
...
@@ -65,5 +65,17 @@ namespace Edu.Model.Entity.Course
/// 更新时间
/// 更新时间
/// </summary>
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
}
}
}
}
Edu.Model/Entity/Course/RB_Course_Setting.cs
0 → 100644
View file @
fe834d1c
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 课程配置实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Course_Setting
{
/// <summary>
/// 主键(配置编号)
/// </summary>
public
int
SettingId
{
get
;
set
;
}
/// <summary>
/// App端是否支持缓存(1-支持)
/// </summary>
public
int
AppIsCache
{
get
;
set
;
}
/// <summary>
/// 播放类型(1-继续播放下一课时,2-暂停本课时,3-循环播放本课时)
/// </summary>
public
int
PlayType
{
get
;
set
;
}
/// <summary>
/// 学校Id
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
}
}
Edu.Model/Entity/Course/RB_Course_Source.cs
0 → 100644
View file @
fe834d1c
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 课程资料实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Course_Source
{
/// <summary>
/// 主键(资料编号)
/// </summary>
public
int
SourceId
{
get
;
set
;
}
/// <summary>
/// 课程编号
/// </summary>
public
int
CourseId
{
get
;
set
;
}
/// <summary>
/// 资料名称
/// </summary>
public
string
SourceName
{
get
;
set
;
}
/// <summary>
/// 资料类型
/// </summary>
public
int
SourceType
{
get
;
set
;
}
/// <summary>
/// 资料URL
/// </summary>
public
string
SourceUrl
{
get
;
set
;
}
/// <summary>
/// 阅读次数
/// </summary>
public
int
ReadCount
{
get
;
set
;
}
/// <summary>
/// 下载次数
/// </summary>
public
int
DownLoadCount
{
get
;
set
;
}
/// <summary>
/// 资料大小
/// </summary>
public
decimal
SourceSize
{
get
;
set
;
}
/// <summary>
/// 父级资料编号
/// </summary>
public
int
ParentSourceId
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 共享类型(0-私有)
/// </summary>
public
int
ShareType
{
get
;
set
;
}
/// <summary>
/// 学校Id
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/Entity/Course/RB_Course_TeachPlan.cs
0 → 100644
View file @
fe834d1c
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 课程教案实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Course_TeachPlan
{
/// <summary>
/// 主键(教案编号)
/// </summary>
public
int
PlanId
{
get
;
set
;
}
/// <summary>
/// 课程编号
/// </summary>
public
int
CourseId
{
get
;
set
;
}
/// <summary>
/// 教案名称
/// </summary>
public
string
PlanName
{
get
;
set
;
}
/// <summary>
/// 课前
/// </summary>
public
string
ClassBefore
{
get
;
set
;
}
/// <summary>
/// 课中
/// </summary>
public
string
ClassIn
{
get
;
set
;
}
/// <summary>
/// 课后
/// </summary>
public
string
ClassAfter
{
get
;
set
;
}
/// <summary>
/// 父节点编号
/// </summary>
public
int
ParentPlanId
{
get
;
set
;
}
/// <summary>
/// 文件路径
/// </summary>
public
string
SourceUrl
{
get
;
set
;
}
/// <summary>
/// 文件后缀名
/// </summary>
public
string
PlanFileExtension
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 节点类型(0-文件,1-文件夹)
/// </summary>
public
int
PlanNodeType
{
get
;
set
;
}
/// <summary>
/// 是否置顶(1-是)
/// </summary>
public
int
IsTop
{
get
;
set
;
}
/// <summary>
/// 上传生成文件路径
/// </summary>
public
string
ExtUrl
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 学校Id
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/Public/FileModel.cs
0 → 100644
View file @
fe834d1c
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.Public
{
/// <summary>
/// 上传文件实体类
/// </summary>
public
class
FileModel
{
/// <summary>
/// 源文件名称
/// </summary>
public
string
FileName
{
get
;
set
;
}
/// <summary>
/// 存储文件名称
/// </summary>
public
string
NewFileName
{
get
;
set
;
}
/// <summary>
/// 文件路径
/// </summary>
public
string
FileUrl
{
get
;
set
;
}
/// <summary>
/// 文件扩展名
/// </summary>
public
string
FileExtension
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/RB_Course_Discuss_ViewModel.cs
0 → 100644
View file @
fe834d1c
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 课程讨论视图实体类
/// </summary>
public
class
RB_Course_Discuss_ViewModel
:
Model
.
Entity
.
Course
.
RB_Course_Discuss
{
}
}
\ No newline at end of file
Edu.Model/ViewModel/Course/RB_Course_Setting_ViewModel.cs
0 → 100644
View file @
fe834d1c
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 课程配置视图实体类
/// </summary>
public
class
RB_Course_Setting_ViewModel
:
Model
.
Entity
.
Course
.
RB_Course_Setting
{
}
}
\ No newline at end of file
Edu.Model/ViewModel/Course/RB_Course_Source_ViewModel.cs
0 → 100644
View file @
fe834d1c
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 课程资料视图实体类
/// </summary>
public
class
RB_Course_Source_ViewModel
:
Model
.
Entity
.
Course
.
RB_Course_Source
{
}
}
\ No newline at end of file
Edu.Model/ViewModel/Course/RB_Course_TeachPlan_ViewModel.cs
0 → 100644
View file @
fe834d1c
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 课程教案视图实体类
/// </summary>
public
class
RB_Course_TeachPlan_ViewModel
:
Model
.
Entity
.
Course
.
RB_Course_TeachPlan
{
}
}
\ No newline at end of file
Edu.Repository/Course/RB_CourseRepository.cs
View file @
fe834d1c
...
@@ -25,6 +25,8 @@ SELECT *
...
@@ -25,6 +25,8 @@ SELECT *
FROM RB_Course
FROM RB_Course
WHERE 1=1
WHERE 1=1
"
);
"
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_ViewModel
.
Group_Id
),
query
.
Group_Id
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_ViewModel
.
School_Id
),
query
.
School_Id
);
if
(
query
!=
null
)
if
(
query
!=
null
)
{
{
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
CourseName
))
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
CourseName
))
...
@@ -57,6 +59,8 @@ SELECT *
...
@@ -57,6 +59,8 @@ SELECT *
FROM RB_Course
FROM RB_Course
WHERE 1=1
WHERE 1=1
"
);
"
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_ViewModel
.
Group_Id
),
query
.
Group_Id
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_ViewModel
.
School_Id
),
query
.
School_Id
);
if
(
query
!=
null
)
if
(
query
!=
null
)
{
{
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
CourseName
))
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
CourseName
))
...
...
Edu.Repository/Course/RB_Course_DiscussRepository.cs
0 → 100644
View file @
fe834d1c
using
Edu.Model.ViewModel.Course
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 课程讨论仓储层
/// </summary>
public
class
RB_Course_DiscussRepository
:
BaseRepository
<
Model
.
Entity
.
Course
.
RB_Course_Discuss
>
{
/// <summary>
/// 获取课程讨论分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Course_Discuss_ViewModel
>
GetDiscussPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Course_Discuss_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
DynamicParameters
parameters
=
new
DynamicParameters
();
builder
.
AppendFormat
(
@"
SELECT *
FROM rb_course_discuss
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_Discuss_ViewModel
.
Group_Id
),
query
.
Group_Id
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_Discuss_ViewModel
.
School_Id
),
query
.
School_Id
);
if
(
query
.
CourseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_Discuss_ViewModel
.
CourseId
),
query
.
CourseId
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
DiscussTitle
))
{
builder
.
AppendFormat
(
" AND {0} LIKE @DiscussTitle "
,
nameof
(
RB_Course_Discuss_ViewModel
.
DiscussTitle
));
parameters
.
Add
(
"DiscussTitle"
,
"%"
+
query
.
DiscussTitle
.
Trim
()
+
"%"
);
}
if
(
query
.
DiscussId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_Discuss_ViewModel
.
DiscussId
),
query
.
DiscussId
);
}
return
GetPage
<
RB_Course_Discuss_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
Edu.Repository/Course/RB_Course_SettingRepository.cs
0 → 100644
View file @
fe834d1c
using
Edu.Model.ViewModel.Course
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 课程配置仓储层
/// </summary>
public
class
RB_Course_SettingRepository
:
BaseRepository
<
Model
.
Entity
.
Course
.
RB_Course_Setting
>
{
/// <summary>
/// 获取课程设置实体
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
RB_Course_Setting_ViewModel
GetCourseSettingRepository
(
RB_Course_Setting_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM rb_course_setting
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_Setting_ViewModel
.
Group_Id
),
query
.
Group_Id
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_Setting_ViewModel
.
School_Id
),
query
.
School_Id
);
if
(
query
.
SettingId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_Setting_ViewModel
.
SettingId
),
query
.
SettingId
);
}
return
Get
<
RB_Course_Setting_ViewModel
>(
builder
.
ToString
()).
FirstOrDefault
();
}
}
}
Edu.Repository/Course/RB_Course_SourceRepository.cs
0 → 100644
View file @
fe834d1c
using
Edu.Model.ViewModel.Course
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 课程资料仓储层
/// </summary>
public
class
RB_Course_SourceRepository
:
BaseRepository
<
Model
.
Entity
.
Course
.
RB_Course_Source
>
{
/// <summary>
/// 获取课程资料分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Course_Source_ViewModel
>
GetSourcePageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Course_Source_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
var
parameters
=
new
DynamicParameters
();
builder
.
AppendFormat
(
@"
SELECT *
FROM rb_course_source
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_Source_ViewModel
.
Group_Id
),
query
.
Group_Id
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_Source_ViewModel
.
School_Id
),
query
.
School_Id
);
if
(
query
.
CourseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_Source_ViewModel
.
CourseId
),
query
.
CourseId
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
SourceName
))
{
builder
.
AppendFormat
(
" AND {0} LIKE @SourceName "
,
nameof
(
RB_Course_Source_ViewModel
.
SourceName
));
parameters
.
Add
(
"SourceName"
,
"%"
+
query
.
SourceName
.
Trim
()
+
"%"
);
}
return
GetPage
<
RB_Course_Source_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
\ No newline at end of file
Edu.Repository/Course/RB_Course_TeachPlanRepository.cs
0 → 100644
View file @
fe834d1c
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 课程教案仓储层
/// </summary>
public
class
RB_Course_TeachPlanRepository
:
BaseRepository
<
Model
.
Entity
.
Course
.
RB_Course_TeachPlan
>
{
/// <summary>
/// 获取课程教案分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Course_TeachPlan_ViewModel
>
GetCourseTeachPlanPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Course_TeachPlan_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
var
parameters
=
new
DynamicParameters
();
builder
.
AppendFormat
(
@"
SELECT *
FROM rb_course_teachplan
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_TeachPlan_ViewModel
.
Group_Id
),
query
.
Group_Id
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_TeachPlan_ViewModel
.
School_Id
),
query
.
School_Id
);
if
(
query
.
CourseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Course_TeachPlan_ViewModel
.
CourseId
),
query
.
CourseId
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
PlanName
))
{
builder
.
AppendFormat
(
" AND {0} LIKE @PlanName "
,
nameof
(
RB_Course_TeachPlan_ViewModel
.
PlanName
));
parameters
.
Add
(
"PlanName"
,
"%"
+
query
.
PlanName
.
Trim
()
+
"%"
);
}
return
GetPage
<
RB_Course_TeachPlan_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
\ No newline at end of file
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