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
ce606472
Commit
ce606472
authored
May 14, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单
parent
85b7290a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
351 additions
and
7 deletions
+351
-7
RB_Goods_ExpressRelevance_Extend.cs
....Model/Extend/Product/RB_Goods_ExpressRelevance_Extend.cs
+4
-1
RB_Goods_OrderDetail_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
+4
-0
RB_Goods_Order_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
+4
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+218
-1
RB_Goods_ExpressRelevanceRepository.cs
...Repository/Product/RB_Goods_ExpressRelevanceRepository.cs
+4
-0
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+70
-4
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+47
-1
No files found.
Mall.Model/Extend/Product/RB_Goods_ExpressRelevance_Extend.cs
View file @
ce606472
...
...
@@ -13,6 +13,9 @@ namespace Mall.Model.Extend.Product
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_ExpressRelevance_Extend
:
RB_Goods_ExpressRelevance
{
/// <summary>
/// 订单ids
/// </summary>
public
string
OrderIds
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
View file @
ce606472
...
...
@@ -25,5 +25,9 @@ namespace Mall.Model.Extend.Product
/// 明细ids
/// </summary>
public
string
OrderDetailIds
{
get
;
set
;
}
/// <summary>
/// 是否已发货
/// </summary>
public
int
?
IsBindExpress
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
View file @
ce606472
...
...
@@ -13,6 +13,10 @@ namespace Mall.Model.Extend.Product
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Order_Extend
:
RB_Goods_Order
{
/// <summary>
/// 收货地址id
/// </summary>
public
int
?
ShippingAddressId
{
get
;
set
;
}
/// <summary>
/// 商品id
/// </summary>
...
...
Mall.Module.Product/OrderModule.cs
View file @
ce606472
This diff is collapsed.
Click to expand it.
Mall.Repository/Product/RB_Goods_ExpressRelevanceRepository.cs
View file @
ce606472
...
...
@@ -34,6 +34,10 @@ namespace Mall.Repository.Product
{
where
+=
$@" and
{
nameof
(
RB_Goods_ExpressRelevance
.
OrderId
)}
=
{
dmodel
.
OrderId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_ExpressRelevance
.
OrderId
)}
in(
{
dmodel
.
OrderIds
}
)"
;
}
if
(
dmodel
.
OrderDetailId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_ExpressRelevance
.
OrderDetailId
)}
=
{
dmodel
.
OrderDetailId
}
"
;
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
ce606472
...
...
@@ -181,6 +181,40 @@ namespace Mall.WebApi.Controllers.MallBase
return
orderModule
.
GetAppletGoodsSettlementInfo
(
demodel
);
}
/// <summary>
/// 结算页面修改快递,获取快递费用
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppletGoodsSettlementExpress
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Goods_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Order_Extend
>(
req
.
msg
.
ToString
());
if
((
demodel
.
ShippingAddressId
??
0
)
<=
0
)
{
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
(
"请传递商品数量"
);
}
}
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
UserId
=
userInfo
.
UserId
;
return
orderModule
.
GetAppletGoodsSettlementExpress
(
demodel
);
}
/// <summary>
/// 下单
/// </summary>
...
...
@@ -196,10 +230,23 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
string
.
IsNullOrEmpty
(
demodel
.
Mobile
))
{
return
ApiResult
.
ParamIsNull
(
"请传递收件人手机号码"
);
}
if
(
demodel
.
DeliveryMethod
!=
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
VerificationShop
)
{
if
((
demodel
.
District
??
0
)
<=
0
)
{
if
(
demodel
.
DeliveryMethod
!=
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
VerificationShop
)
{
if
((
demodel
.
District
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"收货地址有误"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
ShippingAddress
))
{
return
ApiResult
.
ParamIsNull
(
"收货详细地址不能为空"
);
}
}
else
{
if
(
string
.
IsNullOrEmpty
(
demodel
.
Consignee
))
{
return
ApiResult
.
ParamIsNull
(
"收件人不能为空"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Mobile
))
{
return
ApiResult
.
ParamIsNull
(
"收件人手机不能为空"
);
}
}
if
(
demodel
.
DetailList
==
null
||
!
demodel
.
DetailList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递商品信息"
);
...
...
@@ -211,10 +258,29 @@ namespace Mall.WebApi.Controllers.MallBase
if
((
item
.
Number
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品数量"
);
}
}
demodel
.
BuyerMessage
??=
""
;
//买家留言
demodel
.
OrderSource
??=
UserSourceEnum
.
WeiXin
;
#
region
赋默认值
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
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
.
UpdateDate
=
DateTime
.
Now
;
demodel
.
UserId
=
userInfo
.
UserId
;
#
endregion
return
ApiResult
.
Success
();
return
orderModule
.
SetAppletGoodsOrderInfo
(
demodel
);
}
#
endregion
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
ce606472
...
...
@@ -70,7 +70,8 @@ namespace Mall.WebApi.Controllers.MallBase
y
.
Specification
,
y
.
ProductCode
,
y
.
Final_Price
,
y
.
Number
y
.
Number
,
y
.
IsBindExpress
}),
x
.
Consignee
,
x
.
Mobile
,
...
...
@@ -234,6 +235,51 @@ namespace Mall.WebApi.Controllers.MallBase
}
/// <summary>
/// 获取商品订单类型枚举
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOrderTypeEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
OrderTypeEnum
));
return
ApiResult
.
Success
(
""
,
list
.
Select
(
x
=>
new
{
Name
=
x
.
Key
,
Id
=
Convert
.
ToInt32
(
x
.
Value
)
}));
}
/// <summary>
/// 获取商品订单配送类型
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOrderDeliveryMethodEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
OrderDeliveryMethodEnum
));
return
ApiResult
.
Success
(
""
,
list
.
Select
(
x
=>
new
{
Name
=
x
.
Key
,
Id
=
Convert
.
ToInt32
(
x
.
Value
)
}));
}
/// <summary>
/// 获取商品订单状态枚举
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOrderStatusEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
OrderStatusEnum
));
return
ApiResult
.
Success
(
""
,
list
.
Select
(
x
=>
new
{
Name
=
x
.
Key
,
Id
=
Convert
.
ToInt32
(
x
.
Value
)
}));
}
/// <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