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
daece110
Commit
daece110
authored
Sep 09, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增erp下单方法
parent
e41509dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
0 deletions
+89
-0
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+89
-0
No files found.
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
daece110
...
...
@@ -507,6 +507,95 @@ namespace Mall.WebApi.Controllers.MallBase
return
orderModule
.
SetAppletGoodsOrderInfo
(
demodel
);
}
/// <summary>
/// ERP下单
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetERPGoodsOrderInfo
()
{
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
(
string
.
IsNullOrEmpty
(
demodel
.
Consignee
))
{
return
ApiResult
.
ParamIsNull
(
"请传递收件人"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Mobile
))
{
return
ApiResult
.
ParamIsNull
(
"请传递收件人手机号码"
);
}
if
(
demodel
.
DeliveryMethod
!=
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
VerificationShop
)
{
if
((
demodel
.
District
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"收货地址有误"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
ShoppingAddress
))
{
return
ApiResult
.
ParamIsNull
(
"收货详细地址不能为空"
);
}
}
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
(
item
.
SpecificationList
==
null
||
!
item
.
SpecificationList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递规格名SpecificationList"
);
}
item
.
Specification
=
JsonConvert
.
SerializeObject
(
item
.
SpecificationList
);
}
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
;
#
endregion
return
orderModule
.
SetAppletGoodsOrderInfo
(
demodel
);
}
/// <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