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
16effd7d
Commit
16effd7d
authored
Nov 02, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下单管理
parent
4698553a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
33 deletions
+49
-33
RB_Goods_OrderDetail.cs
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
+10
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+31
-29
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+2
-1
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+6
-3
No files found.
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
View file @
16effd7d
...
...
@@ -354,5 +354,15 @@ namespace Mall.Model.Entity.Product
/// 服务人员的id
/// </summary>
public
int
?
ServicepersonalId
{
get
;
set
;
}
/// <summary>
/// 服务日期
/// </summary>
public
string
ServiceDate
{
get
;
set
;
}
/// <summary>
/// 服务时间
/// </summary>
public
string
ServiceTime
{
get
;
set
;
}
}
}
Mall.Module.Product/OrderModule.cs
View file @
16effd7d
...
...
@@ -4684,7 +4684,13 @@ namespace Mall.Module.Product
}
int
DefFreightId
=
0
;
//默认运费id
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
gList
=
goodsRepository
.
GetList
(
new
RB_Goods_Extend
()
{
GoodsIds
=
GoodsIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
GoodsClassify
=
3
});
var
clist
=
goods_CategoryRepository
.
GetList
(
new
RB_Goods_Category_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
});
...
...
@@ -4937,11 +4943,6 @@ namespace Mall.Module.Product
}
else
{
if
(
item
.
Number
>
gmodel
.
InventoryNum
)
{
message
=
"商品库存不足:"
+
gmodel
.
Name
;
return
false
;
}
item
.
SmallShopsCostPrice
=
gmodel
.
SellingPrice
??
0
;
if
(
demodel
.
SmallShopsId
>
0
)
{
...
...
@@ -5153,7 +5154,6 @@ namespace Mall.Module.Product
#
endregion
#
region
优惠券
//decimal CouponsMoney = 0;
if
(
demodel
.
User_Coupon_Id
>
0
)
{
var
ccmodel
=
cList
.
Where
(
x
=>
x
.
Id
==
demodel
.
User_Coupon_Id
).
FirstOrDefault
();
...
...
@@ -5530,7 +5530,6 @@ namespace Mall.Module.Product
}
#
endregion
item
.
FreightMoney
=
Express
;
item
.
CommentGiveIntegral
=
0
;
if
(
gmodel
.
IntegralComment
>
0
)
{
...
...
@@ -5564,26 +5563,26 @@ namespace Mall.Module.Product
demodel
.
PreferPrice
=
TotalMoney
+
CouponsMoney
;
#
region
手续费计算
decimal
ServiceCharge
=
Convert
.
ToDecimal
(
Config
.
SettlementRate
)
/
100
;
if
(
ServiceCharge
>
0
)
{
decimal
TotalFee
=
Math
.
Round
((
demodel
.
Income
??
0
)
*
ServiceCharge
,
2
,
MidpointRounding
.
AwayFromZero
);
if
(
demodel
.
DetailList
.
Any
())
{
int
dcount
=
demodel
.
DetailList
.
Count
();
decimal
avgFee
=
Math
.
Round
(
TotalFee
/
dcount
,
2
,
MidpointRounding
.
AwayFromZero
);
foreach
(
var
item
in
demodel
.
DetailList
)
{
item
.
ServiceCharge
=
avgFee
;
}
if
(
avgFee
*
dcount
!=
TotalFee
)
{
//多余的 直接算在第一个商品里
var
detailmodel
=
demodel
.
DetailList
.
FirstOrDefault
();
detailmodel
.
ServiceCharge
+=
(
TotalFee
-
avgFee
*
dcount
);
}
}
}
//
decimal ServiceCharge = Convert.ToDecimal(Config.SettlementRate) / 100;
//
if (ServiceCharge > 0)
//
{
//
decimal TotalFee = Math.Round((demodel.Income ?? 0) * ServiceCharge, 2, MidpointRounding.AwayFromZero);
//
if (demodel.DetailList.Any())
//
{
//
int dcount = demodel.DetailList.Count();
//
decimal avgFee = Math.Round(TotalFee / dcount, 2, MidpointRounding.AwayFromZero);
//
foreach (var item in demodel.DetailList)
//
{
//
item.ServiceCharge = avgFee;
//
}
//
if (avgFee * dcount != TotalFee)
//
{
//
//多余的 直接算在第一个商品里
//
var detailmodel = demodel.DetailList.FirstOrDefault();
//
detailmodel.ServiceCharge += (TotalFee - avgFee * dcount);
//
}
//
}
//
}
#
endregion
try
...
...
@@ -7176,7 +7175,10 @@ namespace Mall.Module.Product
InsuranceCostMoney
=
item
.
InsuranceCostMoney
??
0
,
InsuranceFinanceId
=
0
,
CommentGiveIntegral
=
item
.
CommentGiveIntegral
,
EducationCouponId
=
item
.
EducationCouponId
EducationCouponId
=
item
.
EducationCouponId
,
ServiceDate
=
item
.
ServiceDate
,
ServicepersonalId
=
item
.
ServicepersonalId
,
ServiceTime
=
item
.
ServiceTime
,
},
trans
);
item
.
Id
=
detailId
;
if
(
detailId
>
0
&&
SatisfiedGoodsList
.
Any
())
...
...
Mall.Module.Product/ProductModule.cs
View file @
16effd7d
...
...
@@ -3754,7 +3754,8 @@ namespace Mall.Module.Product
qitem
.
Name
,
qitem
.
Major
,
Gender
=
qitem
.
Gender
.
ToInt
(),
ReserveCount
=
qitem
.
OrderNum
ReserveCount
=
qitem
.
OrderNum
,
ServiceId
=
qitem
.
ID
}),
storeDateList
=
storeDateList
.
Select
(
qitem
=>
new
{
qitem
.
DayDateStr
,
qitem
.
WeekDayStr
,
qitem
.
TimeList
})
},
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
16effd7d
...
...
@@ -722,8 +722,11 @@ namespace Mall.WebApi.Controllers.MallBase
demodel
.
BuyerMessage
??=
""
;
//买家留言
demodel
.
OrderSource
??=
Common
.
Enum
.
User
.
UserSourceEnum
.
WeiXin
;
#
region
赋默认值
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
//demodel.TenantId = userInfo.TenantId;
//demodel.MallBaseId = userInfo.MallBaseId;
demodel
.
TenantId
=
12
;
demodel
.
MallBaseId
=
2
;
demodel
.
Country
??=
2
;
demodel
.
OrderStatus
=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
NonPayment
;
demodel
.
CreateDate
=
DateTime
.
Now
;
...
...
@@ -744,7 +747,7 @@ namespace Mall.WebApi.Controllers.MallBase
demodel
.
DestinationAddress
??=
""
;
#
endregion
bool
flag
=
orderModule
.
SetAppletOfflineGoodsOrderModule
(
demodel
,
out
string
message
);
return
flag
?
ApiResult
.
Success
(
message
:
message
)
:
ApiResult
.
Failed
(
message
:
message
);
return
flag
?
ApiResult
.
Success
(
message
:
message
,
data
:
new
{
demodel
.
OrderId
}
)
:
ApiResult
.
Failed
(
message
:
message
);
}
/// <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