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
Show 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
...
@@ -13,6 +13,9 @@ namespace Mall.Model.Extend.Product
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_ExpressRelevance_Extend
:
RB_Goods_ExpressRelevance
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
...
@@ -25,5 +25,9 @@ namespace Mall.Model.Extend.Product
/// 明细ids
/// 明细ids
/// </summary>
/// </summary>
public
string
OrderDetailIds
{
get
;
set
;
}
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
...
@@ -13,6 +13,10 @@ namespace Mall.Model.Extend.Product
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Order_Extend
:
RB_Goods_Order
public
class
RB_Goods_Order_Extend
:
RB_Goods_Order
{
{
/// <summary>
/// 收货地址id
/// </summary>
public
int
?
ShippingAddressId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 商品id
/// 商品id
/// </summary>
/// </summary>
...
...
Mall.Module.Product/OrderModule.cs
View file @
ce606472
...
@@ -594,10 +594,225 @@ namespace Mall.Module.Product
...
@@ -594,10 +594,225 @@ namespace Mall.Module.Product
DetailList
=
DList
,
DetailList
=
DList
,
TotalExpress
,
TotalExpress
,
umodel
.
MemberGrade
,
umodel
.
MemberGrade
,
DeliveryMethod
=
(
int
)
OrderDeliveryMethodEnum
.
ExpressDistribution
,
Level_Show
=
umodel
.
MemberGrade
>
0
?
1
:
2
Level_Show
=
umodel
.
MemberGrade
>
0
?
1
:
2
});
});
}
}
/// <summary>
/// 获取结算页面 快递修改后 快递费用
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
ApiResult
GetAppletGoodsSettlementExpress
(
RB_Goods_Order_Extend
demodel
)
{
var
umodel
=
member_UserRepository
.
GetEntity
(
demodel
.
UserId
);
if
(
umodel
==
null
)
{
return
ApiResult
.
Failed
(
"用户不存在"
);
}
//获取用户的默认收货地址
var
defModel
=
member_ShippingAddressRepository
.
GetEntity
(
demodel
.
ShippingAddressId
);
List
<
int
>
disList
=
new
List
<
int
>();
if
(
defModel
==
null
)
{
return
ApiResult
.
Failed
(
"收货地址不存在"
);
}
else
{
disList
.
Add
(
defModel
.
Province
??
0
);
disList
.
Add
(
defModel
.
City
??
0
);
disList
.
Add
(
defModel
.
District
??
0
);
}
List
<
object
>
DList
=
new
List
<
object
>();
decimal
TotalExpress
=
0
;
int
DefFreightId
=
0
;
if
(
demodel
.
DetailList
.
Any
())
{
string
GoodsIds
=
string
.
Join
(
","
,
demodel
.
DetailList
.
Select
(
x
=>
x
.
GoodsId
));
var
gList
=
goodsRepository
.
GetList
(
new
RB_Goods_Extend
()
{
GoodsIds
=
GoodsIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
var
speciPList
=
goods_SpecificationPriceRepository
.
GetList
(
new
RB_Goods_SpecificationPrice_Extend
()
{
GoodsIds
=
GoodsIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
List
<
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_Rules_Extend
>
rulesList
=
new
List
<
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_Rules_Extend
>();
List
<
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_RulesPrice_Extend
>
priceList
=
new
List
<
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_RulesPrice_Extend
>();
List
<
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_RulesRegion_Extend
>
regionList
=
new
List
<
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_RulesRegion_Extend
>();
if
(
gList
.
Any
()
&&
defModel
.
Id
>
0
)
{
List
<
int
>
FreightIdList
=
new
List
<
int
>();
if
(
gList
.
Where
(
x
=>
x
.
FreightId
>
0
).
Any
())
{
FreightIdList
.
AddRange
(
gList
.
Where
(
x
=>
x
.
FreightId
>
0
).
Select
(
x
=>
x
.
FreightId
??
0
).
ToList
());
}
if
(
gList
.
Where
(
x
=>
x
.
FreightId
==
0
).
Any
())
{
//查询默认
DefFreightId
=
logistics_RulesRepository
.
GetLogisticsRulesList
(
new
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_Rules_Extend
()
{
IsDefault
=
1
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
}).
FirstOrDefault
()?.
ID
??
0
;
FreightIdList
.
Add
(
DefFreightId
);
}
if
(
FreightIdList
.
Any
())
{
rulesList
=
logistics_RulesRepository
.
GetLogisticsRulesList
(
new
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_Rules_Extend
()
{
RulesIds
=
string
.
Join
(
","
,
FreightIdList
),
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
priceList
=
logistics_RulesPriceRepository
.
GetListRepository
(
new
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_RulesPrice_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
RulesIds
=
string
.
Join
(
","
,
FreightIdList
)
});
if
(
priceList
.
Any
())
{
string
priceIds
=
string
.
Join
(
","
,
priceList
.
Select
(
x
=>
x
.
ID
));
regionList
=
logistics_RulesRegionRepository
.
GetListRepository
(
new
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_RulesRegion_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
PriceIds
=
priceIds
});
}
}
}
foreach
(
var
item
in
demodel
.
DetailList
)
{
var
gmodel
=
gList
.
Where
(
x
=>
x
.
Id
==
item
.
GoodsId
).
FirstOrDefault
();
if
(
gmodel
==
null
||
gmodel
.
GoodsStatus
!=
1
)
{
continue
;
}
int
GoodsWeight
=
gmodel
.
GoodsWeight
??
0
;
//商品重量
#
region
规格
//验证规格是否已失效
if
(
gmodel
.
IsCustomSpecification
==
1
)
{
if
(
string
.
IsNullOrEmpty
(
item
.
SpecificationSort
))
{
continue
;
}
if
(!
speciPList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
&&
x
.
SpecificationSort
==
item
.
SpecificationSort
).
Any
())
{
continue
;
}
}
else
{
if
(!
string
.
IsNullOrEmpty
(
item
.
SpecificationSort
))
{
continue
;
}
}
if
(!
string
.
IsNullOrEmpty
(
item
.
SpecificationSort
))
{
var
speciPModel
=
speciPList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
&&
x
.
SpecificationSort
==
item
.
SpecificationSort
).
FirstOrDefault
();
GoodsWeight
=
speciPModel
?.
GoodsWeight
??
0
;
}
#
endregion
//运费
decimal
Express
=
0
;
if
(
defModel
.
Id
>
0
)
{
int
FreightId2
=
gmodel
.
FreightId
??
0
;
if
(
gmodel
.
FreightId
==
0
)
{
FreightId2
=
DefFreightId
;
}
if
(
FreightId2
>
0
)
{
var
rulesModel
=
rulesList
.
Where
(
x
=>
x
.
ID
==
FreightId2
).
FirstOrDefault
();
List
<
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_RulesPrice_Extend
>
priceList2
=
priceList
.
Where
(
x
=>
x
.
RulesId
==
FreightId2
).
ToList
();
if
(
priceList2
.
Any
())
{
var
priceIds
=
priceList2
.
Select
(
x
=>
x
.
ID
).
ToList
();
var
regionList2
=
regionList
.
Where
(
x
=>
priceIds
.
Contains
(
x
.
RulesPriceId
)).
ToList
();
var
regionModel
=
regionList2
.
Where
(
x
=>
disList
.
Contains
(
x
.
RegionId
)).
FirstOrDefault
();
if
(
regionModel
!=
null
)
{
var
pmodel
=
priceList2
.
Where
(
x
=>
x
.
ID
==
regionModel
.
RulesPriceId
).
FirstOrDefault
();
if
(
pmodel
!=
null
&&
rulesModel
!=
null
)
{
if
(
rulesModel
.
ChargeMode
==
Common
.
Enum
.
MallBase
.
ChargeModeEnum
.
Num
)
{
//按件计费
if
(
item
.
Number
<=
pmodel
.
First
)
{
Express
=
pmodel
.
FirstPrice
;
}
else
{
if
(
pmodel
.
Second
>
0
)
{
if
(((
item
.
Number
??
0
)
-
pmodel
.
First
)
%
pmodel
.
Second
==
0
)
{
Express
=
pmodel
.
FirstPrice
+
(((
item
.
Number
??
0
)
-
pmodel
.
First
)
/
pmodel
.
Second
)
*
pmodel
.
SecondPrice
;
}
else
{
Express
=
pmodel
.
FirstPrice
+
(((
item
.
Number
??
0
)
-
pmodel
.
First
)
/
pmodel
.
Second
+
1
)
*
pmodel
.
SecondPrice
;
}
}
else
{
Express
=
pmodel
.
FirstPrice
;
}
}
}
else
{
//重量计费
int
TotalW
=
(
item
.
Number
??
0
)
*
GoodsWeight
;
if
(
TotalW
<=
pmodel
.
First
)
{
Express
=
pmodel
.
FirstPrice
;
}
else
{
if
(
pmodel
.
Second
>
0
)
{
if
((
TotalW
-
pmodel
.
First
)
%
pmodel
.
Second
==
0
)
{
Express
=
pmodel
.
FirstPrice
+
((
TotalW
-
pmodel
.
First
)
/
pmodel
.
Second
)
*
pmodel
.
SecondPrice
;
}
else
{
Express
=
pmodel
.
FirstPrice
+
((
TotalW
-
pmodel
.
First
)
/
pmodel
.
Second
+
1
)
*
pmodel
.
SecondPrice
;
}
}
else
{
Express
=
pmodel
.
FirstPrice
;
}
}
}
}
}
}
}
}
DList
.
Add
(
new
{
item
.
GoodsId
,
item
.
SpecificationSort
,
Express
});
TotalExpress
+=
Express
;
}
}
return
ApiResult
.
Success
(
""
,
new
{
DetailList
=
DList
,
TotalExpress
});
}
/// <summary>
/// 下单
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
ApiResult
SetAppletGoodsOrderInfo
(
RB_Goods_Order_Extend
demodel
)
{
if
(
string
.
IsNullOrEmpty
(
demodel
.
CouponsIds
))
{
//验证优惠价金额
//demodel.CouponMoney;
}
//验证运费
//验证总额
return
ApiResult
.
Success
();
}
#
endregion
#
endregion
#
region
订单管理
#
region
订单管理
...
@@ -617,6 +832,7 @@ namespace Mall.Module.Product
...
@@ -617,6 +832,7 @@ namespace Mall.Module.Product
{
{
//查询订单明细
//查询订单明细
var
dlist
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
OrderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
))
});
var
dlist
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
OrderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
))
});
var
erList
=
goods_ExpressRelevanceRepository
.
GetList
(
new
RB_Goods_ExpressRelevance_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
OrderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
))
});
//查询图片
//查询图片
List
<
RB_Material_Info_Extend
>
Mlist
=
new
List
<
RB_Material_Info_Extend
>();
List
<
RB_Material_Info_Extend
>
Mlist
=
new
List
<
RB_Material_Info_Extend
>();
if
(
dlist
.
Any
())
if
(
dlist
.
Any
())
...
@@ -625,6 +841,7 @@ namespace Mall.Module.Product
...
@@ -625,6 +841,7 @@ namespace Mall.Module.Product
foreach
(
var
item
in
dlist
)
foreach
(
var
item
in
dlist
)
{
{
item
.
CoverImagePath
=
Mlist
.
Where
(
x
=>
x
.
Id
==
item
.
CoverImage
).
FirstOrDefault
()?.
Path
??
""
;
item
.
CoverImagePath
=
Mlist
.
Where
(
x
=>
x
.
Id
==
item
.
CoverImage
).
FirstOrDefault
()?.
Path
??
""
;
item
.
IsBindExpress
=
erList
.
Where
(
x
=>
x
.
OrderDetailId
==
item
.
Id
).
Any
()
?
1
:
2
;
}
}
}
}
string
areaIds1
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Province
??
0
).
Distinct
());
string
areaIds1
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Province
??
0
).
Distinct
());
...
...
Mall.Repository/Product/RB_Goods_ExpressRelevanceRepository.cs
View file @
ce606472
...
@@ -34,6 +34,10 @@ namespace Mall.Repository.Product
...
@@ -34,6 +34,10 @@ namespace Mall.Repository.Product
{
{
where
+=
$@" and
{
nameof
(
RB_Goods_ExpressRelevance
.
OrderId
)}
=
{
dmodel
.
OrderId
}
"
;
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
)
if
(
dmodel
.
OrderDetailId
>
0
)
{
{
where
+=
$@" and
{
nameof
(
RB_Goods_ExpressRelevance
.
OrderDetailId
)}
=
{
dmodel
.
OrderDetailId
}
"
;
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
...
@@ -181,6 +181,40 @@ namespace Mall.WebApi.Controllers.MallBase
return
orderModule
.
GetAppletGoodsSettlementInfo
(
demodel
);
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>
/// 下单
/// 下单
/// </summary>
/// </summary>
...
@@ -196,10 +230,23 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -196,10 +230,23 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
string
.
IsNullOrEmpty
(
demodel
.
Mobile
))
{
if
(
string
.
IsNullOrEmpty
(
demodel
.
Mobile
))
{
return
ApiResult
.
ParamIsNull
(
"请传递收件人手机号码"
);
return
ApiResult
.
ParamIsNull
(
"请传递收件人手机号码"
);
}
}
if
(
demodel
.
DeliveryMethod
!=
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
VerificationShop
)
{
if
(
demodel
.
DeliveryMethod
!=
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
VerificationShop
)
if
((
demodel
.
District
??
0
)
<=
0
)
{
{
if
((
demodel
.
District
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"收货地址有误"
);
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
())
{
if
(
demodel
.
DetailList
==
null
||
!
demodel
.
DetailList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递商品信息"
);
return
ApiResult
.
ParamIsNull
(
"请传递商品信息"
);
...
@@ -211,10 +258,29 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -211,10 +258,29 @@ namespace Mall.WebApi.Controllers.MallBase
if
((
item
.
Number
??
0
)
<=
0
)
{
if
((
item
.
Number
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品数量"
);
return
ApiResult
.
ParamIsNull
(
"请传递商品数量"
);
}
}
}
}
return
ApiResult
.
Success
();
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
orderModule
.
SetAppletGoodsOrderInfo
(
demodel
);
}
}
#
endregion
#
endregion
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
ce606472
...
@@ -70,7 +70,8 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -70,7 +70,8 @@ namespace Mall.WebApi.Controllers.MallBase
y
.
Specification
,
y
.
Specification
,
y
.
ProductCode
,
y
.
ProductCode
,
y
.
Final_Price
,
y
.
Final_Price
,
y
.
Number
y
.
Number
,
y
.
IsBindExpress
}),
}),
x
.
Consignee
,
x
.
Consignee
,
x
.
Mobile
,
x
.
Mobile
,
...
@@ -234,6 +235,51 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -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>
/// 下单
/// 下单
/// </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