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
b46e61a0
Commit
b46e61a0
authored
Jan 29, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
7814ee30
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
304 additions
and
2 deletions
+304
-2
CourseClassTypeEnum.cs
Mall.Common/Enum/Point/CourseClassTypeEnum.cs
+36
-0
DurationUnitEnum.cs
Mall.Common/Enum/Point/DurationUnitEnum.cs
+21
-0
RB_Point_CourseClass.cs
Mall.Model/Entity/Point/RB_Point_CourseClass.cs
+111
-0
RB_Point_CourseClass_Extend.cs
Mall.Model/Extend/Point/RB_Point_CourseClass_Extend.cs
+19
-0
PointModule.cs
Mall.Module.Education/PointModule.cs
+35
-2
RB_Point_CourseClassRepository.cs
Mall.Repository/Point/RB_Point_CourseClassRepository.cs
+82
-0
No files found.
Mall.Common/Enum/Point/CourseClassTypeEnum.cs
0 → 100644
View file @
b46e61a0
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Common.Plugin
;
namespace
Mall.Common.Enum.Point
{
public
enum
CourseClassTypeEnum
{
/// <summary>
/// 体验课
/// </summary>
[
EnumField
(
"体验课"
)]
Experience
=
1
,
/// <summary>
/// 一对一外教
/// </summary>
[
EnumField
(
"一对一外教"
)]
OneForeignTeacher
=
2
,
/// <summary>
/// 一对一中教
/// </summary>
[
EnumField
(
"一对一中教"
)]
OneTeacher
=
3
,
/// <summary>
/// 公开课
/// </summary>
[
EnumField
(
"公开课"
)]
Public
=
24
,
/// <summary>
/// 兴趣主题课
/// </summary>
[
EnumField
(
"兴趣主题课"
)]
InterestTopics
=
5
}
}
Mall.Common/Enum/Point/DurationUnitEnum.cs
0 → 100644
View file @
b46e61a0
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Common.Plugin
;
namespace
Mall.Common.Enum.Point
{
public
enum
DurationUnitEnum
{
/// <summary>
/// 分钟
/// </summary>
[
EnumField
(
"分钟"
)]
Minute
=
1
,
/// <summary>
/// 小时
/// </summary>
[
EnumField
(
"小时"
)]
Hour
=
2
}
}
Mall.Model/Entity/Point/RB_Point_CourseClass.cs
0 → 100644
View file @
b46e61a0
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_CourseClass
{
public
int
ID
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
?
Sort
{
get
;
set
;
}
/// <summary>
/// 分类类型
/// </summary>
public
CourseClassTypeEnum
CourseClassType
{
get
;
set
;
}
/// <summary>
/// 上课人数
/// </summary>
public
int
StudentNumType
{
get
;
set
;
}
/// <summary>
/// 是否为公开课0-否,1-是
/// </summary>
public
int
IsPublic
{
get
;
set
;
}
/// <summary>
/// 是否免费0-否,1-是
/// </summary>
public
int
IsFree
{
get
;
set
;
}
/// <summary>
/// 点数
/// </summary>
public
int
PointNum
{
get
;
set
;
}
/// <summary>
/// 多少时长
/// </summary>
public
int
Duration
{
get
;
set
;
}
/// <summary>
/// 时长单位
/// </summary>
public
DurationUnitEnum
DurationUnit
{
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_CourseClass_Extend.cs
0 → 100644
View file @
b46e61a0
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Point
;
namespace
Mall.Model.Extend.Point
{
/// <summary>
/// 课程分类扩展表
/// </summary>
public
class
RB_Point_CourseClass_Extend
:
RB_Point_CourseClass
{
/// <summary>
/// 分类名称
/// </summary>
public
string
ClassName
{
get
;
set
;
}
}
}
Mall.Module.Education/PointModule.cs
View file @
b46e61a0
...
...
@@ -20,6 +20,8 @@ namespace Mall.Module.Education
/// 会员信息
/// </summary>
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
private
readonly
RB_Point_CourseClassRepository
pointCourseClassRepository
=
new
RB_Point_CourseClassRepository
();
#
region
点数商品
/// <summary>
/// 获取列表
...
...
@@ -65,7 +67,7 @@ namespace Mall.Module.Education
{
{
nameof
(
RB_Point_Goods_Extend
.
UpdateDate
),
model
.
UpdateDate
},
{
nameof
(
RB_Point_Goods_Extend
.
GoodsName
),
model
.
GoodsName
},
{
nameof
(
RB_Point_Goods_Extend
.
GivePo
nit
),
model
.
GivePoni
t
},
{
nameof
(
RB_Point_Goods_Extend
.
GivePo
int
),
model
.
GivePoin
t
},
{
nameof
(
RB_Point_Goods_Extend
.
OriginalPrice
),
model
.
OriginalPrice
},
{
nameof
(
RB_Point_Goods_Extend
.
SellingPrice
),
model
.
SellingPrice
},
{
nameof
(
RB_Point_Goods_Extend
.
Sort
),
model
.
Sort
},
...
...
@@ -266,7 +268,7 @@ namespace Mall.Module.Education
OperatorEnum
=
OperatorEnum
.
Equal
}
};
member_UserRepository
.
Update
(
filedsUser
,
userWhereHelpers
,
trans
);
}
return
flag
;
}
...
...
@@ -294,6 +296,37 @@ namespace Mall.Module.Education
#
endregion
#
region
在线课程分类
/// <summary>
/// 获取列表
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public
List
<
RB_Point_CourseClass_Extend
>
GetPointCourseClassList
(
RB_Point_CourseClass_Extend
where
)
{
return
pointCourseClassRepository
.
GetPointCourseClassList
(
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_CourseClass_Extend
>
GetPointCourseClassPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Point_CourseClass_Extend
where
)
{
return
pointCourseClassRepository
.
GetPointCourseClassPageList
(
pageIndex
,
pageSize
,
out
rowsCount
,
where
);
}
#
endregion
}
}
Mall.Repository/Point/RB_Point_CourseClassRepository.cs
0 → 100644
View file @
b46e61a0
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_CourseClassRepository
:
BaseRepository
<
RB_Point_CourseClass
>
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_Point_CourseClass
);
}
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public
List
<
RB_Point_CourseClass_Extend
>
GetPointCourseClassList
(
RB_Point_CourseClass_Extend
where
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
Append
(
$@"SELECT * from RB_Point_CourseClass 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_CourseClass_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_CourseClass_Extend
>
GetPointCourseClassPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Point_CourseClass_Extend
where
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
Append
(
$@"SELECT * from RB_Point_CourseClass 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
);
}
if
(
where
.
CourseClassType
>
0
)
{
sb
.
AppendFormat
(
" and CourseClassType={0}"
,
(
int
)
where
.
CourseClassType
);
}
}
return
GetPage
<
RB_Point_CourseClass_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
sb
.
ToString
()).
ToList
();
}
}
}
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