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
e6720848
Commit
e6720848
authored
Jun 29, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
c3c0742c
32096aff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
30 deletions
+60
-30
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+15
-2
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+40
-23
MallHelper.cs
Mall.WebApi/Controllers/Mall/MallHelper.cs
+4
-4
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+1
-1
No files found.
Mall.Module.Product/OrderModule.cs
View file @
e6720848
...
...
@@ -4993,6 +4993,13 @@ namespace Mall.Module.Product
try
{
decimal
Money
=
dmodel
.
Refund
??
0
;
decimal
Rate
=
Convert
.
ToDecimal
(
Config
.
SettlementRate
);
decimal
Fee
=
0
;
if
(
Rate
>
0
)
{
Fee
=
Math
.
Round
(
Money
*
Rate
/
1000
,
2
,
MidpointRounding
.
AwayFromZero
);
Money
-=
Fee
;
}
//查询用户
var
umodel
=
member_UserRepository
.
GetEntity
(
dmodel
.
UserId
);
if
(
umodel
==
null
)
{
return
false
;
}
...
...
@@ -5001,7 +5008,7 @@ namespace Mall.Module.Product
//先查询规则
var
financeConfigurineList
=
financeConfigurineRepository
.
GetList
(
new
Model
.
Extend
.
Finance
.
RB_Finance_Configurine_Extend
{
Type
=
3
});
string
dstr
=
"已收货,客人付款:"
+
(
dmodel
.
Income
??
0
)
+
"金额,申请退款:"
+
(
dmodel
.
Refund
??
0
);
string
dstr
=
"已收货,客人付款:"
+
(
dmodel
.
Income
??
0
)
+
"金额,申请退款:"
+
(
dmodel
.
Refund
??
0
)
+
",手续费:"
+
Fee
;
if
(
financeConfigurineList
!=
null
&&
financeConfigurineList
.
Any
())
{
var
item
=
financeConfigurineList
.
FirstOrDefault
();
...
...
@@ -5930,14 +5937,20 @@ namespace Mall.Module.Product
var
flag
=
false
;
try
{
decimal
Rate
=
Convert
.
ToDecimal
(
Config
.
SettlementRate
);
decimal
Money
=
omodel
.
Income
??
0
;
decimal
Fee
=
0
;
if
(
Rate
>
0
)
{
Fee
=
Math
.
Round
(
Money
*
Rate
/
1000
,
2
,
MidpointRounding
.
AwayFromZero
);
Money
-=
Fee
;
}
//查询用户
var
umodel
=
member_UserRepository
.
GetEntity
(
omodel
.
UserId
);
if
(
umodel
==
null
)
{
return
false
;
}
//先查询规则
var
financeConfigurineList
=
financeConfigurineRepository
.
GetList
(
new
Model
.
Extend
.
Finance
.
RB_Finance_Configurine_Extend
{
Type
=
3
});
string
dstr
=
"客人付款:"
+
(
omodel
.
Income
??
0
)
+
"金额,退款:"
+
(
omodel
.
Income
??
0
);
string
dstr
=
"客人付款:"
+
(
omodel
.
Income
??
0
)
+
"金额,退款:"
+
(
omodel
.
Income
??
0
)
+
",手续费:"
+
Fee
;
if
(
financeConfigurineList
!=
null
&&
financeConfigurineList
.
Any
())
{
var
item
=
financeConfigurineList
.
FirstOrDefault
();
...
...
Mall.Module.Product/ProductModule.cs
View file @
e6720848
...
...
@@ -1327,14 +1327,14 @@ namespace Mall.Module.Product
if
(
model
.
SeparateDistribution
==
1
)
{
var
dcList
=
model
.
DistributionCommissionList
.
Where
(
x
=>
x
.
DistributorGrade
==
disModel
.
GradeId
).
ToList
();
if
((
BasicsModel
?.
IsCommissionResidue
??
2
)
==
1
)
{
model
.
MaxShare
=
dcList
.
Max
(
x
=>
(
x
.
OneCommission
??
0
)
+
(
x
.
TwoCommission
??
0
)
+
(
x
.
ThreeCommission
??
0
));
}
else
{
//
if ((BasicsModel?.IsCommissionResidue ?? 2) == 1)
//
{
//
model.MaxShare = dcList.Max(x => (x.OneCommission ?? 0) + (x.TwoCommission ?? 0) + (x.ThreeCommission ?? 0));
//
}
//
else
//
{
model
.
MaxShare
=
dcList
.
Max
(
x
=>
x
.
OneCommission
??
0
);
}
//
}
// 这里需注意,可能需要分销 是否提所有返佣控制
if
(
model
.
SeparateDistributionMoneyType
==
1
)
{
...
...
@@ -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 @
e6720848
...
...
@@ -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
,
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
e6720848
...
...
@@ -209,7 +209,7 @@ namespace Mall.WebApi.Controllers.MallBase
case
11
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
Mobile
)
{
});
break
;
case
12
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
ShoppingAddress
)
{
});
break
;
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
.
DistrictAddress
??
""
)+
" "
+(
item
.
ShoppingAddress
??
""
)
)
{
});
break
;
case
13
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
.
PreferPrice
??
0
).
ToString
())
{
});
break
;
case
14
:
...
...
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