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
dbed0067
Commit
dbed0067
authored
Feb 01, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
52ff59e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
3 deletions
+76
-3
RB_Point_TeacherCourseOrder.cs
Mall.Model/Entity/Point/RB_Point_TeacherCourseOrder.cs
+7
-2
PointModule.cs
Mall.Module.Education/PointModule.cs
+69
-1
No files found.
Mall.Model/Entity/Point/RB_Point_TeacherCourseOrder.cs
View file @
dbed0067
...
@@ -22,6 +22,10 @@ namespace Mall.Model.Entity.Point
...
@@ -22,6 +22,10 @@ namespace Mall.Model.Entity.Point
public
int
CourseClassId
{
get
;
set
;
}
public
int
CourseClassId
{
get
;
set
;
}
/// <summary>
/// 课程名称
/// </summary>
public
string
CourseName
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 课程Id
/// 课程Id
/// </summary>
/// </summary>
...
@@ -34,8 +38,9 @@ namespace Mall.Model.Entity.Point
...
@@ -34,8 +38,9 @@ namespace Mall.Model.Entity.Point
/// </summary>
/// </summary>
public
int
TeacherId
{
get
;
set
;
}
public
int
TeacherId
{
get
;
set
;
}
/// <summary>
/// 用户id
/// </summary>
public
int
UserId
{
get
;
set
;
}
public
int
UserId
{
get
;
set
;
}
...
...
Mall.Module.Education/PointModule.cs
View file @
dbed0067
...
@@ -22,6 +22,7 @@ namespace Mall.Module.Education
...
@@ -22,6 +22,7 @@ namespace Mall.Module.Education
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
private
readonly
RB_Point_CourseClassRepository
pointCourseClassRepository
=
new
RB_Point_CourseClassRepository
();
private
readonly
RB_Point_CourseClassRepository
pointCourseClassRepository
=
new
RB_Point_CourseClassRepository
();
private
readonly
RB_Point_TeacherCourseRepository
pointTeacherCourseRepository
=
new
RB_Point_TeacherCourseRepository
();
private
readonly
RB_Point_TeacherCourseRepository
pointTeacherCourseRepository
=
new
RB_Point_TeacherCourseRepository
();
private
readonly
RB_Point_TeacherCourseOrderRepository
pointTeacherCourseOrderRepository
=
new
RB_Point_TeacherCourseOrderRepository
();
#
region
点数商品
#
region
点数商品
...
@@ -320,7 +321,8 @@ namespace Mall.Module.Education
...
@@ -320,7 +321,8 @@ namespace Mall.Module.Education
/// </summary>
/// </summary>
/// <param name="userId"></param>
/// <param name="userId"></param>
/// <returns></returns>
/// <returns></returns>
public
int
GetUserPointBalance
(
int
userId
)
{
public
int
GetUserPointBalance
(
int
userId
)
{
return
member_UserRepository
.
GetEntity
(
userId
)?.
PointNum
??
0
;
return
member_UserRepository
.
GetEntity
(
userId
)?.
PointNum
??
0
;
}
}
#
endregion
#
endregion
...
@@ -557,5 +559,71 @@ namespace Mall.Module.Education
...
@@ -557,5 +559,71 @@ namespace Mall.Module.Education
}
}
#
endregion
#
endregion
#
region
订单
/// <summary>
/// 获取列表
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public
List
<
RB_Point_TeacherCourseOrder_Extend
>
GetPointOrderList
(
RB_Point_TeacherCourseOrder_Extend
where
)
{
return
pointTeacherCourseOrderRepository
.
GetPointOrderList
(
where
);
}
/// <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
)
{
return
pointTeacherCourseOrderRepository
.
GetPointOrderPageList
(
pageIndex
,
pageSize
,
out
rowsCount
,
where
);
}
public
bool
SetTeacherCourseOrder
(
RB_Point_TeacherCourseOrder_Extend
model
)
{
bool
flag
=
false
;
var
trans
=
pointTeacherCourseOrderRepository
.
DbTransaction
;
var
umodel
=
member_UserRepository
.
GetEntity
(
model
.
UserId
);
if
(
umodel
==
null
)
{
return
false
;
}
int
orderId
=
0
;
if
(
model
.
ID
==
0
)
{
orderId
=
pointTeacherCourseOrderRepository
.
Insert
(
model
,
trans
);
}
else
{
orderId
=
model
.
ID
;
}
RB_Member_PointBalance_Extend
memberBalanceModel
=
new
RB_Member_PointBalance_Extend
{
UserId
=
model
.
UserId
,
Type
=
Common
.
Enum
.
MarketingCenter
.
RecordTypeEnum
.
Income
,
PonitNum
=
model
.
TotalPointNum
,
Description
=
"购买直播课程消费"
+
model
.
TotalPointNum
+
"点"
,
CreateDate
=
System
.
DateTime
.
Now
,
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
Remarks
=
"上课时间:"
+
model
.
StudyDate
.
ToString
(
"yyyy-MM-dd HH:mm"
)
+
"时长"
+
model
.
TotalStudyDuration
.
ToString
(
"f2"
)
+
Common
.
Plugin
.
EnumHelper
.
GetEnumName
(
model
.
DurationUnit
)
,
PlatformType
=
umodel
.
Source
};
memberPointBalanceRepository
.
Insert
(
memberBalanceModel
,
trans
);
return
flag
;
}
#
endregion
}
}
}
}
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