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
1c5ff295
Commit
1c5ff295
authored
Jun 01, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品调整
parent
a8cea655
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
2 deletions
+40
-2
RB_Goods_DistributionCommission_Extend.cs
.../Extend/Product/RB_Goods_DistributionCommission_Extend.cs
+4
-0
RB_Goods_MemberPrice_Extend.cs
Mall.Model/Extend/Product/RB_Goods_MemberPrice_Extend.cs
+4
-0
RB_Goods_SpecificationPrice_Extend.cs
...odel/Extend/Product/RB_Goods_SpecificationPrice_Extend.cs
+4
-0
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+28
-2
No files found.
Mall.Model/Extend/Product/RB_Goods_DistributionCommission_Extend.cs
View file @
1c5ff295
...
...
@@ -25,5 +25,9 @@ namespace Mall.Model.Extend.Product
/// 规格值列表
/// </summary>
public
object
AttrList
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
?
Sort
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_MemberPrice_Extend.cs
View file @
1c5ff295
...
...
@@ -25,5 +25,9 @@ namespace Mall.Model.Extend.Product
/// 规格值列表
/// </summary>
public
object
AttrList
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
?
Sort
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_SpecificationPrice_Extend.cs
View file @
1c5ff295
...
...
@@ -21,5 +21,9 @@ namespace Mall.Model.Extend.Product
/// 规格值列表
/// </summary>
public
object
AttrList
{
get
;
set
;
}
/// <summary>
/// 查询排序
/// </summary>
public
int
?
SortNum
{
get
;
set
;
}
}
}
Mall.Module.Product/ProductModule.cs
View file @
1c5ff295
...
...
@@ -2891,6 +2891,7 @@ namespace Mall.Module.Product
item
.
SpecificationValueList
=
svlist
.
Where
(
x
=>
x
.
SpecificationId
==
item
.
Id
).
ToList
();
}
}
int
SortNum
=
1
;
model
.
SpecificationPriceList
=
goods_SpecificationPriceRepository
.
GetList
(
new
RB_Goods_SpecificationPrice_Extend
()
{
GoodsId
=
goodsId
,
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
});
foreach
(
var
item
in
model
.
SpecificationPriceList
)
{
...
...
@@ -2914,7 +2915,10 @@ namespace Mall.Module.Product
}
item
.
AttrList
=
AttrList
;
}
item
.
SortNum
=
SortNum
;
SortNum
++;
}
model
.
SpecificationPriceList
=
model
.
SpecificationPriceList
.
OrderByDescending
(
x
=>
x
.
SortNum
).
ToList
();
}
model
.
AreaList
=
new
List
<
RB_Goods_Area_Extend
>();
if
(
model
.
IsAreaBuy
==
1
)
...
...
@@ -2929,6 +2933,7 @@ namespace Mall.Module.Product
if
(
model
.
DistributionCommissionList
.
Any
())
{
int
SortNum
=
1
;
//获取分销商启用等级
var
dgradeList
=
distributor_GradeRepository
.
GetList
(
new
RB_Distributor_Grade_Extend
()
{
Enabled
=
1
,
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
});
dgradeList
.
Add
(
new
RB_Distributor_Grade_Extend
()
...
...
@@ -2969,6 +2974,8 @@ namespace Mall.Module.Product
treemodel
.
AttrList
=
AttrList
;
}
}
treemodel
.
Sort
=
SortNum
;
treemodel
.
GradeCommissionList
=
treemodel
.
GradeCommissionList
.
OrderBy
(
x
=>
x
.
DistributorGrade
).
ToList
();
model
.
DistributionCommissionTreeList
.
Add
(
treemodel
);
}
}
...
...
@@ -2978,7 +2985,7 @@ namespace Mall.Module.Product
var
treemodel
=
model
.
DistributionCommissionList
.
Where
(
x
=>
(
x
.
SpecificationSort
??
""
)
==
qitem
).
FirstOrDefault
();
treemodel
.
GradeCommissionList
=
new
List
<
RB_Goods_DistributionCommission_Extend
>();
var
gradeCommList
=
model
.
DistributionCommissionList
.
Where
(
x
=>
(
x
.
SpecificationSort
??
""
)
==
qitem
).
ToList
();
dgradeList
=
dgradeList
.
OrderBy
(
x
=>
x
.
Grade
).
ToList
();
dgradeList
=
dgradeList
.
OrderBy
Descending
(
x
=>
x
.
Grade
).
ToList
();
foreach
(
var
grade
in
dgradeList
)
{
var
gradeMList
=
gradeCommList
.
Where
(
x
=>
x
.
DistributorGrade
==
grade
.
Id
&&
x
.
SpecificationSort
==
qitem
);
...
...
@@ -3020,9 +3027,16 @@ namespace Mall.Module.Product
treemodel
.
AttrList
=
AttrList
;
}
}
treemodel
.
Sort
=
SortNum
;
treemodel
.
GradeCommissionList
=
treemodel
.
GradeCommissionList
.
OrderBy
(
x
=>
x
.
DistributorGrade
).
ToList
();
model
.
DistributionCommissionTreeList
.
Add
(
treemodel
);
}
}
SortNum
++;
if
(
model
.
DistributionCommissionTreeList
.
Any
())
{
//倒序排一次
model
.
DistributionCommissionTreeList
=
model
.
DistributionCommissionTreeList
.
OrderByDescending
(
x
=>
x
.
Sort
).
ToList
();
}
}
}
model
.
MemberPriceList
=
new
List
<
RB_Goods_MemberPrice_Extend
>();
...
...
@@ -3032,6 +3046,7 @@ namespace Mall.Module.Product
model
.
MemberPriceList
=
goods_MemberPriceRepository
.
GetList
(
new
RB_Goods_MemberPrice_Extend
()
{
GoodsId
=
goodsId
,
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
});
if
(
model
.
MemberPriceList
.
Any
())
{
int
SortNum
=
1
;
var
mgradeList
=
member_GradeRepository
.
GetList
(
new
RB_Member_Grade_Extend
()
{
Enabled
=
1
,
TenantId
=
1
,
MallBaseId
=
1
});
string
zdgradeStr
=
string
.
Join
(
","
,
mgradeList
.
Select
(
x
=>
x
.
Id
).
OrderBy
(
x
=>
x
));
...
...
@@ -3063,6 +3078,8 @@ namespace Mall.Module.Product
}
treemodel
.
AttrList
=
AttrList
;
}
treemodel
.
Sort
=
SortNum
;
treemodel
.
GradePriceList
=
treemodel
.
GradePriceList
.
OrderBy
(
x
=>
x
.
MemberGrade
).
ToList
();
model
.
MemberPriceTreeList
.
Add
(
treemodel
);
}
}
...
...
@@ -3073,7 +3090,7 @@ namespace Mall.Module.Product
var
treemodel
=
model
.
MemberPriceList
.
Where
(
x
=>
(
x
.
SpecificationSort
??
""
)
==
qitem
).
FirstOrDefault
();
treemodel
.
GradePriceList
=
model
.
MemberPriceList
.
Where
(
x
=>
(
x
.
SpecificationSort
??
""
)
==
qitem
).
ToList
();
var
gradePrice
=
model
.
MemberPriceList
.
Where
(
x
=>
(
x
.
SpecificationSort
??
""
)
==
qitem
).
ToList
();
mgradeList
=
mgradeList
.
OrderBy
(
x
=>
x
.
Grade
).
ToList
();
mgradeList
=
mgradeList
.
OrderBy
Descending
(
x
=>
x
.
Grade
).
ToList
();
foreach
(
var
grade
in
mgradeList
)
{
var
gradeMList
=
gradePrice
.
Where
(
x
=>
x
.
MemberGrade
==
grade
.
Id
&&
x
.
SpecificationSort
==
qitem
);
...
...
@@ -3111,9 +3128,18 @@ namespace Mall.Module.Product
}
treemodel
.
AttrList
=
AttrList
;
}
treemodel
.
Sort
=
SortNum
;
treemodel
.
GradePriceList
=
treemodel
.
GradePriceList
.
OrderBy
(
x
=>
x
.
MemberGrade
).
ToList
();
model
.
MemberPriceTreeList
.
Add
(
treemodel
);
}
}
SortNum
++;
if
(
model
.
MemberPriceTreeList
.
Any
())
{
//倒序排一次
model
.
MemberPriceTreeList
=
model
.
MemberPriceTreeList
.
OrderByDescending
(
x
=>
x
.
Sort
).
ToList
();
}
}
}
model
.
CarouselImageList
=
new
List
<
RB_ImageCommonModel
>();
...
...
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