Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
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
黄奎
mall.oytour.com
Commits
e43cdc91
Commit
e43cdc91
authored
Feb 01, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
ef46e2f1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
607 additions
and
9 deletions
+607
-9
RB_Point_TeacherCourse.cs
Mall.Model/Entity/Point/RB_Point_TeacherCourse.cs
+6
-0
RB_Point_TeacherCourseOrder.cs
Mall.Model/Entity/Point/RB_Point_TeacherCourseOrder.cs
+145
-0
RB_Point_TeacherCourseOrder_Extend.cs
....Model/Extend/Point/RB_Point_TeacherCourseOrder_Extend.cs
+12
-0
RB_Point_TeacherCourse_Extend.cs
Mall.Model/Extend/Point/RB_Point_TeacherCourse_Extend.cs
+19
-6
PointModule.cs
Mall.Module.Education/PointModule.cs
+92
-1
RB_Point_TeacherCourseOrderRepository.cs
...Repository/Point/RB_Point_TeacherCourseOrderRepository.cs
+81
-0
RB_Point_TeacherCourseRepository.cs
Mall.Repository/Point/RB_Point_TeacherCourseRepository.cs
+1
-1
PointController.cs
Mall.WebApi/Controllers/Education/PointController.cs
+251
-1
No files found.
Mall.Model/Entity/Point/RB_Point_TeacherCourse.cs
View file @
e43cdc91
...
...
@@ -64,6 +64,12 @@ namespace Mall.Model.Entity.Point
/// </summary>
public
decimal
StudyDuration
{
get
;
set
;
}
/// <summary>
/// 时长单位
/// </summary>
public
DurationUnitEnum
DurationUnit
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
...
...
Mall.Model/Entity/Point/RB_Point_TeacherCourseOrder.cs
0 → 100644
View file @
e43cdc91
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Common.Enum.Point
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.Point
{
/// <summary>
/// 老师课程
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Point_TeacherCourseOrder
{
public
int
ID
{
get
;
set
;
}
/// <summary>
/// 课程分类id
/// </summary>
public
int
CourseClassId
{
get
;
set
;
}
/// <summary>
/// 课程Id
/// </summary>
public
string
CourseId
{
get
;
set
;
}
/// <summary>
/// 老师id
/// </summary>
public
int
TeacherId
{
get
;
set
;
}
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// 学习时间
/// </summary>
public
DateTime
StudyDate
{
get
;
set
;
}
/// <summary>
/// 时长
/// </summary>
public
decimal
StudyDuration
{
get
;
set
;
}
/// <summary>
/// 时长
/// </summary>
public
decimal
TotalStudyDuration
{
get
;
set
;
}
/// <summary>
/// 时长单位
/// </summary>
public
DurationUnitEnum
DurationUnit
{
get
;
set
;
}
/// <summary>
/// 订单状态 0-代付款,1-已支付,2-已确认,3已完成
/// </summary>
public
int
OrderStaus
{
get
;
set
;
}
/// <summary>
/// 是否推送放假信息0-否,1-是
/// </summary>
public
int
IsSendRoom
{
get
;
set
;
}
/// <summary>
/// 房间信息
/// </summary>
public
string
RoomInfo
{
get
;
set
;
}
/// <summary>
/// 总点数
/// </summary>
public
int
TotalPointNum
{
get
;
set
;
}
/// <summary>
/// 实际总点数
/// </summary>
public
int
ActualPointNum
{
get
;
set
;
}
/// <summary>
/// 基础点数
/// </summary>
public
int
BasePointNum
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
?
State
{
get
;
set
;
}
/// <summary>
/// 商户号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// UpdateDate
/// </summary>
public
DateTime
?
UpdateDate
{
get
;
set
;
}
}
}
Mall.Model/Extend/Point/RB_Point_TeacherCourseOrder_Extend.cs
0 → 100644
View file @
e43cdc91
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Point
;
namespace
Mall.Model.Extend.Point
{
public
class
RB_Point_TeacherCourseOrder_Extend
:
RB_Point_TeacherCourseOrder
{
}
}
Mall.Model/Extend/Point/RB_Point_TeacherCourse_Extend.cs
View file @
e43cdc91
...
...
@@ -20,22 +20,35 @@ namespace Mall.Model.Extend.Point
/// </summary>
public
StudentNumTypeEnum
StudentNumType
{
get
;
set
;
}
/// <summary>
///
是否为公开课0-否,1-是
///
分类名称
/// </summary>
public
int
IsPublic
{
get
;
set
;
}
public
string
ClassName
{
get
;
set
;
}
/// <summary>
///
是否免费0-否,1-是
///
学生人数名称
/// </summary>
public
int
IsFree
{
get
;
set
;
}
public
string
StudentNumTypeName
{
get
;
set
;
}
/// <summary>
/// 时长
单位
/// 时长
名称
/// </summary>
public
DurationUnitEnum
DurationUnit
{
get
;
set
;
}
public
string
DurationUnitName
{
get
;
set
;
}
/// <summary>
/// 是否为公开课0-否,1-是
/// </summary>
public
int
IsPublic
{
get
;
set
;
}
/// <summary>
/// 是否免费0-否,1-是
/// </summary>
public
int
IsFree
{
get
;
set
;
}
...
...
Mall.Module.Education/PointModule.cs
View file @
e43cdc91
...
...
@@ -350,7 +350,7 @@ namespace Mall.Module.Education
{
nameof
(
RB_Point_CourseClass_Extend
.
Sort
),
model
.
Sort
},
{
nameof
(
RB_Point_CourseClass_Extend
.
PointNum
),
model
.
PointNum
},
{
nameof
(
RB_Point_CourseClass_Extend
.
Duration
),
model
.
Duration
},
{
nameof
(
RB_Point_CourseClass_Extend
.
DurationUnit
),
(
int
)
model
.
Duration
}
{
nameof
(
RB_Point_CourseClass_Extend
.
DurationUnit
),
model
.
DurationUnit
}
};
IList
<
WhereHelper
>
auditrecordWhereHelpers
=
new
List
<
WhereHelper
>
{
...
...
@@ -441,6 +441,97 @@ namespace Mall.Module.Education
{
return
pointTeacherCourseRepository
.
GetTeacherCoursePageList
(
pageIndex
,
pageSize
,
out
rowsCount
,
where
);
}
/// <summary>
/// 新增/修改老师排课
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetTeacherCourse
(
RB_Point_TeacherCourse_Extend
model
)
{
if
(
model
.
ID
==
0
)
{
return
pointTeacherCourseRepository
.
Insert
(
model
)
>
0
;
}
else
{
IDictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Point_TeacherCourse_Extend
.
UpdateDate
),
model
.
UpdateDate
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
CourseClassId
),
model
.
CourseClassId
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
TeacherId
),
model
.
TeacherId
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
StudyDate
),
model
.
StudyDate
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
StudyStartDate
),
model
.
StudyStartDate
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
StudyEndDate
),
model
.
StudyEndDate
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
PointNum
),
model
.
PointNum
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
CourseName
),
model
.
CourseName
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
MinDuration
),
model
.
MinDuration
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
StudyDuration
),
model
.
StudyDuration
}
};
IList
<
WhereHelper
>
auditrecordWhereHelpers
=
new
List
<
WhereHelper
>
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Point_TeacherCourse_Extend
.
ID
),
FiledValue
=
model
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Point_TeacherCourse_Extend
.
TenantId
),
FiledValue
=
model
.
TenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Point_TeacherCourse_Extend
.
MallBaseId
),
FiledValue
=
model
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
pointTeacherCourseRepository
.
Update
(
fileds
,
auditrecordWhereHelpers
);
}
}
/// <summary>
/// 删除老师排课
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
DeleteTeacherCourse
(
RB_Point_TeacherCourse_Extend
model
)
{
IDictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Point_TeacherCourse_Extend
.
UpdateDate
),
model
.
UpdateDate
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
State
),
1
}
};
IList
<
WhereHelper
>
auditrecordWhereHelpers
=
new
List
<
WhereHelper
>
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Point_TeacherCourse_Extend
.
ID
),
FiledValue
=
model
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Point_TeacherCourse_Extend
.
TenantId
),
FiledValue
=
model
.
TenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Point_TeacherCourse_Extend
.
MallBaseId
),
FiledValue
=
model
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
pointTeacherCourseRepository
.
Update
(
fileds
,
auditrecordWhereHelpers
);
}
#
endregion
}
}
Mall.Repository/Point/RB_Point_TeacherCourseOrderRepository.cs
0 → 100644
View file @
e43cdc91
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Mall.Model.Entity.Point
;
using
Mall.Model.Extend.Point
;
namespace
Mall.Repository.Point
{
public
class
RB_Point_TeacherCourseOrderRepository
:
BaseRepository
<
RB_Point_TeacherCourseOrder
>
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_Point_TeacherCourseOrder
);
}
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public
List
<
RB_Point_TeacherCourseOrder_Extend
>
GetPointOrderList
(
RB_Point_TeacherCourseOrder_Extend
where
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
Append
(
$@"SELECT * from RB_Point_TeacherCourseOrder where state=0"
);
if
(
where
!=
null
)
{
if
(
where
.
TenantId
>
0
)
{
sb
.
AppendFormat
(
" and TenantId={0}"
,
where
.
TenantId
);
}
if
(
where
.
MallBaseId
>
0
)
{
sb
.
AppendFormat
(
" and MallBaseId={0}"
,
where
.
MallBaseId
);
}
if
(
where
.
ID
>
0
)
{
sb
.
AppendFormat
(
" and ID={0}"
,
where
.
ID
);
}
}
return
Get
<
RB_Point_TeacherCourseOrder_Extend
>(
sb
.
ToString
()).
ToList
();
}
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="where"></param>
/// <returns></returns>
public
List
<
RB_Point_TeacherCourseOrder_Extend
>
GetPointOrderPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Point_TeacherCourseOrder_Extend
where
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
Append
(
$@"SELECT a.*,b.`Name` as UserName from RB_Point_TeacherCourseOrder as a LEFT JOIN rb_member_user as b on a.UserId=b.Id where a.state=0 "
);
if
(
where
!=
null
)
{
if
(
where
.
TenantId
>
0
)
{
sb
.
AppendFormat
(
" and a.TenantId={0}"
,
where
.
TenantId
);
}
if
(
where
.
MallBaseId
>
0
)
{
sb
.
AppendFormat
(
" and a.MallBaseId={0}"
,
where
.
MallBaseId
);
}
if
(
where
.
ID
>
0
)
{
sb
.
AppendFormat
(
" and a.ID={0}"
,
where
.
ID
);
}
if
(
where
.
OrderStaus
>
0
)
{
sb
.
AppendFormat
(
" and a.OrderStaus={0}"
,
where
.
OrderStaus
);
}
}
return
GetPage
<
RB_Point_TeacherCourseOrder_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
sb
.
ToString
()).
ToList
();
}
}
}
Mall.Repository/Point/RB_Point_TeacherCourseRepository.cs
View file @
e43cdc91
...
...
@@ -23,7 +23,7 @@ namespace Mall.Repository.Point
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
Append
(
$@"SELECT tc.*,et.`Name` as TeacherName,et.TeacherLogo,cc.CourseClassType,
cc.StudentNumType,cc.IsPublic,cc.IsFree
,cc.DurationUnit
cc.StudentNumType,cc.IsPublic,cc.IsFree
from RB_Point_TeacherCourse as tc
LEFT JOIN rb_point_courseclass as cc on tc.CourseClassId=cc.ID
LEFT JOIN rb_education_teacher as et on tc.TeacherId=et.ID
...
...
Mall.WebApi/Controllers/Education/PointController.cs
View file @
e43cdc91
This diff is collapsed.
Click to expand it.
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