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
9c2270e2
Commit
9c2270e2
authored
Jun 29, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分销最高返佣
parent
f88c9060
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
20 deletions
+37
-20
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+33
-16
MallHelper.cs
Mall.WebApi/Controllers/Mall/MallHelper.cs
+4
-4
No files found.
Mall.Module.Product/ProductModule.cs
View file @
9c2270e2
...
...
@@ -1346,14 +1346,14 @@ namespace Mall.Module.Product
if
(
disModel
.
GradeId
==
0
)
{
//拿分销基础配置
if
((
BasicsModel
?.
IsCommissionResidue
??
2
)
==
1
)
{
model
.
MaxShare
=
(
BasicsModel
?.
OneCommission
??
0
)
+
(
BasicsModel
?.
TwoCommission
??
0
)
+
(
BasicsModel
?.
ThreeCommission
??
0
);
}
else
{
//
if ((BasicsModel?.IsCommissionResidue ?? 2) == 1)
//
{
//
model.MaxShare = (BasicsModel?.OneCommission ?? 0) + (BasicsModel?.TwoCommission ?? 0) + (BasicsModel?.ThreeCommission ?? 0);
//
}
//
else
//
{
model
.
MaxShare
=
BasicsModel
?.
OneCommission
??
0
;
}
//
}
if
((
BasicsModel
?.
DistributorCommissionType
??
2
)
==
1
)
{
model
.
MaxShare
=
Math
.
Round
(
model
.
MaxShare
*
MaxSellMoney
/
100
,
2
,
MidpointRounding
.
AwayFromZero
);
...
...
@@ -1365,14 +1365,14 @@ namespace Mall.Module.Product
var
disgradeModel
=
distributor_GradeRepository
.
GetEntity
(
disModel
.
GradeId
);
if
(
disgradeModel
!=
null
)
{
if
((
BasicsModel
?.
IsCommissionResidue
??
2
)
==
1
)
{
model
.
MaxShare
=
(
disgradeModel
?.
OneCommission
??
0
)
+
(
disgradeModel
?.
TwoCommission
??
0
)
+
(
disgradeModel
?.
ThreeCommission
??
0
);
}
else
{
//
if ((BasicsModel?.IsCommissionResidue ?? 2) == 1)
//
{
//
model.MaxShare = (disgradeModel?.OneCommission ?? 0) + (disgradeModel?.TwoCommission ?? 0) + (disgradeModel?.ThreeCommission ?? 0);
//
}
//
else
//
{
model
.
MaxShare
=
disgradeModel
?.
OneCommission
??
0
;
}
//
}
if
((
disgradeModel
?.
DistributionCommissionType
??
2
)
==
1
)
{
model
.
MaxShare
=
Math
.
Round
(
model
.
MaxShare
*
MaxSellMoney
/
100
,
2
,
MidpointRounding
.
AwayFromZero
);
...
...
@@ -3218,8 +3218,25 @@ namespace Mall.Module.Product
if
(!
string
.
IsNullOrEmpty
(
demodel
.
CategoryIds
)
&&
!
demodel
.
CategoryIds
.
Contains
(
','
))
{
//获取该分类下所有子集分类
var
cmodel
=
goods_CategoryRepository
.
GetEntity
(
demodel
.
CategoryIds
);
//goods_CategoryRepository.GetList(new RB_Goods_Category_Extend() { TenantId });
var
cmodel
=
product_CategoryRepository
.
GetEntity
(
demodel
.
CategoryIds
);
if
(
cmodel
!=
null
)
{
List
<
int
>
AllClist
=
new
List
<
int
>();
AllClist
.
Add
(
cmodel
.
Id
);
var
clist
=
product_CategoryRepository
.
GetList
(
new
RB_Product_Category_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
RootId
=
cmodel
.
RootId
});
var
OneList
=
clist
.
Where
(
x
=>
x
.
ParentId
==
cmodel
.
Id
).
ToList
();
foreach
(
var
item
in
OneList
)
{
AllClist
.
Add
(
item
.
Id
);
var
TwoList
=
clist
.
Where
(
x
=>
x
.
ParentId
==
item
.
Id
).
ToList
();
if
(
TwoList
.
Any
())
{
AllClist
.
AddRange
(
TwoList
.
Select
(
x
=>
x
.
Id
).
Distinct
().
ToList
());
}
}
if
(
AllClist
.
Any
())
{
demodel
.
CategoryIds
=
string
.
Join
(
","
,
AllClist
);
}
}
}
var
list
=
goodsRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
if
(
list
.
Any
())
...
...
Mall.WebApi/Controllers/Mall/MallHelper.cs
View file @
9c2270e2
...
...
@@ -195,7 +195,7 @@ namespace Mall.WebApi.Controllers
else
{
childItem
.
goodsList
=
new
List
<
GoodsDetailsItem2
>();
var
catGoodsList
=
productModule
.
GetProductGoodsPageList
(
1
,
childItem
.
goodsNum
,
out
long
rowsCount
,
new
Model
.
Extend
.
Product
.
RB_Goods_Extend
()
var
catGoodsList
=
productModule
.
GetProductGoodsPageList
_V2
(
1
,
childItem
.
goodsNum
,
out
long
rowsCount
,
new
Model
.
Extend
.
Product
.
RB_Goods_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
...
...
@@ -227,7 +227,7 @@ namespace Mall.WebApi.Controllers
if
(
goodsData
.
addGoodsType
==
0
)
{
goodsData
.
list
=
new
List
<
GoodsDetailsItem2
>();
var
goodsList
=
productModule
.
GetProductGoodsPageList
(
1
,
goodsData
.
goodsLength
,
out
long
rowsCount
,
new
Model
.
Extend
.
Product
.
RB_Goods_Extend
()
var
goodsList
=
productModule
.
GetProductGoodsPageList
_V2
(
1
,
goodsData
.
goodsLength
,
out
long
rowsCount
,
new
Model
.
Extend
.
Product
.
RB_Goods_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
...
...
@@ -742,7 +742,7 @@ namespace Mall.WebApi.Controllers
};
if
(
subitem
.
relation_id
==
0
)
{
var
goodsList
=
productModule
.
GetProductGoodsPageList
(
1
,
6
,
out
long
rowsCount
,
new
Model
.
Extend
.
Product
.
RB_Goods_Extend
()
var
goodsList
=
productModule
.
GetProductGoodsPageList
_V2
(
1
,
6
,
out
long
rowsCount
,
new
Model
.
Extend
.
Product
.
RB_Goods_Extend
()
{
TenantId
=
Convert
.
ToInt32
(
miniProgram
.
TenantId
),
MallBaseId
=
miniProgram
.
MallBaseId
,
...
...
@@ -765,7 +765,7 @@ namespace Mall.WebApi.Controllers
}
else
{
var
goodsList
=
productModule
.
GetProductGoodsPageList
(
1
,
6
,
out
long
rowsCount
,
new
Model
.
Extend
.
Product
.
RB_Goods_Extend
()
var
goodsList
=
productModule
.
GetProductGoodsPageList
_V2
(
1
,
6
,
out
long
rowsCount
,
new
Model
.
Extend
.
Product
.
RB_Goods_Extend
()
{
TenantId
=
Convert
.
ToInt32
(
miniProgram
.
TenantId
),
MallBaseId
=
miniProgram
.
MallBaseId
,
...
...
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