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
a30271f4
Commit
a30271f4
authored
Aug 18, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
活动保存修改
parent
957cbf4d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
17 deletions
+32
-17
GroupBuyActivityModule.cs
Mall.Module.Product/GroupBuyActivityModule.cs
+32
-17
No files found.
Mall.Module.Product/GroupBuyActivityModule.cs
View file @
a30271f4
...
...
@@ -358,8 +358,8 @@ namespace Mall.Module.Product
{
SName
=
smodel
.
Name
,
SId
=
smodel
.
Id
,
SVId
=
svmodel
.
Sort
,
SVName
=
svmodel
.
Name
SVId
=
svmodel
?.
Sort
??
0
,
SVName
=
svmodel
?.
Name
??
""
,
});
}
}
...
...
@@ -461,11 +461,11 @@ namespace Mall.Module.Product
{
isChange
=
true
;
//删除规格
groupbuy_Activity_SpecificationRepository
.
Delete
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Specification_Extend
.
GoodsId
),
extModel
.
GoodId
));
groupbuy_Activity_SpecificationRepository
.
Delete
One
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Specification_Extend
.
GoodsId
),
extModel
.
GoodId
));
//删除规格值
groupbuy_Activity_SpecificationValueRepository
.
Delete
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Specificationvalue_Extend
.
GoodsId
),
extModel
.
GoodId
));
groupbuy_Activity_SpecificationValueRepository
.
Delete
One
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Specificationvalue_Extend
.
GoodsId
),
extModel
.
GoodId
));
//删除规格价格
groupbuy_Activity_SpecificationPriceRepository
.
Delete
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Specificationprice_Extend
.
GoodsId
),
extModel
.
GoodId
));
groupbuy_Activity_SpecificationPriceRepository
.
Delete
One
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Specificationprice_Extend
.
GoodsId
),
extModel
.
GoodId
));
//新增规格和规格值
foreach
(
var
specItem
in
extModel
.
SpecificationList
)
...
...
@@ -614,7 +614,7 @@ namespace Mall.Module.Product
{
isChange
=
true
;
//删除规格价格
groupbuy_Activity_SpecificationPriceRepository
.
Delete
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Specificationprice_Extend
.
GoodsId
),
extModel
.
GoodId
));
groupbuy_Activity_SpecificationPriceRepository
.
Delete
One
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Specificationprice_Extend
.
GoodsId
),
extModel
.
GoodId
));
foreach
(
var
priceItem
in
extModel
.
SpecificationPriceList
)
{
var
priceModel
=
new
RB_Groupbuy_Activity_Specificationprice_Extend
()
...
...
@@ -684,10 +684,10 @@ namespace Mall.Module.Product
var
stepList
=
stepRepository
.
GetGroupBuyActivityListRepository
(
new
RB_Groupbuy_Activity_Step_Extend
()
{
GoodId
=
extModel
.
GoodId
,
MallBaseId
=
extModel
.
MallBaseId
,
TenantId
=
extModel
.
TenantId
});
if
(
isChange
||
(
stepList
.
Count
()
!=
extModel
.
GroupList
.
Count
()
||
stepList
.
Count
()
!=
extModel
.
GroupList
.
Where
(
qitem
=>
qitem
.
StepId
>
0
).
Count
()))
{
stepRepository
.
Delete
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Step_Extend
.
GoodId
),
extModel
.
GoodId
));
groupbuy_Activity_Step_PriceRepository
.
Delete
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Step_Price_Extend
.
GoodId
),
extModel
.
GoodId
));
groupBuy_DistributioncommissionRepository
.
Delete
(
new
WhereHelper
(
nameof
(
RB_GroupBuy_Distributioncommission_Extend
.
GoodsId
),
extModel
.
GoodId
));
groupbuy_MemberpriceRepository
.
Delete
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Memberprice_Extend
.
GoodsId
),
extModel
.
GoodId
));
stepRepository
.
Delete
One
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Step_Extend
.
GoodId
),
extModel
.
GoodId
));
groupbuy_Activity_Step_PriceRepository
.
Delete
One
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Step_Price_Extend
.
GoodId
),
extModel
.
GoodId
));
groupBuy_DistributioncommissionRepository
.
Delete
One
(
new
WhereHelper
(
nameof
(
RB_GroupBuy_Distributioncommission_Extend
.
GoodsId
),
extModel
.
GoodId
));
groupbuy_MemberpriceRepository
.
Delete
One
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Memberprice_Extend
.
GoodsId
),
extModel
.
GoodId
));
foreach
(
var
groupItem
in
extModel
.
GroupList
)
{
var
groupModel
=
new
RB_Groupbuy_Activity_Step_Extend
()
...
...
@@ -796,7 +796,7 @@ namespace Mall.Module.Product
{
nameof
(
RB_Groupbuy_Activity_Step_Price_Extend
.
PinTuanStock
),
subItem
.
PinTuanStock
},
{
nameof
(
RB_Groupbuy_Activity_Step_Price_Extend
.
SortNum
),
subItem
.
SortNum
},
};
flag
=
groupbuy_Activity_Step_PriceRepository
.
Update
(
stepPriceFileds
,
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Step_Price_Extend
),
subItem
.
Id
));
flag
=
groupbuy_Activity_Step_PriceRepository
.
Update
(
stepPriceFileds
,
new
WhereHelper
(
nameof
(
RB_Groupbuy_Activity_Step_Price_Extend
.
Id
),
subPriceModel
.
Id
));
}
//更新会员价
...
...
@@ -805,17 +805,32 @@ namespace Mall.Module.Product
foreach
(
var
childItem
in
subItem
.
GradeMemberPriceList
)
{
var
memberPriceModel
=
memberPriceList
.
Where
(
qitem
=>
qitem
.
StepId
==
item
.
StepId
&&
qitem
.
SpecificationSort
==
subItem
.
SpecificationSort
).
FirstOrDefault
();
if
(
memberPriceModel
!=
null
)
{
Dictionary
<
string
,
object
>
memberPriceFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Groupbuy_Memberprice_Extend
.
MemberGrade
),
childItem
.
MemberGrade
},
{
nameof
(
RB_Groupbuy_Memberprice_Extend
.
MemberPrice
),
childItem
.
MemberPrice
},
};
flag
=
groupbuy_MemberpriceRepository
.
Update
(
memberPriceFileds
,
new
WhereHelper
(
nameof
(
RB_Groupbuy_Memberprice_Extend
),
childItem
.
Id
));
flag
=
groupbuy_MemberpriceRepository
.
Update
(
memberPriceFileds
,
new
WhereHelper
(
nameof
(
RB_Groupbuy_Memberprice_Extend
.
Id
),
memberPriceModel
.
Id
));
}
else
{
childItem
.
SpecificationSort
=
subItem
.
SpecificationSort
;
childItem
.
GoodsId
=
extModel
.
GoodId
;
childItem
.
Status
=
0
;
childItem
.
TenantId
=
extModel
.
TenantId
;
childItem
.
MallBaseId
=
extModel
.
MallBaseId
;
childItem
.
StepId
=
item
.
StepId
;
childItem
.
CreateDate
=
DateTime
.
Now
;
childItem
.
UpdateDate
=
DateTime
.
Now
;
flag
=
groupbuy_MemberpriceRepository
.
Insert
(
childItem
)
>
0
;
}
}
}
if
(
oldSeparateDistributionType
!=
extModel
.
SeparateDistributionType
)
{
groupbuy_MemberpriceRepository
.
Delete
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Memberprice_Extend
.
GoodsId
),
extModel
.
GoodId
));
groupbuy_MemberpriceRepository
.
Delete
One
(
new
WhereHelper
(
nameof
(
RB_Groupbuy_Memberprice_Extend
.
GoodsId
),
extModel
.
GoodId
));
//设置分销佣金
SetDistributioncommissionModule
(
extModel
,
stepModel
,
item
.
StepId
,
isCreate
:
true
);
}
...
...
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