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
f093383b
Commit
f093383b
authored
Feb 03, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
ce6c6bcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
4 deletions
+70
-4
PointModule.cs
Mall.Module.Education/PointModule.cs
+38
-2
AppletPointController.cs
Mall.WebApi/Controllers/Education/AppletPointController.cs
+32
-2
No files found.
Mall.Module.Education/PointModule.cs
View file @
f093383b
...
@@ -801,6 +801,41 @@ namespace Mall.Module.Education
...
@@ -801,6 +801,41 @@ namespace Mall.Module.Education
}
}
public
bool
DeleteCourseOrder
(
RB_Point_TeacherCourseOrder_Extend
model
)
{
IDictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Point_TeacherCourseOrder_Extend
.
State
),
1
},
{
nameof
(
RB_Point_TeacherCourseOrder_Extend
.
UpdateDate
),
model
.
UpdateDate
},
};
IList
<
WhereHelper
>
auditrecordWhereHelpers
=
new
List
<
WhereHelper
>
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Point_TeacherCourseOrder_Extend
.
ID
),
FiledValue
=
model
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Point_TeacherCourseOrder_Extend
.
TenantId
),
FiledValue
=
model
.
TenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Point_TeacherCourseOrder_Extend
.
MallBaseId
),
FiledValue
=
model
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
pointTeacherCourseOrderRepository
.
Update
(
fileds
,
auditrecordWhereHelpers
);
}
/// <summary>
/// <summary>
/// 确认订单
/// 确认订单
/// </summary>
/// </summary>
...
@@ -921,7 +956,8 @@ namespace Mall.Module.Education
...
@@ -921,7 +956,8 @@ namespace Mall.Module.Education
{
{
allTotalPointNum
=
0
;
allTotalPointNum
=
0
;
}
}
else
{
else
{
allTotalPointNum
=
(
umodel
.
PointNum
-
allTotalPointNum
);
allTotalPointNum
=
(
umodel
.
PointNum
-
allTotalPointNum
);
}
}
memberBalanceModel
.
Type
=
Common
.
Enum
.
MarketingCenter
.
RecordTypeEnum
.
Expend
;
memberBalanceModel
.
Type
=
Common
.
Enum
.
MarketingCenter
.
RecordTypeEnum
.
Expend
;
...
@@ -930,7 +966,7 @@ namespace Mall.Module.Education
...
@@ -930,7 +966,7 @@ namespace Mall.Module.Education
else
if
(
model
.
ActualPointNum
<
model
.
TotalPointNum
)
else
if
(
model
.
ActualPointNum
<
model
.
TotalPointNum
)
{
{
allTotalPointNum
=
model
.
TotalPointNum
-
model
.
ActualPointNum
;
allTotalPointNum
=
model
.
TotalPointNum
-
model
.
ActualPointNum
;
allTotalPointNum
=
(
umodel
.
PointNum
+
allTotalPointNum
);
allTotalPointNum
=
(
umodel
.
PointNum
+
allTotalPointNum
);
memberBalanceModel
.
Type
=
Common
.
Enum
.
MarketingCenter
.
RecordTypeEnum
.
Income
;
memberBalanceModel
.
Type
=
Common
.
Enum
.
MarketingCenter
.
RecordTypeEnum
.
Income
;
memberBalanceModel
.
Description
=
"购买直播课程退费"
+
(
model
.
TotalPointNum
-
model
.
ActualPointNum
)
+
"点"
;
memberBalanceModel
.
Description
=
"购买直播课程退费"
+
(
model
.
TotalPointNum
-
model
.
ActualPointNum
)
+
"点"
;
}
}
...
...
Mall.WebApi/Controllers/Education/AppletPointController.cs
View file @
f093383b
...
@@ -197,7 +197,7 @@ namespace Mall.WebApi.Controllers.Education
...
@@ -197,7 +197,7 @@ namespace Mall.WebApi.Controllers.Education
x
.
StudyDuration
,
x
.
StudyDuration
,
x
.
TotalStudyDuration
,
x
.
TotalStudyDuration
,
x
.
DurationUnit
,
x
.
DurationUnit
,
DurationUnit
=
x
.
DurationUnit
.
GetEnumName
(),
DurationUnit
Name
=
x
.
DurationUnit
.
GetEnumName
(),
x
.
OrderStaus
,
x
.
OrderStaus
,
OrderStatusName
=
x
.
OrderStaus
.
GetEnumName
(),
OrderStatusName
=
x
.
OrderStaus
.
GetEnumName
(),
x
.
IsSendRoom
,
x
.
IsSendRoom
,
...
@@ -245,7 +245,7 @@ namespace Mall.WebApi.Controllers.Education
...
@@ -245,7 +245,7 @@ namespace Mall.WebApi.Controllers.Education
model
.
StudyDuration
,
model
.
StudyDuration
,
model
.
TotalStudyDuration
,
model
.
TotalStudyDuration
,
model
.
DurationUnit
,
model
.
DurationUnit
,
DurationUnit
=
model
.
DurationUnit
.
GetEnumName
(),
DurationUnit
Name
=
model
.
DurationUnit
.
GetEnumName
(),
model
.
OrderStaus
,
model
.
OrderStaus
,
OrderStatusName
=
model
.
OrderStaus
.
GetEnumName
(),
OrderStatusName
=
model
.
OrderStaus
.
GetEnumName
(),
model
.
IsSendRoom
,
model
.
IsSendRoom
,
...
@@ -273,6 +273,35 @@ namespace Mall.WebApi.Controllers.Education
...
@@ -273,6 +273,35 @@ namespace Mall.WebApi.Controllers.Education
Id
=
Convert
.
ToInt32
(
x
.
Value
)
Id
=
Convert
.
ToInt32
(
x
.
Value
)
}));
}));
}
}
/// <summary>
/// 获取订单详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetDeletePointOrderInfo
()
{
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
(
"不是你的订单,无法操作"
);
}
model
.
UpdateDate
=
System
.
DateTime
.
Now
;
bool
retult
=
pointModule
.
DeleteCourseOrder
(
model
);
if
(
retult
)
{
return
ApiResult
.
Success
(
"订单删除成功"
);
}
else
{
return
ApiResult
.
Success
(
"订单删除失败"
);
}
}
#
endregion
#
endregion
#
region
课程订单下单
#
region
课程订单下单
...
@@ -801,6 +830,7 @@ namespace Mall.WebApi.Controllers.Education
...
@@ -801,6 +830,7 @@ namespace Mall.WebApi.Controllers.Education
model
.
TeacherName
,
model
.
TeacherName
,
model
.
CourseName
,
model
.
CourseName
,
model
.
RoomId
,
model
.
RoomId
,
model
.
DurationUnit
,
StudyDateStr
=
model
.
StudyDate
.
ToString
(
"yyyy-MM-dd"
),
StudyDateStr
=
model
.
StudyDate
.
ToString
(
"yyyy-MM-dd"
),
orderList
,
orderList
,
StudentNumTypeName
=
EnumHelper
.
GetEnumName
(
model
.
StudentNumType
)
StudentNumTypeName
=
EnumHelper
.
GetEnumName
(
model
.
StudentNumType
)
...
...
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