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
4fc29488
Commit
4fc29488
authored
Aug 11, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
7fe4c33e
6a38fd26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
3 deletions
+59
-3
GroupBuyConfigActivityModule.cs
Mall.Module.Product/GroupBuyConfigActivityModule.cs
+59
-3
No files found.
Mall.Module.Product/GroupBuyConfigActivityModule.cs
View file @
4fc29488
...
...
@@ -44,7 +44,7 @@ namespace Mall.Module.Product
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Groupbuy_Activity_Step_Extend
>
GetGroupBuyActivityList
Repository
(
RB_Groupbuy_Activity_Step_Extend
query
)
public
List
<
RB_Groupbuy_Activity_Step_Extend
>
GetGroupBuyActivityList
Module
(
RB_Groupbuy_Activity_Step_Extend
query
)
{
return
stepRepository
.
GetGroupBuyActivityListRepository
(
query
);
}
...
...
@@ -94,9 +94,19 @@ namespace Mall.Module.Product
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
string
Ids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
ActivityId
));
List
<
RB_Groupbuy_Activity_Step_Extend
>
groupList
=
new
List
<
RB_Groupbuy_Activity_Step_Extend
>();
if
(!
string
.
IsNullOrEmpty
(
Ids
))
{
groupList
=
GetGroupBuyActivityListModule
(
new
RB_Groupbuy_Activity_Step_Extend
()
{
MallBaseId
=
query
.
MallBaseId
,
TenantId
=
query
.
TenantId
,
GoodIds
=
Ids
});
}
foreach
(
var
item
in
list
)
{
item
.
GroupList
=
groupList
?.
Where
(
qitem
=>
qitem
.
GoodId
==
item
.
GoodId
)?.
ToList
()
??
new
List
<
RB_Groupbuy_Activity_Step_Extend
>();
}
}
return
list
;
...
...
@@ -148,7 +158,7 @@ namespace Mall.Module.Product
GoodsId
=
extModel
.
GoodId
,
});
//拼团阶梯价格列表
List
<
RB_Groupbuy_Activity_Step_Extend
>
groupStepList
=
GetGroupBuyActivityList
Repository
(
new
RB_Groupbuy_Activity_Step_Extend
()
List
<
RB_Groupbuy_Activity_Step_Extend
>
groupStepList
=
GetGroupBuyActivityList
Module
(
new
RB_Groupbuy_Activity_Step_Extend
()
{
MallBaseId
=
query
.
MallBaseId
,
TenantId
=
query
.
TenantId
,
...
...
@@ -215,6 +225,52 @@ namespace Mall.Module.Product
extModel
.
ActivityId
=
newId
;
flag
=
newId
>
0
;
}
if
(
flag
)
{
if
(
extModel
.
SpecificationList
!=
null
&&
extModel
.
SpecificationList
.
Count
>
0
)
{
foreach
(
var
specItem
in
extModel
.
SpecificationList
)
{
specItem
.
TenantId
=
extModel
.
TenantId
;
specItem
.
MallBaseId
=
extModel
.
MallBaseId
;
specItem
.
GoodsId
=
extModel
.
GoodId
;
var
newSpecId
=
groupbuy_Activity_SpecificationRepository
.
Insert
(
specItem
);
if
(
specItem
.
SpecificationValueList
!=
null
&&
specItem
.
SpecificationValueList
.
Count
>
0
)
{
foreach
(
var
specValueItem
in
specItem
.
SpecificationValueList
)
{
specValueItem
.
MallBaseId
=
extModel
.
MallBaseId
;
specValueItem
.
TenantId
=
extModel
.
TenantId
;
specValueItem
.
SpecificationId
=
newSpecId
;
specValueItem
.
GoodsId
=
extModel
.
GoodId
;
var
newSpecValueId
=
groupbuy_Activity_SpecificationValueRepository
.
Insert
(
specValueItem
);
}
}
}
}
if
(
extModel
.
GroupList
!=
null
&&
extModel
.
GroupList
.
Count
>
0
)
{
foreach
(
var
groupItem
in
extModel
.
GroupList
)
{
groupItem
.
TenantId
=
extModel
.
TenantId
;
groupItem
.
MallBaseId
=
extModel
.
MallBaseId
;
groupItem
.
GoodId
=
extModel
.
GoodId
;
var
newGroupId
=
stepRepository
.
Insert
(
groupItem
);
if
(
newGroupId
>
0
)
{
foreach
(
var
priceItem
in
extModel
.
SpecificationPriceList
)
{
priceItem
.
MallBaseId
=
extModel
.
MallBaseId
;
priceItem
.
TenantId
=
extModel
.
TenantId
;
priceItem
.
GoodsId
=
extModel
.
GoodId
;
priceItem
.
StepId
=
newGroupId
;
groupbuy_Activity_SpecificationPriceRepository
.
Insert
(
priceItem
);
}
}
}
}
}
return
flag
;
}
}
...
...
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