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
fedbd32b
Commit
fedbd32b
authored
Sep 29, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程下单
parent
0dfbe62a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1061 additions
and
9 deletions
+1061
-9
RB_Goods_Order.cs
Mall.Model/Entity/Product/RB_Goods_Order.cs
+5
-1
RB_Goods_OrderDetail.cs
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
+4
-0
OrderModule_Part.cs
Mall.Module.Product/OrderModule_Part.cs
+985
-7
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+67
-1
No files found.
Mall.Model/Entity/Product/RB_Goods_Order.cs
View file @
fedbd32b
...
@@ -309,12 +309,16 @@ namespace Mall.Model.Entity.Product
...
@@ -309,12 +309,16 @@ namespace Mall.Model.Entity.Product
/// </summary>
/// </summary>
public
int
?
SmallShopsId
{
get
;
set
;
}
public
int
?
SmallShopsId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 订单分类 0正常订单 1司导订单
/// 订单分类 0正常订单 1司导订单
2教育订单
/// </summary>
/// </summary>
public
int
OrderClassify
{
get
;
set
;
}
public
int
OrderClassify
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 目的地(司导订单)
/// 目的地(司导订单)
/// </summary>
/// </summary>
public
string
DestinationAddress
{
get
;
set
;
}
public
string
DestinationAddress
{
get
;
set
;
}
/// <summary>
/// 课程卡抵扣金额
/// </summary>
public
decimal
?
EducationMoney
{
get
;
set
;
}
}
}
}
}
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
View file @
fedbd32b
...
@@ -345,5 +345,9 @@ namespace Mall.Model.Entity.Product
...
@@ -345,5 +345,9 @@ namespace Mall.Model.Entity.Product
/// 评论返积分
/// 评论返积分
/// </summary>
/// </summary>
public
int
CommentGiveIntegral
{
get
;
set
;
}
public
int
CommentGiveIntegral
{
get
;
set
;
}
/// <summary>
/// 使用课程卡id
/// </summary>
public
int
?
EducationCouponId
{
get
;
set
;
}
}
}
}
}
Mall.Module.Product/OrderModule_Part.cs
View file @
fedbd32b
This diff is collapsed.
Click to expand it.
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
fedbd32b
...
@@ -456,7 +456,7 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -456,7 +456,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
/// <summary>
/// <summary>
/// 下单
///
商城
下单
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
...
@@ -545,6 +545,72 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -545,6 +545,72 @@ namespace Mall.WebApi.Controllers.MallBase
return
orderModule
.
SetAppletGoodsOrderInfo
(
demodel
);
return
orderModule
.
SetAppletGoodsOrderInfo
(
demodel
);
}
}
/// <summary>
/// 教育下单
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetAppletCourseOrderInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Goods_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Order_Extend
>(
req
.
msg
.
ToString
());
if
(
demodel
.
IsFormShoppingCart
==
1
)
{
if
(
demodel
.
ShoppingCartIdList
==
null
||
!
demodel
.
ShoppingCartIdList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递购物车id"
);
}
}
if
(
demodel
.
DetailList
==
null
||
!
demodel
.
DetailList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递商品信息"
);
}
foreach
(
var
item
in
demodel
.
DetailList
)
{
if
((
item
.
GoodsId
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品id"
);
}
if
((
item
.
Number
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品数量"
);
}
}
if
((
demodel
.
Income
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"订单金额不正确"
);
}
demodel
.
BuyerMessage
??=
""
;
//买家留言
demodel
.
OrderSource
??=
UserSourceEnum
.
WeiXin
;
#
region
赋默认值
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
Country
??=
2
;
demodel
.
OrderStatus
=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
NonPayment
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
Fee
??=
0
;
demodel
.
FreightMoney
??=
0
;
demodel
.
HistoryOrderStatus
??=
0
;
demodel
.
IsApplyForCancel
??=
2
;
demodel
.
IsOrderCommission
??=
2
;
demodel
.
MerchantsNo
??=
""
;
demodel
.
Recycled
??=
2
;
demodel
.
Refund
??=
0
;
demodel
.
Status
=
0
;
demodel
.
AnchorName
??=
""
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
demodel
.
UserId
=
userInfo
.
UserId
;
demodel
.
SmallShopsId
=
req
.
SmallShopsId
;
demodel
.
OrderClassify
=
2
;
#
endregion
return
orderModule
.
SetAppletCourseOrderInfo
(
demodel
);
}
/// <summary>
/// <summary>
/// 司导下单
/// 司导下单
/// </summary>
/// </summary>
...
...
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