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
dd751dcf
Commit
dd751dcf
authored
Aug 17, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
321b7962
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
9 deletions
+63
-9
RB_Groupbuy_Memberprice_Extend.cs
Mall.Model/Extend/Product/RB_Groupbuy_Memberprice_Extend.cs
+10
-0
GroupBuyActivityModule.cs
Mall.Module.Product/GroupBuyActivityModule.cs
+53
-9
No files found.
Mall.Model/Extend/Product/RB_Groupbuy_Memberprice_Extend.cs
View file @
dd751dcf
...
...
@@ -17,5 +17,15 @@ namespace Mall.Model.Extend.Product
/// 商品编号
/// </summary>
public
string
GoodIds
{
get
;
set
;
}
/// <summary>
/// 等级价格列表
/// </summary>
public
List
<
RB_Groupbuy_Memberprice_Extend
>
GradeMemberPriceList
{
get
;
set
;
}
/// <summary>
/// 规格值列表
/// </summary>
public
object
AttrList
{
get
;
set
;
}
}
}
\ No newline at end of file
Mall.Module.Product/GroupBuyActivityModule.cs
View file @
dd751dcf
...
...
@@ -253,6 +253,13 @@ namespace Mall.Module.Product
TenantId
=
query
.
TenantId
,
GoodsId
=
extModel
.
GoodId
,
});
//会员价设置列表
List
<
RB_Groupbuy_Memberprice_Extend
>
memberpriceList
=
GetGroupBuyMemberpriceModule
(
new
RB_Groupbuy_Memberprice_Extend
()
{
MallBaseId
=
query
.
MallBaseId
,
TenantId
=
query
.
TenantId
,
GoodsId
=
extModel
.
GoodId
,
});
if
(
groupStepList
!=
null
&&
groupStepList
.
Count
>
0
)
{
...
...
@@ -298,6 +305,28 @@ namespace Mall.Module.Product
}
}
}
//会员价设置
item
.
MemberpriceList
=
new
List
<
RB_Groupbuy_Memberprice_Extend
>();
var
gradeMemberList
=
memberpriceList
.
Where
(
qitem
=>
qitem
.
StepId
==
item
.
StepId
).
GroupBy
(
qitem
=>
new
{
qitem
.
SpecificationSort
,
qitem
.
StepId
}).
ToList
();
foreach
(
var
subItem
in
gradeMemberList
)
{
var
tempModel
=
memberpriceList
.
Where
(
qitem
=>
qitem
.
StepId
==
subItem
.
Key
.
StepId
&&
qitem
.
SpecificationSort
==
subItem
.
Key
.
SpecificationSort
).
FirstOrDefault
();
item
.
MemberpriceList
.
Add
(
new
RB_Groupbuy_Memberprice_Extend
()
{
SpecificationSort
=
tempModel
.
SpecificationSort
,
GradeMemberPriceList
=
memberpriceList
.
Where
(
qitem
=>
qitem
.
StepId
==
subItem
.
Key
.
StepId
&&
qitem
.
SpecificationSort
==
subItem
.
Key
.
SpecificationSort
)
.
OrderBy
(
qitem
=>
qitem
.
MemberGrade
).
ToList
()
});
}
foreach
(
var
subItem
in
item
.
MemberpriceList
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
subItem
.
SpecificationSort
))
{
subItem
.
AttrList
=
GetGroupBuyGoodsAttr
(
subItem
.
SpecificationSort
,
specificationList
);
}
}
}
}
extModel
.
SpecificationList
=
specificationList
;
...
...
@@ -595,17 +624,32 @@ namespace Mall.Module.Product
{
foreach
(
var
subItem
in
groupItem
.
MemberpriceList
)
{
subItem
.
StepId
=
groupItem
.
StepId
;
if
(
subItem
.
Id
>
0
)
{
flag
=
groupbuy_MemberpriceRepository
.
Update
(
subItem
);
}
else
if
(
subItem
.
GradeMemberPriceList
!=
null
&&
subItem
.
GradeMemberPriceList
.
Count
>
0
)
{
var
newMemberId
=
groupbuy_MemberpriceRepository
.
Insert
(
subItem
);
subItem
.
Id
=
newMemberId
;
flag
=
newMemberId
>
0
;
foreach
(
var
childItem
in
subItem
.
GradeMemberPriceList
)
{
childItem
.
SpecificationSort
=
subItem
.
SpecificationSort
;
childItem
.
GoodsId
=
extModel
.
GoodId
;
childItem
.
Status
=
0
;
childItem
.
TenantId
=
extModel
.
TenantId
;
childItem
.
MallBaseId
=
extModel
.
MallBaseId
;
childItem
.
StepId
=
groupItem
.
StepId
;
if
(
childItem
.
Id
>
0
)
{
childItem
.
UpdateDate
=
DateTime
.
Now
;
flag
=
groupbuy_MemberpriceRepository
.
Update
(
childItem
);
}
else
{
childItem
.
CreateDate
=
DateTime
.
Now
;
childItem
.
UpdateDate
=
DateTime
.
Now
;
var
newMemberId
=
groupbuy_MemberpriceRepository
.
Insert
(
childItem
);
childItem
.
Id
=
newMemberId
;
flag
=
newMemberId
>
0
;
}
}
}
}
}
}
...
...
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