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
cec841bf
Commit
cec841bf
authored
Aug 05, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
90e7ff83
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+32
-0
No files found.
Mall.Module.Product/OrderModule.cs
View file @
cec841bf
...
...
@@ -1269,6 +1269,7 @@ namespace Mall.Module.Product
}
#
endregion
List
<
RB_Goods_CouponModel
>
GoodsCouponList
=
new
List
<
RB_Goods_CouponModel
>();
//商品优惠卷 价格(每个商品优惠的价格)
List
<
int
>
YFCategoryList
=
new
List
<
int
>();
//全局适配 分类
//初始化值
foreach
(
var
item
in
demodel
.
DetailList
)
{
...
...
@@ -1279,6 +1280,9 @@ namespace Mall.Module.Product
}
int
GoodsWeight
=
gmodel
.
GoodsWeight
??
0
;
//商品重量
var
categoryList
=
clist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
).
ToList
();
if
((
mallbaseModel
?.
IsFreeShipping
??
0
)
==
1
&&
(
gmodel
.
FullMoneyPinkage
??
0
)
==
0
&&
(
gmodel
.
FullNumPinkage
??
0
)
==
0
)
{
YFCategoryList
.
AddRange
(
categoryList
.
Select
(
x
=>
x
.
CategoryId
??
0
).
ToList
());
}
#
region
图片
gmodel
.
CoverImage
=
""
;
...
...
@@ -1622,6 +1626,13 @@ namespace Mall.Module.Product
}
}
}
#
region
处理全局包邮
List
<
RB_FreeShipping_Extend
>
freeShippingList
=
new
List
<
RB_FreeShipping_Extend
>();
if
(
YFCategoryList
.
Any
())
{
string
categoryIds
=
string
.
Join
(
","
,
YFCategoryList
.
Distinct
());
freeShippingList
=
freeShippingRepository
.
GetFreeShippingListByCategoryIds
(
new
RB_FreeShipping_Extend
{
MallBaseId
=
demodel
.
MallBaseId
,
TenantId
=
demodel
.
TenantId
,
CategoryIds
=
categoryIds
});
}
#
endregion
//赋值
foreach
(
var
item
in
demodel
.
DetailList
)
{
...
...
@@ -1746,10 +1757,31 @@ namespace Mall.Module.Product
}
}
}
else
{
if
((
gmodel
.
FullMoneyPinkage
??
0
)
==
0
&&
(
gmodel
.
FullNumPinkage
??
0
)
==
0
&&
YFCategoryList
.
Any
())
{
//查找全局包邮规则
//if (freeShippingList != null && freeShippingList.Any())
//{
// var nowcategory = categoryList.Where(x => x.GoodsId == item.GoodsId).Select(x => x.CategoryId);
// var fullNumPinkageModel = freeShippingList.Where(x => nowcategory.Contains(x.CategoryId) && x.IsFreeShipping == 1 && x.IsEnable == 1 && x.FullNumPinkage > 0).OrderBy(x => x.FullNumPinkage).FirstOrDefault();
// if (fullNumPinkageModel == null || fullNumPinkageModel.ID <= 0)
// {
// fullNumPinkageModel = freeShippingList.Where(x => x.IsFreeShipping == 1 && x.IsEnable == 1 && x.FullMoneyPinkage > 0).OrderBy(x => x.FullMoneyPinkage).FirstOrDefault();
// }
// item.FreeShippingModel = (fullNumPinkageModel == null || fullNumPinkageModel.ID <= 0) ? new RB_FreeShipping_Extend() : fullNumPinkageModel;
//}
//else
//{
// item.FreeShippingModel = new RB_FreeShipping_Extend();
//}
}
}
}
TotalExpress
+=
Express
;
item
.
Final_Price
+=
Express
;
item
.
Express
=
Express
;
TotalGoodsMoney
+=
Express
;
#
endregion
var
areaGoods
=
AreaList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
).
ToList
();
...
...
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