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
1720b8bb
Commit
1720b8bb
authored
Aug 12, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
6bef0e11
054c4e60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
21 deletions
+45
-21
GroupBuyActivityModule.cs
Mall.Module.Product/GroupBuyActivityModule.cs
+45
-21
No files found.
Mall.Module.Product/GroupBuyActivityModule.cs
View file @
1720b8bb
...
...
@@ -191,23 +191,32 @@ namespace Mall.Module.Product
item
.
AttrList
=
AttrList
;
}
}
////拼团价格列表
//List<RB_Groupbuy_Activity_Specificationprice_Extend> specificationpriceList = GetGroupbuyActivitySpecificationpriceListModule(new RB_Groupbuy_Activity_Specificationprice_Extend()
//{
// MallBaseId = query.MallBaseId,
// TenantId = query.TenantId,
// GoodsId = extModel.GoodId,
//});
////拼团阶梯价格列表
//List<RB_Groupbuy_Activity_Step_Extend> groupStepList = GetGroupBuyActivityListModule(new RB_Groupbuy_Activity_Step_Extend()
//{
// MallBaseId = query.MallBaseId,
// TenantId = query.TenantId,
// GoodId = extModel.GoodId,
//});
//拼团阶梯基础设置列表
List
<
RB_Groupbuy_Activity_Step_Extend
>
groupStepList
=
GetGroupBuyActivityListModule
(
new
RB_Groupbuy_Activity_Step_Extend
()
{
MallBaseId
=
query
.
MallBaseId
,
TenantId
=
query
.
TenantId
,
GoodId
=
extModel
.
GoodId
,
});
//拼团阶梯价格设置列表
List
<
RB_Groupbuy_Activity_Step_Price_Extend
>
StepPriceList
=
GetGroupbuyActivitySpecificationpriceListModule
(
new
RB_Groupbuy_Activity_Step_Price_Extend
()
{
MallBaseId
=
query
.
MallBaseId
,
TenantId
=
query
.
TenantId
,
GoodId
=
extModel
.
GoodId
,
});
if
(
groupStepList
!=
null
&&
groupStepList
.
Count
>
0
)
{
foreach
(
var
item
in
groupStepList
)
{
item
.
StepPriceList
=
StepPriceList
?.
Where
(
qitem
=>
qitem
.
StepId
==
item
.
StepId
)?.
ToList
()
??
new
List
<
RB_Groupbuy_Activity_Step_Price_Extend
>();
}
}
extModel
.
SpecificationList
=
specificationList
;
extModel
.
SpecificationPriceList
=
specPriceList
;
//
extModel.GroupList = groupStepList;
extModel
.
GroupList
=
groupStepList
;
}
return
extModel
;
}
...
...
@@ -272,7 +281,7 @@ namespace Mall.Module.Product
{
flag
=
SetGoodsSpecificationModule
(
extModel
);
//
flag = SetGoodGroupStepModule(extModel);
flag
=
SetGoodGroupStepModule
(
extModel
);
}
return
flag
;
}
...
...
@@ -304,7 +313,6 @@ namespace Mall.Module.Product
specItem
.
Id
=
newSpecId
;
flag
=
newSpecId
>
0
;
}
if
(
specItem
.
SpecificationValueList
!=
null
&&
specItem
.
SpecificationValueList
.
Count
>
0
)
{
foreach
(
var
specValueItem
in
specItem
.
SpecificationValueList
)
...
...
@@ -378,9 +386,17 @@ namespace Mall.Module.Product
groupItem
.
TenantId
=
extModel
.
TenantId
;
groupItem
.
MallBaseId
=
extModel
.
MallBaseId
;
groupItem
.
GoodId
=
extModel
.
GoodId
;
var
newGroupId
=
stepRepository
.
Insert
(
groupItem
);
flag
=
newGroupId
>
0
;
if
(
newGroupId
>
0
)
if
(
groupItem
.
StepId
>
0
)
{
flag
=
stepRepository
.
Update
(
groupItem
);
}
else
{
var
newStepId
=
stepRepository
.
Insert
(
groupItem
);
groupItem
.
StepId
=
newStepId
;
flag
=
newStepId
>
0
;
}
if
(
groupItem
.
StepId
>
0
)
{
if
(
groupItem
.
StepPriceList
!=
null
&&
groupItem
.
StepPriceList
.
Count
>
0
)
{
...
...
@@ -390,7 +406,15 @@ namespace Mall.Module.Product
subItem
.
MallBaseId
=
extModel
.
MallBaseId
;
subItem
.
TenantId
=
extModel
.
TenantId
;
subItem
.
GoodId
=
extModel
.
GoodId
;
var
stepPriceId
=
groupbuy_Activity_Step_PriceRepository
.
Insert
(
subItem
);
subItem
.
StepId
=
groupItem
.
StepId
;
if
(
subItem
.
Id
>
0
)
{
flag
=
groupbuy_Activity_Step_PriceRepository
.
Update
(
subItem
);
}
else
{
flag
=
groupbuy_Activity_Step_PriceRepository
.
Insert
(
subItem
)>
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