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
b2889820
Commit
b2889820
authored
Feb 01, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点数订单
parent
65cc279b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
119 additions
and
9 deletions
+119
-9
OrderStausEnum.cs
Mall.Common/Enum/Point/OrderStausEnum.cs
+4
-4
RB_Point_TeacherCourseOrder_Extend.cs
....Model/Extend/Point/RB_Point_TeacherCourseOrder_Extend.cs
+9
-0
PointModule.cs
Mall.Module.Education/PointModule.cs
+2
-2
RB_Point_TeacherCourseOrderRepository.cs
...Repository/Point/RB_Point_TeacherCourseOrderRepository.cs
+10
-2
AppletPointController.cs
Mall.WebApi/Controllers/Education/AppletPointController.cs
+93
-0
PointController.cs
Mall.WebApi/Controllers/Education/PointController.cs
+1
-1
No files found.
Mall.Common/Enum/Point/OrderStausEnum.cs
View file @
b2889820
...
...
@@ -14,21 +14,21 @@ namespace Mall.Common.Enum.Point
/// 待付款
/// </summary>
[
EnumField
(
"待付款"
)]
NoPaid
=
0
,
NoPaid
=
1
,
/// <summary>
/// 待确认
/// </summary>
[
EnumField
(
"待确认"
)]
Paid
=
1
,
Paid
=
2
,
/// <summary>
/// 待上课
/// </summary>
[
EnumField
(
"待上课"
)]
NoClass
=
2
,
NoClass
=
3
,
/// <summary>
/// 完成
/// </summary>
[
EnumField
(
"完成"
)]
Complete
=
3
Complete
=
4
}
}
Mall.Model/Extend/Point/RB_Point_TeacherCourseOrder_Extend.cs
View file @
b2889820
...
...
@@ -31,5 +31,14 @@ namespace Mall.Model.Extend.Point
/// 用户名称
/// </summary>
public
string
UserName
{
get
;
set
;
}
/// <summary>
/// 开始时间
/// </summary>
public
string
StartTime
{
get
;
set
;
}
/// <summary>
/// 结束时间
/// </summary>
public
string
EndTime
{
get
;
set
;
}
}
}
Mall.Module.Education/PointModule.cs
View file @
b2889820
...
...
@@ -591,9 +591,9 @@ namespace Mall.Module.Education
/// </summary>
/// <param name="orderId"></param>
/// <returns></returns>
public
RB_Point_TeacherCourseOrder_Extend
GetPointOrderInfo
(
int
orderId
,
int
MallBase
Id
)
public
RB_Point_TeacherCourseOrder_Extend
GetPointOrderInfo
(
int
orderId
,
int
Tenant
Id
)
{
var
model
=
pointTeacherCourseOrderRepository
.
GetPointOrderInfo
(
new
RB_Point_TeacherCourseOrder_Extend
()
{
ID
=
orderId
,
MallBaseId
=
MallBase
Id
});
var
model
=
pointTeacherCourseOrderRepository
.
GetPointOrderInfo
(
new
RB_Point_TeacherCourseOrder_Extend
()
{
ID
=
orderId
,
TenantId
=
Tenant
Id
});
return
model
;
}
...
...
Mall.Repository/Point/RB_Point_TeacherCourseOrderRepository.cs
View file @
b2889820
...
...
@@ -76,7 +76,7 @@ where a.state=0 ");
{
sb
.
AppendFormat
(
" and a.ID={0}"
,
where
.
ID
);
}
if
(
where
.
OrderStaus
>
=
0
)
if
(
where
.
OrderStaus
>
0
)
{
sb
.
AppendFormat
(
" and a.OrderStaus={0}"
,
where
.
OrderStaus
);
}
...
...
@@ -92,6 +92,14 @@ where a.state=0 ");
{
sb
.
AppendFormat
(
" and a.UserId={0}"
,
where
.
UserId
);
}
if
(!
string
.
IsNullOrEmpty
(
where
.
StartTime
))
{
sb
.
AppendFormat
(
" and a.CreateDate >='{0}'"
,
where
.
StartTime
);
}
if
(!
string
.
IsNullOrEmpty
(
where
.
EndTime
))
{
sb
.
AppendFormat
(
" and a.CreateDate <='{0}'"
,
where
.
EndTime
+
" 23:59:59"
);
}
}
sb
.
AppendFormat
(
" order by a.ID desc"
);
return
GetPage
<
RB_Point_TeacherCourseOrder_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
sb
.
ToString
()).
ToList
();
...
...
@@ -126,7 +134,7 @@ where a.state=0 ");
{
sb
.
AppendFormat
(
" and a.ID={0}"
,
where
.
ID
);
}
if
(
where
.
OrderStaus
>
=
0
)
if
(
where
.
OrderStaus
>
0
)
{
sb
.
AppendFormat
(
" and a.OrderStaus={0}"
,
where
.
OrderStaus
);
}
...
...
Mall.WebApi/Controllers/Education/AppletPointController.cs
View file @
b2889820
...
...
@@ -62,5 +62,98 @@ namespace Mall.WebApi.Controllers.Education
return
ApiResult
.
Success
(
""
,
pagelist
);
}
#
endregion
#
region
订单列表
/// <summary>
/// 获取订单列表分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetPointOrderPageList
()
{
var
parms
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
RB_Point_TeacherCourseOrder_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Point_TeacherCourseOrder_Extend
>(
RequestParm
.
msg
.
ToString
());
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
UserId
=
userInfo
.
UserId
;
//只能查询自己的订单列表
var
list
=
pointModule
.
GetPointOrderPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
ID
,
x
.
CourseClassId
,
CourseClassTypeName
=
x
.
CourseClassType
.
GetEnumName
(),
x
.
CourseId
,
x
.
CourseName
,
x
.
TeacherId
,
x
.
TeacherName
,
x
.
TeacherLogo
,
StudyDate
=
x
.
StudyDate
.
ToString
(
"MM-dd HH:mm"
),
x
.
StudyDuration
,
x
.
TotalStudyDuration
,
DurationUnit
=
x
.
DurationUnit
.
GetEnumName
(),
x
.
OrderStaus
,
OrderStatusName
=
x
.
OrderStaus
.
GetEnumName
(),
x
.
IsSendRoom
,
x
.
RoomInfo
,
x
.
TotalPointNum
,
x
.
ActualPointNum
,
x
.
BasePointNum
,
x
.
UserId
,
x
.
UserName
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 获取订单详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetPointOrderInfo
()
{
var
userInfo
=
AppletUserInfo
;
var
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
int
OrderId
=
parms
.
GetInt
(
"OrderId"
,
0
);
if
(
OrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递订单id"
);
}
var
model
=
pointModule
.
GetPointOrderInfo
(
OrderId
,
userInfo
.
TenantId
);
if
(
model
==
null
)
{
return
ApiResult
.
Failed
(
"订单不存在"
);
}
if
(
model
.
UserId
!=
userInfo
.
UserId
)
{
return
ApiResult
.
Failed
(
"不是你的订单,无法查看"
);
}
return
ApiResult
.
Success
(
""
,
new
{
model
.
ID
,
model
.
CourseClassId
,
CourseClassTypeName
=
model
.
CourseClassType
.
GetEnumName
(),
model
.
CourseId
,
model
.
CourseName
,
model
.
TeacherId
,
model
.
TeacherName
,
model
.
TeacherLogo
,
StudyDate
=
model
.
StudyDate
.
ToString
(
"MM-dd HH:mm"
),
model
.
StudyDuration
,
model
.
TotalStudyDuration
,
DurationUnit
=
model
.
DurationUnit
.
GetEnumName
(),
model
.
OrderStaus
,
OrderStatusName
=
model
.
OrderStaus
.
GetEnumName
(),
model
.
IsSendRoom
,
model
.
RoomInfo
,
model
.
TotalPointNum
,
model
.
ActualPointNum
,
model
.
BasePointNum
,
model
.
UserId
,
model
.
UserName
,
CreateDate
=
model
.
CreateDate
.
HasValue
?
model
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
});
}
#
endregion
}
}
Mall.WebApi/Controllers/Education/PointController.cs
View file @
b2889820
...
...
@@ -249,7 +249,7 @@ namespace Mall.WebApi.Controllers.Education
return
ApiResult
.
ParamIsNull
(
"请传递订单id"
);
}
var
model
=
pointModule
.
GetPointOrderInfo
(
OrderId
,
userInfo
.
MallBase
Id
);
var
model
=
pointModule
.
GetPointOrderInfo
(
OrderId
,
userInfo
.
Tenant
Id
);
if
(
model
==
null
)
{
return
ApiResult
.
Failed
(
"订单不存在"
);}
return
ApiResult
.
Success
(
""
,
new
{
...
...
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